dbs-install-skill

dbs-install-skill

Popular

Installs a single Skill or a collection of Skills to General Agents, Claude Code, Codex, WorkBuddy, Grok, Hermes Agent, Kiro, Qwen Code, Cline, and other Agents. Use when users ask to install, synchronize, view, deduplicate, or uninstall Skills across multiple Agents.

9.8Kstars
1.1Kforks
Updated 8/30/2026
SKILL.md
read-only
name
dbs-install-skill
description

Installs a single Skill or a collection of Skills to General Agents, Claude Code, Codex, WorkBuddy, Grok, Hermes Agent, Kiro, Qwen Code, Cline, and other Agents. Use when users ask to install, synchronize, view, deduplicate, or uninstall Skills across multiple Agents.

dbs-install-skill: Multi-Agent Skill Installation and Synchronization

Install any Skill source directory containing SKILL.md, or a collection directory containing multiple Skill subdirectories, onto existing local Agents.

Users always execute the same command interface. The script automatically determines whether to use the universal entry point or dedicated entry points; users do not need to identify the host platform or specify execution modes.


Automatic Routing

Universal Entry Point

The script always writes Skill symlinks to:

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

The following clients read directly from this universal entry point and no longer require individual symlinks in their custom directories:

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

A Skill will not appear in both ~/.agents/skills and the dedicated directories of the above clients simultaneously, preventing duplicate listings in clients such as Codex.

Dedicated Entry Points

The following clients still require dedicated directories. Symlinks are created only 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 Thin Adaptation Layer

If ~/.grok exists locally, the script generates:

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

This file must include user_invocable: true and point to the actual canonical SKILL.md source.

Automatic Cleanup

Whenever link is executed, the script processes legacy items:

  1. Removes redundant symlinks in dedicated directories for universal-compatible clients pointing to the same canonical source;
  2. Removes obsolete host symlinks created by legacy versions of this tool;
  3. Removes old alias symlinks within the same host when the standardized name already exists for the same canonical source;
  4. Removes broken symlinks and Grok adaptation layers that point to deleted or invalid sources during batch installations;
  5. Preserves existing physical directories, actual files, and symlinks pointing to external sources, while reporting conflicts;
  6. Does not delete the source Skill.

Core Principles

  1. Single Universal Entry Point. Clients that support the general Agents directory read unified definitions from ~/.agents/skills.
  2. Dedicated Entry Points When Required. Symlinks are generated only for clients that still depend on native directories.
  3. No Selection Required. Users do not need to pass routing options or mode parameters.
  4. Single Instance for Universal-Compatible Clients. Clients like Codex must not have entries in both universal and dedicated directories.
  5. Symlinks for All Hosts. Grok is the only host utilizing a thin adaptation file instead of a direct symlink.
  6. Do Not Create Non-existent Agent Directories. ~/.agents is the standard entry point and may be created by the script; other Agent home directories are skipped if they do not exist.
  7. Do Not Overwrite Physical Directories. If a real directory or file exists at the target location, retain it and log a conflict.
  8. Uninstall Removes Only Derivative Artifacts. Running unlink deletes only symlinks pointing to the specified canonical source and generated Grok adaptation layers.
  9. Use Included Script. Always use scripts/install-skill.sh included in this Skill rather than improvising shell commands.

Resolving the Source Skill

Users may supply:

  • Skill name: dbs-hook
  • Relative path: skills/dbs-hook
  • Absolute path: /Users/.../dbskill/skills/dbs-hook
  • External Skill path: /Users/.../external-skills/lark-doc
  • Skill collection directory: /Users/.../dbskill/skills
  • A Skill created or modified in the current conversation context.

Resolve input using the following priority order:

  1. Use the path directly if an absolute path is provided;
  2. If a relative path is provided, resolve against the current working directory first, then against the root of the dbskill repository;
  3. If only a Skill name is provided, check the current working directory first, then check skills/<name> within the dbskill repository;
  4. If the user refers to "this Skill", select the Skill created, renamed, or discussed in the current session;
  5. If still unresolved, check the most recently modified Skill under the working directory or skills/;
  6. If resolution fails, prompt the user: 安装哪个 Skill?给我 Skill 名称或路径。

The source directory must satisfy at least one condition:

  • The directory contains a SKILL.md file;
  • Top-level subdirectories contain one or more SKILL.md files.

The target entry name is primarily derived from the name field in the source SKILL.md frontmatter; it falls back to the source directory name only if name is missing. This allows directory names to use categorical prefixes while maintaining stable invocation names across Agents.


Execution

Run the following from the root of the dbskill repository:

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

Examples:

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"

Upon completion, summarize the status of universal entries, dedicated entries, Grok adaptation layers, and deduplication cleanups based on script output.


Checking Status

To verify status or inspect duplicates, run:

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

When clean, the script returns:

✓ 未发现冗余入口

If redundant symlinks are detected in dedicated directories of universal-compatible clients, it reports:

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

Uninstalling Skills

To remove or unbind a Skill, run:

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

Inform the user that the source Skill remains untouched; only derivative symlinks, universal entries, dedicated entries, and Grok adaptation files were removed.


Output Guidelines

Provide a concise summary after installation:

Installed `<skill-name>`:

- Universal Entry: `~/.agents/skills/<skill-name>`
- Dedicated Entry: Written only for installed local Agents requiring dedicated paths
- Grok: `~/.grok/skills/<skill-name>/SKILL.md` (if `~/.grok` exists)
- Deduplication: Cleaned legacy duplicate links pointing to the same canonical source

When encountering existing files or non-managed symlinks:

Preserved `<target-path>` because it is a physical directory, regular file, or points to a different source. Manual confirmation is required before modifying.

Self-Check Checklist

Verify before and after execution:

  • The source directory exists;
  • The directory or its immediate subdirectories contain SKILL.md;
  • The entry name matches name in the canonical SKILL.md frontmatter, falling back to directory name only when absent;
  • External paths are absolute or resolvable from the working directory;
  • ~/.agents/skills/<name> is the canonical entry point;
  • No redundant symlinks exist in dedicated directories for universal-compatible clients like Codex;
  • Target paths for dedicated hosts are replaced only if they are existing symlinks;
  • Grok targets are updated only if they match generated adaptation files;
  • Physical directories, regular files, and external symlinks were preserved;
  • Source directories were not removed;
  • private/ and .private/ paths were not read, copied, staged, or installed.

End execution immediately after completing the task. Prompt with "If you are unsure of the next step, type /dbs." only when explicitly requested by the user and /dbs is verified as installed in the environment.