SuperAPI AI Directory

dbs-install-skill

Agents & models

View repository

Updated 10-15 21:12

About this skill

dbs-install-skill: Multi-target Skill installation and syncing

Install any Skill source directory containing SKILL.md , or a collection directory containing multiple Skill subdirectories, into Agents that already exist on the local machine.

The user always uses the same command. The script automatically selects the common entry point or the dedicated entry point; the user does not need to determine the host type or add a mode parameter.


Automatic routing

Common entry point

The script always writes the Skill link to:

  • General-purpose Agents:~/.agents/skills/<skill-name>

The following clients can read this common entry point, so links are no longer written to their respective dedicated directories:

  • Codex;
  • GitHub Copilot;
  • Gemini CLI;
  • Cursor;
  • Augment;
  • Roo Code;
  • OpenCode;
  • OpenHands。

The same Skill will not appear simultaneously in ~/.agents/skills and the dedicated directories of the above clients. This avoids duplicate display in clients such as Codex.

Dedicated entry points

The following clients still use dedicated directories for now. The script creates links only when 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>。

Unix-like systems use symbolic links; Windows Bash/MSYS environments use directory junctions, to avoid ln -s generating physical directory copies under some configurations.

Grok thin adapter layer

When ~/.grok exists on the local machine, the script generates:

  • ~/.grok/skills/<skill-name>/SKILL.md

This file must contain user_invocable: true, and point to the true source SKILL.md。

Automatic cleanup

Each time link is executed, the script also handles historical leftovers:

  1. Delete redundant links in the dedicated directories of common-entry-point-compatible clients that point to the same true source;
  2. Delete host links that were written by older versions of the script and are no longer maintained;
  3. Delete old aliases on the same host that point to the same true source and whose canonical name already exists;
  4. During collection installation, delete broken links and Grok adapter layers that point to source directories within the collection that no longer exist;
  5. Keep real directories, real files, and links pointing to other sources, and report conflicts;
  6. Do not delete the source Skill.

Core principles

  1. One common entry point. Clients that support the general-purpose Agents directory uniformly read ~/.agents/skills。
  2. Add dedicated entry points when necessary. Create links only for clients that still rely on native directories.
  3. The user does not need to choose a mode. The script does not require the user to provide routing parameters.
  4. Keep only one copy for common-compatible clients. Clients such as Codex cannot have both a common entry point and a dedicated entry point at the same time.
  5. Each host uses links only. Windows uses directory junctions, Unix-like systems use symbolic links; Grok is the only host that uses a thin adapter layer.
  6. Do not create Agent home directories that do not exist. ~/.agents is the common installation entry point and can be created by the script; other Agent home directories are skipped directly if they do not exist.
  7. Do not overwrite real directories. If a real directory or file already exists at the target location, keep it and report it; on Windows, indicate that it may be a physical copy generated by an older version of MSYS.
  8. Uninstallation deletes only derived artifacts. unlink Only delete symbolic links or junctions pointing to the specified true source, as well as the Grok adapter layer generated by this tool.
  9. Prefer using the script. Use this Skill's bundled scripts/install-skill.sh, and do not rewrite the installation command on the spot.

Determine the source Skill

The user 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;
  • A Skill that was just created or just modified in the current context.

Determine in the following priority order:

  1. If the user gave an absolute path, use it directly;
  2. If the user gave a relative path, first resolve it against the current working directory, then resolve it against the dbskill repository root;
  3. If the user gave only a Skill name, first search the current working directory, then search the dbskill repository skills/<name>;
  4. If the user only says "this Skill", use the Skill that was just created, renamed, or discussed in the current conversation;
  5. If still uncertain, check the current working directory and the most recently modified Skill under the repository skills/ ;
  6. If it still cannot be determined, ask only one question:安装哪个 Skill?给我 Skill 名称或路径。

The source directory must satisfy any one of the following conditions:

  • The directory itself contains SKILL.md;
  • One or more of the directory's first-level subdirectories contain SKILL.md。

For the entry name, preferentially read the true source SKILL.md in the frontmatter name; only name When it is missing, fall back to the source directory name. This way the source directory can use a category prefix, while each Agent still keeps a stable historical trigger name.


Perform the installation

Run in the dbskill repository root:

skills/dbs-install-skill/scripts/install-skill.sh link <skill-name-or-path>

Example:

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 completes, report the public entry, dedicated entry, Grok adaptation layer, and redundant cleanup results based on the script output.


Check status

When the user asks "Is it installed?" "Are there duplicates?" or "Check installation status", run:

skills/dbs-install-skill/scripts/install-skill.sh status <skill-name-or-path>

When the status is normal, the script must output:

✓ 未发现冗余入口

When a same-source link still exists in the dedicated directory of a public compatible client, the status returns failure and reports:

✗ 发现冗余入口:<target> -> <source>

Uninstall the Skill

When the user says "uninstall the Skill", "cancel installation", or "unlink", run:

skills/dbs-install-skill/scripts/install-skill.sh unlink <skill-name-or-path>

After completion, tell the user: the source Skill was not deleted; only derived artifacts such as the public entry, dedicated entry, and Grok adaptation layer were removed.


Output specification

After installation completes, report briefly:

已安装 `<skill-name>`:

- 公共入口:`~/.agents/skills/<skill-name>`;
- 专属入口:仅写入本机已安装且仍需要专属目录的 Agent;
- Grok:`~/.grok/skills/<skill-name>/SKILL.md`(本机存在时);
- 去重:已清理指向同一真源的历史冗余链接。

When encountering a real directory or another source:

已保留 `<target-path>`,因为它是一个真实目录、真实文件或指向其他来源。需要你手动确认后再处理。

Self-check

Before and after each execution, confirm:

  • The source directory exists;
  • The source directory contains SKILL.md, or its first-level subdirectory contains SKILL.md;
  • The entry name matches the true source frontmatter name is consistent; only when name is missing, use the source directory name;
  • The external path uses an absolute path, or can be resolved from the current working directory;
  • ~/.agents/skills/<name> is the public canonical entry;
  • There is no same-source link in the dedicated directory of a public compatible client such as Codex;
  • If the dedicated host target location exists, it must be a symbolic link or Junction pointing to the current true source;
  • If the Grok target location exists, it may be updated only if it is a Grok adaptation layer generated by this tool;
  • Real directories, real files, and links from other sources have not been deleted;
  • The source directory has not been deleted;
  • private/ and .private/ have not been read, copied, staged, or installed.

End directly after completing the current task. Only when the user explicitly asks about the next step, and the current environment already has /dbs installed, briefly prompt: "When unsure about the next step, you can enter /dbs。」