Free Tool

Free Claude Code Subagent Generator

A Claude Code subagent generator creates ready-to-paste .claude/agents Markdown files for specialized roles. Pick a template, tune the trigger guidance and tool access, then copy a subagent Claude can delegate to during coding work.

Start from a template

Pick a role, then tune the prompt and tools.

Agent

ToolsOmit for default access, or keep this list tight

code-reviewer.md

19 lines · .claude/agents/

---
name: code-reviewer
description: "Use proactively after code changes to review for bugs, regressions, and missing tests."
tools: Read, Grep, Glob, Bash, Bash(git diff:*), Bash(git status:*)
model: sonnet
---

You are a focused code review subagent.

Review the changed files for correctness, regressions, security issues, and missing tests. Prioritize concrete bugs over style preferences. Ground every finding in a file path and line number when possible.

Return:
1. Critical or high-confidence issues first
2. Test gaps or residual risk
3. A short "no issues found" statement if the patch looks clean

## Handoff
Include the branch status, changed files, and any verification commands already run.
Install in one shell command
mkdir -p .claude/agents && cat > .claude/agents/code-reviewer.md <<'EOF'
---
name: code-reviewer
description: "Use proactively after code changes to review for bugs, regressions, and missing tests."
tools: Read, Grep, Glob, Bash, Bash(git diff:*), Bash(git status:*)
model: sonnet
---

You are a focused code review subagent.

Review the changed files for correctness, regressions, security issues, and missing tests. Prioritize concrete bugs over style preferences. Ground every finding in a file path and line number when possible.

Return:
1. Critical or high-confidence issues first
2. Test gaps or residual risk
3. A short "no issues found" statement if the patch looks clean

## Handoff
Include the branch status, changed files, and any verification commands already run.
EOF

How to create a Claude Code subagent

  1. Choose a subagent role. Start from a template such as code reviewer, test writer, docs maintainer, or migration planner.
  2. Write precise trigger guidance. Describe when Claude should delegate to the subagent so it is selected for the right tasks.
  3. Tune the system prompt and tools. Define the role, standards, output shape, model, and allowed tools for the delegated work.
  4. Copy or download the Markdown file. Use the generated .md file as-is or copy the install snippet for your preferred scope.
  5. Place it in .claude/agents or ~/.claude/agents. Use project scope for shared repo agents and user scope for personal agents available everywhere.

Anatomy of a subagent file

Subagents are Markdown files with YAML frontmatter. The frontmatter names the agent and tells Claude when to use it. The body defines the role, standards, and output format for delegated work.

  • name - lowercase identifier and file name.
  • description - trigger guidance for when Claude should delegate.
  • tools - optional comma-separated tool permissions.
  • model - optional model override for the delegated task.

Frequently Asked Questions

What is a Claude Code subagent?

+

A Claude Code subagent is a specialized assistant definition saved as a Markdown file. It gives Claude a focused role, trigger guidance, tool permissions, and instructions so work can be delegated to a smaller expert context.

Where do Claude Code subagent files go?

+

Project subagents live in .claude/agents/ inside a repository and can be shared with the team. User subagents live in ~/.claude/agents/ and are available across projects on your machine.

What should the description field include?

+

The description should explain exactly when Claude should use the subagent. Write trigger guidance like 'Use proactively after code changes to review bugs and missing tests' rather than a generic role label.

Should a subagent list allowed tools?

+

List tools when the role benefits from tighter permissions, such as a docs-only agent using Read and Edit. Omit the tools field when the default tool access is acceptable for the role.

Can I create multiple subagents for one repo?

+

Yes. Most teams get better results from a small set of focused agents, such as code-reviewer, test-writer, docs-maintainer, and migration-planner, instead of one broad general-purpose subagent.

Subagents help. Repeatable workflows go further.

Claude Code subagents are useful specialists. Tornic turns your Claude, Codex, or Cursor CLI subscription into repeatable workflow runs with clear steps, stable handoffs, and no surprise API bills.

Try Tornic