AI Subagents Generator
Build specialist subagent files — YAML frontmatter, tool scoping, and model selection — for .claude/agents/, .cursor/agents/, and .codex/agents/. Plus an optional companion slash command. Everything runs in your browser.
1 Start from a Role Optional template
The orchestrator reads this to decide when to delegate. Be specific and action-oriented — phrases like Use PROACTIVELY after writing code make the subagent trigger on its own. Vague descriptions never fire.
5 Tool Scoping Claude Code
6 Cursor & Codex Options Cursor / Codex exports
Structure it like a system prompt: who the agent is, the process it follows, and the exact output format you want back. Keep it focused — one clear responsibility per subagent.
8 Companion Slash Command Optional
9 Scope Where it lives
Where to place your file
my-project/
├── .claude/
│ ├── agents/
│ │ └── code-reviewer.md ← the subagent definition
│ └── commands/
│ └── code-reviewer.md ← optional slash command
└── ...
Where each tool looks for subagents:
.claude/agents/Claude Code — project, shared via git
.cursor/agents/Cursor — project (also reads .claude/ & .codex/)
.codex/agents/Codex — project
~/.claude/agents/User — every project on your machine
Frequently asked questions
Quick answers about subagents, tool scoping, and how the same file works across Claude Code, Cursor, and Codex.
What is a subagent?
A markdown file with YAML frontmatter that defines a specialist AI assistant — a name, a description, an optional model and tool list, and a system prompt. The main agent can delegate work to it, and it runs in its own context window, so long research or verbose command output never clutters your main conversation.
Where do subagent files live?
Project subagents live in .claude/agents/ (Claude Code), .cursor/agents/ (Cursor), or .codex/agents/ (Codex) and are shared with your team via git. User-level subagents live in ~/.claude/agents/, ~/.cursor/agents/, or ~/.codex/agents/ and apply across all your projects. Cursor also reads .claude/agents/ and .codex/agents/ for compatibility, with .cursor/ winning on name conflicts.
How does automatic delegation work?
The orchestrating agent reads each subagent's description field to decide when to hand work off. Specific, action-oriented descriptions like "Use PROACTIVELY to review code right after writing or modifying it" trigger reliably. Vague descriptions rarely fire. You can also invoke a subagent explicitly by name.
What does the tools field do?
In Claude Code, the tools field limits which tools the subagent can use. A code reviewer only needs Read, Grep, Glob, Bash — it shouldn't be editing your files. Omit the field entirely and the subagent inherits every tool. Cursor uses a readonly flag instead of a tool list.
Subagent vs. skill vs. slash command — which do I need?
A slash command is a reusable prompt you trigger manually — it runs in your main context window. A skill is domain knowledge that loads on demand. A subagent is a separate worker with its own context window, tools, and model that the orchestrator can spawn automatically. Rule of thumb: repeated prompt → slash command, domain workflow → skill, automatic specialist → subagent.
Does the same file work in Claude Code, Cursor, and Codex?
Claude Code and Cursor both read markdown files with name and description frontmatter — Claude Code adds a tools field for tool scoping, Cursor adds readonly and is_background flags. Codex uses TOML files (.codex/agents/*.toml) with name, description, and developer_instructions instead. The export tabs above emit a correctly-shaped file for each tool so you don't have to remember the differences.
Is anything I type sent to a server?
No. The entire generator runs client-side in your browser. Nothing you type leaves the page.