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:
descriptionis required, since every tool picks a subagent by itnamedefaults 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 aREADME.mdare not discovered
The installed file is always named after the config name (the file stem), whatever name: says.
Config
The agents field accepts the same shapes as commands:
"*": discover every.mdfile directly underagents/- 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.
| Tool | Global directory | Project directory | File | Carries | Docs |
|---|---|---|---|---|---|
| claude-code | ~/.claude/agents/ | .claude/agents/ | <name>.md | The source verbatim, with name added when absent | Claude Code |
| cursor | ~/.cursor/agents/ | .cursor/agents/ | <name>.md | name, description, model: inherit, readonly; background: true becomes is_background: true | Cursor |
| github-copilot | ~/.copilot/agents/ | .github/agents/ | <name>.agent.md | name, description, tools (Claude tool names are Copilot aliases) | GitHub |
| codex | ~/.codex/agents/ | .codex/agents/ | <name>.toml | name, description, and the body as developer_instructions | Codex |
| gemini-cli | ~/.gemini/agents/ | .gemini/agents/ | <name>.md | name (slugified), description, model: inherit, tools mapped to Gemini names (read_file, run_shell_command, ...) | Gemini CLI |
| opencode | ~/.config/opencode/agents/ | .opencode/agents/ | <name>.md | description plus mode: subagent; the filename is the name | OpenCode |
| augment | ~/.augment/agents/ | .augment/agents/ | <name>.md | name, description, color, model, tools mapped to Auggie's built-ins, disallowedTools as disabled_tools | Augment |
| cline | ~/.cline/agents/ | .cline/agents/ | <name>.yaml (frontmatter and body) | name, description, tools mapped to Cline tool ids | Cline source |
| goose | ~/.goose/agents/ | .goose/agents/ | <name>.md | name, description | Goose |
| junie | ~/.junie/agents/ | .junie/agents/ | <name>.md | name (slugified), description, model, tools and disallowedTools limited to the names Junie shares, maxTurns, skills | Junie |
| kiro-cli | ~/.kiro/agents/ | .kiro/agents/ | <name>.md | name, description, tools mapped to read, write, shell, web | Kiro |
| openhands | ~/.openhands/agents/ | .openhands/agents/ | <name>.md | name, description, tools mapped to file_editor, terminal, task_tracker | OpenHands |
| trae | ~/.trae/agents/ | .trae/agents/ | <name>.md | name (slugified), description, tools and disallowedTools limited to Trae's names, as a comma-separated string | Trae |
| zcode | ~/.zcode/agents/ | - | <name>.md | name, description, model: inherit, tools and disallowedTools limited to ZCode's names | ZCode |
A few rules apply across the table:
modelis kept as-is only for Augment and Junie. Cursor, Gemini CLI, and ZCode keep onlymodel: inherit, and every other tool dropsmodel, because a Claude alias such assonnetmeans 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 onlygit mcp__server__toolentries 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
toolsdefault 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/. Withclaude-codeconfigured 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
modeas a primary persona, not a delegate. Kasetto addsmode: subagentso the main agent can hand work to it - Codex takes TOML, not Markdown. The body becomes
developer_instructions, and every frontmatter field other thannameanddescriptionis dropped - Audit:
kst auditand 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 underfail-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.