kasetto

Subagents

Share subagents across Claude Code, Cursor, Copilot, Codex, Gemini CLI, OpenCode, and more from one Claude Code-format source.

Kasetto can sync subagents, the specialized agents a coding tool delegates a task to, into every tool that defines them as files. A subagent is authored once in Claude Code's format, then rewritten into each tool's native file on the fly, keeping only the fields that tool understands.

Source Format

A subagent repository contains a flat agents/ directory. Each subagent is one Markdown file with YAML frontmatter, and the body is the subagent's prompt:

---
name: code-reviewer
description: Reviews a diff for bugs and risky changes. Use after a change is ready.
tools: Read, Grep, Glob, Bash
model: inherit
---
You review code. Read the diff, then report each bug with its file and line.
  • description is required, since every tool picks a subagent by it
  • name defaults to the file stem (agents/code-reviewer.md -> code-reviewer) and must not contain :
  • The body must not be empty
  • agents/ is not namespaced: files in subdirectories and a README.md are not discovered

The installed file is always named after the config name (the file stem), whatever name: says.

Config

agents:
  - source: https://github.com/cursor/plugins
    sub-dir: harness/pstack/claude-code   # optional - discovery root inside the source repository
    agents:
      - poteto-agent
      - comment-sicko
 
  - source: https://github.com/me/my-agents
    ref: v1.0
    agents: "*"            # every agents/*.md in the source
 
  - source: https://github.com/acme/monorepo
    branch: main
    agents:
      - name: reviewer
        path: team/agents  # -> team/agents/reviewer.md in the source

The agents field accepts the same shapes as commands:

  • "*": discover every .md file directly under agents/
  • A list of names, each resolving to agents/<name>.md
  • A list of { name, path } objects, resolving to <path>/<name>.md

source, branch, ref, and sub-dir work exactly as they do for skill sources. kst add <source> --agent <name> and kst remove <source> --agent <name> edit the list for you, and kst list --type agents shows what is installed.

The example above installs the two subagents pstack ships for Claude Code: poteto-agent sets Cursor's is_background: true, and comment-sicko has only a name and a description.

Per-Tool Output

Kasetto writes each subagent into the directory the tool reads, in the shape it expects. Global paths are relative to $HOME, project paths to the project root. Every source field not listed under "Carries" is dropped.

ToolGlobal directoryProject directoryFileCarriesDocs
claude-code~/.claude/agents/.claude/agents/<name>.mdThe source verbatim, with name added when absentClaude Code
cursor~/.cursor/agents/.cursor/agents/<name>.mdname, description, model: inherit, readonly; background: true becomes is_background: trueCursor
github-copilot~/.copilot/agents/.github/agents/<name>.agent.mdname, description, tools (Claude tool names are Copilot aliases)GitHub
codex~/.codex/agents/.codex/agents/<name>.tomlname, description, and the body as developer_instructionsCodex
gemini-cli~/.gemini/agents/.gemini/agents/<name>.mdname (slugified), description, model: inherit, tools mapped to Gemini names (read_file, run_shell_command, ...)Gemini CLI
opencode~/.config/opencode/agents/.opencode/agents/<name>.mddescription plus mode: subagent; the filename is the nameOpenCode
augment~/.augment/agents/.augment/agents/<name>.mdname, description, color, model, tools mapped to Auggie's built-ins, disallowedTools as disabled_toolsAugment
cline~/.cline/agents/.cline/agents/<name>.yaml (frontmatter and body)name, description, tools mapped to Cline tool idsCline source
goose~/.goose/agents/.goose/agents/<name>.mdname, descriptionGoose
junie~/.junie/agents/.junie/agents/<name>.mdname (slugified), description, model, tools and disallowedTools limited to the names Junie shares, maxTurns, skillsJunie
kiro-cli~/.kiro/agents/.kiro/agents/<name>.mdname, description, tools mapped to read, write, shell, webKiro
openhands~/.openhands/agents/.openhands/agents/<name>.mdname, description, tools mapped to file_editor, terminal, task_trackerOpenHands
trae~/.trae/agents/.trae/agents/<name>.mdname (slugified), description, tools and disallowedTools limited to Trae's names, as a comma-separated stringTrae
zcode~/.zcode/agents/-<name>.mdname, description, model: inherit, tools and disallowedTools limited to ZCode's namesZCode

A few rules apply across the table:

  • model is kept as-is only for Augment and Junie. Cursor, Gemini CLI, and ZCode keep only model: inherit, and every other tool drops model, because a Claude alias such as sonnet means nothing there
  • A tool argument form such as Bash(git *) maps by its base name, Bash, and the warning says the argument restriction is lost: the agent can then run any shell command, not only git
  • mcp__server__tool entries survive only for Trae and ZCode, the two tools that accept them
  • A slugified name is lowercase a-z, 0-9, and - only, for the loaders that reject anything else

Dropped Fields

A slugified name that changed is reported the same way. When a non-empty tools list maps to nothing at all, the key is omitted and the warning says so: that subagent then gets every tool, not none.

Tools Without Subagent Support

These tools are skipped for subagents. kst doctor lists a configured one as an advisory warning (for example windsurf has no subagent support; agents are skipped for it) without changing its exit code.

  • amp: subagents are TypeScript plugins, not files (Amp)
  • antigravity: has file subagents, but the semantics of their tools default of [] are undocumented, so it is left out for now (Antigravity)
  • continue: subagents are model entries inside config.yaml, behind a beta flag (Continue source)
  • openclaw: sub-agents are runtime spawns of agents defined in its gateway config (OpenClaw)
  • pi: subagents exist only through extensions, not in core (Pi)
  • replit: no user-defined subagents (Replit)
  • roo: discontinued, and its modes were personas in one aggregate file (Roo Code)
  • warp: the local agent has no file subagents; named agents are cloud factory agents (Warp)
  • windsurf: subagents belong to Devin Local in Devin Desktop, not to Cascade (Devin Local)

ZCode documents only user-level subagents, so it is skipped under scope: project.

Caveats

  • Cursor, VS Code Copilot, and Goose also read .claude/agents/. With claude-code configured alongside one of them, that tool sees the same subagent twice. Cursor documents that .cursor/ wins over .claude/, and Goose scans .goose/agents/ before .claude/agents/ and keeps the first it finds. VS Code reads both .claude/agents/ and ~/.claude/agents/ without documenting which copy wins; the Copilot CLI reads only the project .claude/agents/
  • Gemini CLI asks you to acknowledge each project subagent, and asks again whenever its content changes, so a sync that updates one re-prompts. Project subagents also load only in a trusted folder, and on the first run a same-named user subagent wins over an unacknowledged project copy
  • Trae subagents are a beta toggle: Settings > Beta > Subagents > Enable Subagents Directory. The global path is unverified: Trae's docs name ~/.trae-cn/agents/ (the CN edition's home), while Kasetto writes ~/.trae/agents/, where every other Trae asset lives
  • OpenCode treats an agent without mode as a primary persona, not a delegate. Kasetto adds mode: subagent so the main agent can hand work to it
  • Codex takes TOML, not Markdown. The body becomes developer_instructions, and every frontmatter field other than name and description is dropped
  • Audit: kst audit and the sync gate list subagents, always as unverified (no audit source for agents), since skills.sh verdicts belong to one skill, not to a repository. They never breach a severity threshold and fail only under fail-on-unverified

Stale-File Safety

Kasetto only deletes files it claims to own in the lock file. Your own subagent files in the same directories are preserved even when a subagent is removed from your config, and kst doctor lists them as untracked.

On this page