dbs-install-skill
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesedbs-install-skill:多端 Skill 安装与同步
dbs-install-skill: Multi-Agent Skill Installation and Synchronization
把任意包含 的 Skill 源目录,或包含多个 Skill 子目录的集合目录,安装到本机已经存在的 Agent。
SKILL.md用户始终使用同一条命令。脚本自动选择公共入口或专属入口,用户无需判断宿主类型,也无需添加模式参数。
Install any Skill source directory containing , or a collection directory containing multiple Skill subdirectories, to Agents already present on the local machine.
SKILL.mdUsers always use the same command. The script automatically selects the public entry or exclusive entry, so users don't need to judge the host type or add mode parameters.
自动路由
Automatic Routing
公共入口
Public Entry
脚本始终把 Skill 软链写入:
- 通用 Agents:
~/.agents/skills/<skill-name>
以下客户端可以读取该公共入口,因此不再写入各自的专属目录:
- Codex;
- GitHub Copilot;
- Gemini CLI;
- Cursor;
- Augment;
- Roo Code;
- OpenCode;
- OpenHands。
同一个 Skill 不会同时出现在 和上述客户端的专属目录中。这样可以避免 Codex 等客户端重复显示。
~/.agents/skillsThe script always creates symbolic links for Skills in:
- General Agents:
~/.agents/skills/<skill-name>
The following clients can read this public entry, so their exclusive directories are no longer written to:
- Codex;
- GitHub Copilot;
- Gemini CLI;
- Cursor;
- Augment;
- Roo Code;
- OpenCode;
- OpenHands.
The same Skill will not appear in both and the exclusive directories of the above clients. This avoids duplicate display in clients like Codex.
~/.agents/skills专属入口
Exclusive Entries
以下客户端当前仍使用专属目录。只有对应主目录已经存在时,脚本才创建软链:
- Claude Code:;
~/.claude/skills/<skill-name> - WorkBuddy:;
~/.workbuddy/skills/<skill-name> - Hermes Agent:;
~/.hermes/skills/<skill-name> - Kiro:;
~/.kiro/skills/<skill-name> - Qwen Code:;
~/.qwen/skills/<skill-name> - Cline:。
~/.cline/skills/<skill-name>
The following clients currently still use exclusive directories. The script only creates symbolic links if the corresponding home directory already exists:
- Claude Code: ;
~/.claude/skills/<skill-name> - WorkBuddy: ;
~/.workbuddy/skills/<skill-name> - Hermes Agent: ;
~/.hermes/skills/<skill-name> - Kiro: ;
~/.kiro/skills/<skill-name> - Qwen Code: ;
~/.qwen/skills/<skill-name> - Cline: .
~/.cline/skills/<skill-name>
Grok 薄适配层
Grok Thin Adaptation Layer
本机存在 时,脚本生成:
~/.grok~/.grok/skills/<skill-name>/SKILL.md
该文件必须包含 ,并指向真源 。
user_invocable: trueSKILL.mdWhen exists on the local machine, the script generates:
~/.grok~/.grok/skills/<skill-name>/SKILL.md
This file must contain and point to the actual source .
user_invocable: trueSKILL.md自动清理
Automatic Cleanup
每次执行 时,脚本同时处理历史遗留项:
link- 删除公共入口兼容客户端专属目录中指向同一真源的冗余软链;
- 删除旧版脚本曾写入、当前已停止维护的宿主软链;
- 删除同一宿主中指向同一真源、且规范名称已经存在的旧别名;
- 集合安装时删除指向集合内已失效源目录的断裂软链和 Grok 适配层;
- 保留真实目录、真实文件以及指向其他来源的软链,并报告冲突;
- 不删除源 Skill。
Every time is executed, the script simultaneously handles historical remnants:
link- Delete redundant symbolic links pointing to the same actual source in the exclusive directories of public entry-compatible clients;
- Delete symbolic links for hosts that were written by old versions of the script and are no longer maintained;
- Delete old aliases pointing to the same actual source in the same host where the standardized name already exists;
- When installing a collection, delete broken symbolic links and Grok adaptation layers pointing to invalid source directories within the collection;
- Keep real directories, real files, and symbolic links pointing to other sources, and report conflicts;
- Do not delete the source Skill.
核心原则
Core Principles
- 一个公共入口。 支持通用 Agents 目录的客户端统一读取 。
~/.agents/skills - 必要时补专属入口。 仅给当前仍依赖原生目录的客户端创建软链。
- 用户无需选择模式。 脚本不要求用户提供路由参数。
- 公共兼容客户端只保留一份。 Codex 等客户端不能同时存在公共入口和专属入口。
- 各宿主只使用软链。 Grok 是唯一使用薄适配层的宿主。
- 不创建不存在的 Agent 主目录。 是公共安装入口,可以由脚本创建;其他 Agent 主目录不存在时直接跳过。
~/.agents - 不覆盖真实目录。 目标位置已有真实目录或文件时,保留并报告。
- 卸载只删派生产物。 只删除指向指定真源的软链,以及本工具生成的 Grok 适配层。
unlink - 优先使用脚本。 使用本 Skill 自带的 ,不要临场重写安装命令。
scripts/install-skill.sh
- One public entry point. Clients that support the general Agents directory uniformly read from .
~/.agents/skills - Add exclusive entries only when necessary. Create symbolic links only for clients that still rely on native directories.
- Users don't need to select modes. The script does not require users to provide routing parameters.
- Only one copy for public-compatible clients. Clients like Codex cannot have both public and exclusive entries.
- All hosts use only symbolic links. Grok is the only host that uses a thin adaptation layer.
- Do not create non-existent Agent home directories. is the public installation entry and can be created by the script; skip other Agent home directories if they do not exist.
~/.agents - Do not overwrite real directories. If a real directory or file already exists at the target location, keep it and report it.
- Uninstall only deletes derived products. only removes symbolic links pointing to the specified actual source, as well as Grok adaptation layers generated by this tool.
unlink - Prioritize using the script. Use the included with this Skill; do not rewrite installation commands on the fly.
scripts/install-skill.sh
确定源 Skill
Identify Source Skill
用户可能提供:
- Skill 名称:;
dbs-hook - 相对路径:;
skills/dbs-hook - 绝对路径:;
/Users/.../dbskill/skills/dbs-hook - 外部 Skill:;
/Users/.../external-skills/lark-doc - Skill 集合目录:;
/Users/.../dbskill/skills - 当前上下文刚创建或刚修改的 Skill。
按以下优先级判断:
- 用户给了绝对路径,直接使用;
- 用户给了相对路径,先按当前工作目录解析,再按 dbskill 仓库根目录解析;
- 用户只给 Skill 名称,先查当前工作目录,再查 dbskill 仓库 ;
skills/<name> - 用户只说“这个 Skill”,使用当前对话刚创建、改名或讨论的 Skill;
- 仍不确定时,查看当前工作目录和仓库 下最近修改的 Skill;
skills/ - 仍无法确定时,只问一句:
安装哪个 Skill?给我 Skill 名称或路径。
源目录必须满足以下任一条件:
- 目录本身包含 ;
SKILL.md - 目录的一级子目录中包含一个或多个 。
SKILL.md
Users may provide:
- Skill name: ;
dbs-hook - Relative path: ;
skills/dbs-hook - Absolute path: ;
/Users/.../dbskill/skills/dbs-hook - External Skill: ;
/Users/.../external-skills/lark-doc - Skill collection directory: ;
/Users/.../dbskill/skills - The Skill that was just created or modified in the current context.
Determine the source by the following priority:
- If the user provides an absolute path, use it directly;
- If the user provides a relative path, first resolve it based on the current working directory, then based on the dbskill repository root directory;
- If the user only provides a Skill name, first check the current working directory, then check in the dbskill repository;
skills/<name> - If the user only says "this Skill", use the Skill that was just created, renamed, or discussed in the current conversation;
- If still uncertain, check the most recently modified Skill in the current working directory and the repository's directory;
skills/ - If still unable to determine, ask only one question:
Which Skill to install? Give me the Skill name or path.
The source directory must meet one of the following conditions:
- The directory itself contains ;
SKILL.md - One or more of the directory's first-level subdirectories contain .
SKILL.md
执行安装
Execute Installation
在 dbskill 仓库根目录运行:
bash
skills/dbs-install-skill/scripts/install-skill.sh link <skill-name-or-path>示例:
bash
skills/dbs-install-skill/scripts/install-skill.sh link dbs-hook
skills/dbs-install-skill/scripts/install-skill.sh link skills/my-custom-skill
skills/dbs-install-skill/scripts/install-skill.sh link skills
skills/dbs-install-skill/scripts/install-skill.sh link "/absolute/path/to/skill"
skills/dbs-install-skill/scripts/install-skill.sh link "/Users/me/external-skills"执行完成后,根据脚本输出回报公共入口、专属入口、Grok 适配层和冗余清理结果。
Run in the dbskill repository root directory:
bash
skills/dbs-install-skill/scripts/install-skill.sh link <skill-name-or-path>Examples:
bash
skills/dbs-install-skill/scripts/install-skill.sh link dbs-hook
skills/dbs-install-skill/scripts/install-skill.sh link skills/my-custom-skill
skills/dbs-install-skill/scripts/install-skill.sh link skills
skills/dbs-install-skill/scripts/install-skill.sh link "/absolute/path/to/skill"
skills/dbs-install-skill/scripts/install-skill.sh link "/Users/me/external-skills"After execution, report the results of public entries, exclusive entries, Grok adaptation layers, and redundancy cleanup based on the script output.
查看状态
Check Status
用户问“装好了吗”“有没有重复”“查看安装状态”时运行:
bash
skills/dbs-install-skill/scripts/install-skill.sh status <skill-name-or-path>状态正常时,脚本必须输出:
text
✓ 未发现冗余入口公共兼容客户端的专属目录中仍有同源软链时,状态返回失败并报告:
text
✗ 发现冗余入口:<target> -> <source>Run the following when users ask "Is it installed?", "Are there duplicates?", or "Check installation status":
bash
skills/dbs-install-skill/scripts/install-skill.sh status <skill-name-or-path>When the status is normal, the script must output:
text
✓ No redundant entries foundIf there are still symbolic links from the same source in the exclusive directories of public-compatible clients, the status returns failure and reports:
text
✗ Redundant entries found: <target> -> <source>卸载 Skill
Uninstall Skill
用户说“卸载 Skill”“取消安装”“unlink”时运行:
bash
skills/dbs-install-skill/scripts/install-skill.sh unlink <skill-name-or-path>完成后告诉用户:源 Skill 没有被删除,只移除了公共入口、专属入口和 Grok 适配层等派生产物。
Run the following when users say "Uninstall Skill", "Cancel installation", or "unlink":
bash
skills/dbs-install-skill/scripts/install-skill.sh unlink <skill-name-or-path>After completion, inform the user: The source Skill has not been deleted; only derived products such as public entries, exclusive entries, and Grok adaptation layers have been removed.
输出规范
Output Specifications
安装完成后简短回报:
markdown
已安装 `<skill-name>`:
- 公共入口:`~/.agents/skills/<skill-name>`;
- 专属入口:仅写入本机已安装且仍需要专属目录的 Agent;
- Grok:`~/.grok/skills/<skill-name>/SKILL.md`(本机存在时);
- 去重:已清理指向同一真源的历史冗余软链。遇到真实目录或其他来源时:
markdown
已保留 `<target-path>`,因为它是一个真实目录、真实文件或指向其他来源。需要你手动确认后再处理。After installation, report briefly:
markdown
Installed `<skill-name>`:
- Public entry: `~/.agents/skills/<skill-name>`;
- Exclusive entries: Only written to Agents that are installed locally and still require exclusive directories;
- Grok: `~/.grok/skills/<skill-name>/SKILL.md` (if present locally);
- Deduplication: Historical redundant symbolic links pointing to the same actual source have been cleaned up.When encountering real directories or other sources:
markdown
Retained `<target-path>` because it is a real directory, real file, or points to another source. Please manually confirm before processing.自检
Self-Check
每次执行前后确认:
- 源目录存在;
- 源目录包含 ,或其一级子目录包含
SKILL.md;SKILL.md - 外部路径使用绝对路径,或能从当前工作目录解析;
- 是公共规范入口;
~/.agents/skills/<name> - Codex 等公共兼容客户端的专属目录中没有同源软链;
- 专属宿主目标位置若存在,必须是软链才允许更新;
- Grok 目标位置若存在,必须是本工具生成的 Grok 适配层才允许更新;
- 真实目录、真实文件和其他来源软链没有被删除;
- 源目录没有被删除;
- 与
private/没有被读取、复制、暂存或安装。.private/
完成当前任务后直接结束。只有用户明确询问下一步,且当前环境已经安装 时,简短提示:「下一步不确定时,可以输入 。」
/dbs/dbsConfirm the following before and after each execution:
- The source directory exists;
- The source directory contains , or its first-level subdirectories contain
SKILL.md;SKILL.md - External paths use absolute paths or can be resolved from the current working directory;
- is the public standard entry;
~/.agents/skills/<name> - There are no symbolic links from the same source in the exclusive directories of public-compatible clients like Codex;
- If the target location for exclusive hosts exists, it must be a symbolic link to allow updates;
- If the Grok target location exists, it must be a Grok adaptation layer generated by this tool to allow updates;
- Real directories, real files, and symbolic links from other sources are not deleted;
- The source directory is not deleted;
- and
private/are not read, copied, staged, or installed..private/
End directly after completing the current task. Only when the user explicitly asks about the next step and is already installed in the current environment, briefly prompt: "If you're unsure about the next step, you can enter ."
/dbs/dbs