Free Tool
Claude Code Subagent Generator
Fill in the form and get a ready-to-save subagent file for Claude Code. It follows the official format: YAML frontmatter with name, description, tools, model and color, then the system prompt. Start from a template or write your own.
Templates:
Tools
Subagent file
.claude/agents/code-reviewer.md
--- name: code-reviewer description: Reviews code changes for bugs, security issues and readability. Use right after writing or changing code. tools: Read, Grep, Glob, Bash model: sonnet color: blue --- You are a senior code reviewer. When invoked: 1. Run `git diff` to see what changed. 2. Read the changed files and the code around them. 3. Report problems grouped as: Must fix, Should fix, Nice to have. For each problem give the file and line, why it matters, and a concrete fix. Check for: logic bugs, missing error handling, exposed secrets, unsafe input, unclear names, and missing tests. Do not rewrite files yourself. Keep the report short.
Or save it from the terminal
mkdir -p .claude/agents && cat > .claude/agents/code-reviewer.md <<'EOF' --- name: code-reviewer description: Reviews code changes for bugs, security issues and readability. Use right after writing or changing code. tools: Read, Grep, Glob, Bash model: sonnet color: blue --- You are a senior code reviewer. When invoked: 1. Run `git diff` to see what changed. 2. Read the changed files and the code around them. 3. Report problems grouped as: Must fix, Should fix, Nice to have. For each problem give the file and line, why it matters, and a concrete fix. Check for: logic bugs, missing error handling, exposed secrets, unsafe input, unclear names, and missing tests. Do not rewrite files yourself. Keep the report short. EOF
How to add the subagent to Claude Code
- Copy or download the file, and save it at the path shown above the output.
- Or paste the one-line save command into your terminal from your project folder.
- Start a new Claude Code session, or run
/agentsto see it in the list. - Ask for it by name ("use the code-reviewer subagent to…") or let Claude delegate when a task matches the description.
Frequently asked questions
Save it as a Markdown file in .claude/agents/ inside your project to share it with your team, or in ~/.claude/agents/ to use it in every project on your computer. Claude Code finds files in both folders, including subfolders. If two subagents have the same name, the project one wins over the personal one.
Only name and description are required. name must be unique and cannot contain a colon. description tells Claude when to hand work to the subagent, so write it as a clear trigger. tools, model and color are optional. Leave tools out and the subagent inherits every tool available to subagents.
Use an alias (sonnet, opus, haiku or fable), a full model ID, or inherit to use the same model as your main conversation. If you leave it out, Claude Code picks the model using its normal order, which includes the CLAUDE_CODE_SUBAGENT_MODEL environment variable.
Yes, for most subagents. A reviewer or researcher only needs Read, Grep and Glob, so it can't change files by mistake. Give Edit, Write or Bash only to subagents that must change code or run commands.
Start a new Claude Code session or run /agents so it loads. Claude delegates to it automatically when a task matches the description, or you can ask directly, for example: "Use the code-reviewer subagent to check my last commit."
Yes. It runs entirely in your browser, needs no account, and nothing you type is sent to a server.