Find Souls
Search the Agent Souls library (332+ AI persona prompts) and install a SOUL.md into the current project.
Workflow
Step 1: Search
Load the soul index with local caching (cache file: ~/.cache/agent-souls/search.json):
- 1. Check if
~/.cache/agent-souls/search.json exists and its modification time is less than 1 day old.
- Use
stat to check the file's modification time.
- 2. If the cache is fresh (< 1 day old): read the local file directly with the
Read tool. - If the cache is stale (>= 1 day old) or missing:
-
WebFetch https://agent-souls.com/search.json to download it.
- Create directory
~/.cache/agent-souls/ if it doesn't exist.
- Write the downloaded JSON to
~/.cache/agent-souls/search.json.
The JSON is an array of objects with these fields:
- -
name_en — English display name - INLINECODE8 — Chinese display name
- INLINECODE9 — path like INLINECODE10
- INLINECODE11 — "Real World", "Virtual World", or "Expert Personas"
- INLINECODE12 — Chinese category
- INLINECODE13 /
tags_en / tags_zh — keyword arrays
Match the user's query against name_en, name_zh, tags, tags_en, tags_zh, and category_en / category_zh. Show the top matches (up to 10) in a numbered list with name, category, and tags. Ask the user to pick one.
If no matches are found:
- 1. If using a cached
search.json, tell the user the cache may be outdated and offer to refresh it (delete the cache and re-download). If after refresh there are still no results, go to step 2. - Tell the user this soul doesn't exist yet, and suggest they submit a request at: https://github.com/wklken/souls/issues
Step 2: Determine Language
- - If the user's conversation is in Chinese, use
SOUL.md (Chinese version). - If the user's conversation is in English or unknown, use
SOUL.en.md (English version). - The user can explicitly request a language.
Step 3: Download
Construct the download URL:
CODEBLOCK0
Where {url} is the url field from search.json (e.g. /real_world/confucius/).
Use WebFetch to download the raw content of the chosen SOUL file.
Step 4: Backup & Install
Before replacing, always back up the existing SOUL.md:
- 1. Check if
SOUL.md exists in the current working directory. - If it exists, create
.soul_backups/ directory if it doesn't exist, then:
-
First time only: if
.soul_backups/SOUL.md.original does
not exist, copy SOUL.md to
.soul_backups/SOUL.md.original. This preserves the user's original persona and is never overwritten.
-
Every time: copy SOUL.md to
.soul_backups/SOUL.md.<slug> where
<slug> is the soul's unique identifier extracted from the
url field (the last non-empty path segment, e.g.
/virtual_world/sun_wukong/ →
sun_wukong, so the backup file is
SOUL.md.sun_wukong). If a backup with the same slug already exists, overwrite it (only the latest version of each soul needs to be kept).
- 3. Write the downloaded content to
SOUL.md in the current working directory. - Tell the user:
- Which soul was installed (name + category).
- That they should
reset the conversation (e.g.
/clear or start a new session) to load the new persona.
- That the previous SOUL.md was backed up and can be restored with this skill.
- (First time only) That the original SOUL.md has been saved and can be restored at any time.
Step 5: Rollback (if requested)
When the user asks to revert / rollback / restore the previous SOUL.md:
- 1. List all files in
.soul_backups/ sorted alphabetically. - Show them to the user with a numbered list. Each backup is named
SOUL.md.<slug> (e.g. SOUL.md.sun_wukong, SOUL.md.confucius), making it easy to identify which soul each backup contains. Highlight SOUL.md.original as "[Original]" if it exists — this is the user's initial persona before any soul was installed. - Ask the user which one to restore (the user can specify by slug name; if user says "original" / "最初" / "初始", use
SOUL.md.original). - Back up the current SOUL.md the same way (so rollback is also reversible).
- Copy the selected backup to
SOUL.md. - Tell the user to reset the conversation to reload.
Notes
- - The
.soul_backups/ directory keeps a full history. The user can manually delete old backups. - If no SOUL.md exists and no backup exists, skip the backup step.
- Always confirm with the user before overwriting SOUL.md.
寻找灵魂
搜索Agent Souls库(332+个AI角色提示词)并将SOUL.md安装到当前项目中。
工作流程
第一步:搜索
通过本地缓存加载灵魂索引(缓存文件:~/.cache/agent-souls/search.json):
- 1. 检查~/.cache/agent-souls/search.json是否存在,且其修改时间是否小于1天。
- 使用stat命令检查文件的修改时间。
- 2. 如果缓存有效(小于1天):直接使用Read工具读取本地文件。
- 如果缓存过期(大于等于1天)或不存在:
- 使用WebFetch https://agent-souls.com/search.json下载。
- 如果目录不存在,创建~/.cache/agent-souls/目录。
- 将下载的JSON写入~/.cache/agent-souls/search.json。
JSON是一个对象数组,包含以下字段:
- - nameen — 英文显示名称
- namezh — 中文显示名称
- url — 路径,如/realworld/confucius/
- categoryen — Real World、Virtual World或Expert Personas
- categoryzh — 中文分类
- tags / tagsen / tags_zh — 关键词数组
将用户的查询与nameen、namezh、tags、tagsen、tagszh以及categoryen/categoryzh进行匹配。以编号列表形式显示最多10个最佳匹配结果,包含名称、分类和标签。让用户选择一个。
如果未找到匹配结果:
- 1. 如果使用的是缓存的search.json,告知用户缓存可能已过期,并提供刷新选项(删除缓存并重新下载)。如果刷新后仍无结果,则进入第2步。
- 告知用户该灵魂尚不存在,并建议他们在以下地址提交请求:https://github.com/wklken/souls/issues
第二步:确定语言
- - 如果用户的对话是中文,使用SOUL.md(中文版)。
- 如果用户的对话是英文或未知语言,使用SOUL.en.md(英文版)。
- 用户可以明确指定语言。
第三步:下载
构建下载URL:
https://agent-souls.com{url}SOUL.md # 中文
https://agent-souls.com{url}SOUL.en.md # 英文
其中{url}是search.json中的url字段(例如/real_world/confucius/)。
使用WebFetch下载所选SOUL文件的原始内容。
第四步:备份与安装
在替换之前,始终备份现有的SOUL.md:
- 1. 检查当前工作目录中是否存在SOUL.md。
- 如果存在,创建.soul_backups/目录(如果不存在),然后:
-
仅首次:如果.soul
backups/SOUL.md.original不存在,将SOUL.md复制到.soulbackups/SOUL.md.original。这将保留用户的原始角色,且永远不会被覆盖。
-
每次操作:将SOUL.md复制到.soul
backups/SOUL.md.,其中是从url字段提取的灵魂唯一标识符(最后一个非空路径段,例如/virtualworld/sun
wukong/ → sunwukong,因此备份文件为SOUL.md.sun_wukong)。如果具有相同slug的备份已存在,则覆盖它(只需保留每个灵魂的最新版本)。
- 3. 将下载的内容写入当前工作目录中的SOUL.md。
- 告知用户:
- 安装了哪个灵魂(名称+分类)。
- 他们应该
重置对话(例如/clear或开始新会话)以加载新角色。
- 之前的SOUL.md已备份,可以使用此技能恢复。
- (仅首次)原始SOUL.md已保存,可随时恢复。
第五步:回滚(如果用户要求)
当用户要求还原/回滚/恢复之前的SOUL.md时:
- 1. 按字母顺序列出.soulbackups/中的所有文件。
- 以编号列表形式展示给用户。每个备份文件命名为SOUL.md.(例如SOUL.md.sunwukong、SOUL.md.confucius),便于识别每个备份包含的灵魂。如果存在SOUL.md.original,将其标记为[原始] — 这是安装任何灵魂之前用户的初始角色。
- 询问用户要恢复哪一个(用户可以通过slug名称指定;如果用户说original/最初/初始,则使用SOUL.md.original)。
- 以相同方式备份当前的SOUL.md(以便回滚操作也可逆)。
- 将选定的备份复制到SOUL.md。
- 告知用户重置对话以重新加载。
注意事项
- - .soul_backups/目录保留完整历史记录。用户可以手动删除旧备份。
- 如果不存在SOUL.md且没有备份,则跳过备份步骤。
- 在覆盖SOUL.md之前,始终与用户确认。