Skip to content
中文

Installing a skill: a directory copy

Claude Code reads skills from ~/.claude/skills/, a folder per skill, such as ~/.claude/skills/pdf-tools/. Codex reads ~/.agents/skills/, and ~/.codex/skills/ for older setups. A skill is its folder: SKILL.md, scripts and all. For Codex to see a Claude Code skill, that folder has to exist in one of Codex’s locations.

  1. Find the source. In the extension’s detail panel, you pick a target under Install to Agent. Agents that already hold a copy of this skill in that scope show as installed. An agent with a same-named skill from another source looks installable, but HarnessKit skips it: clicking it shows “Nothing to install on Codex”. HarnessKit finds the skill’s folder in the source agent: SKILL.md and everything beside it.
  2. Copy. HarnessKit copies the folder and everything inside it, including subfolders and scripts. It skips .git folders and symbolic links, which are pointers to files stored elsewhere.
  3. Place. The copy goes into the target agent’s first skill folder for the scope you picked. For Codex at global scope, that is ~/.agents/skills/. Hermes asks you to pick a category folder under ~/.hermes/skills/ instead. A bulk install doesn’t ask: it uses the first category in alphabetical order, or local if there is none.
  4. Record the source. If the original has a recorded source, such as a Git repo, the new copy gets it too. So does every other detected agent that reads the same folder.
  5. Update. When Check Updates finds a newer version, updating rewrites every copy with that name in the same scope, in every agent. That includes a copy installed from another source. New files overwrite old ones, and extra files stay. Every copy’s recorded source is then set to this one.
  6. Disable. Disabling renames SKILL.md to SKILL.md.disabled, or <name>.md to <name>.md.disabled. It renames every copy with that name in that scope, in every agent. A Hermes copy stays as it is, and its name goes on the skills.disabled list in ~/.hermes/config.yaml.
  7. Delete. Deleting removes one agent’s folder. Other agents’ copies stay, unless they read that same folder.

Before the install, only Claude Code has the skill:

  • Directory~/
    • Directory.claude/
      • Directoryskills/
        • Directorypdf-tools/
          • SKILL.md
          • Directoryscripts/
            • extract.py
    • Directory.agents/
      • Directoryskills/
        • …
    • Directory.codex/
      • config.toml

After you install it to Codex at global scope:

  • Directory~/
    • Directory.claude/
      • Directoryskills/
        • Directorypdf-tools/
          • SKILL.md
          • Directoryscripts/
            • extract.py
    • Directory.agents/
      • Directoryskills/
        • Directorypdf-tools/ the new, independent copy
          • SKILL.md
          • Directoryscripts/
            • extract.py
    • Directory.codex/
      • config.toml

The new copy also shows up in every other agent that reads ~/.agents/skills/, such as Gemini CLI and Cursor.

To copy several extensions at once, tick their rows on the Extensions page and click Install to agents. Pick a scope under Install to scope, then the Target agents. Each pair runs the same steps as above. Pairs that can’t run are skipped, and the summary lists each one with its reason, such as “already installed” or, for a plugin, “agent-specific”. Stop ends the run after the copy in progress.

By default, an agent that already has a skill with that name in the scope is skipped. With Overwrite existing copies, every target agent gets the most recently modified copy instead, and the agent that holds that copy is left alone.

  • crates/hk-core/src/deployer.rs copies the folder and decides what to skip.
  • crates/hk-core/src/service.rs runs the install, passes the recorded source to agents that share a folder, and deletes one copy.
  • src/lib/install-plan.ts decides which installs to run or skip, and which copy Overwrite uses.
  • crates/hk-core/src/adapter/ has one file per agent, listing its skill folders. The first one is the install target.
  • crates/hk-desktop/src/commands/extensions.rs writes an update to every copy in the same scope.