Purpose: Step-by-step guide to create custom subagents
/agents in Claude CodeCreate file at ~/.claude/agents/ (personal) or .claude/agents/ (project):
---
name: code-reviewer
description: Reviews code for quality and best practices
tools: Read, Glob, Grep
model: sonnet
---
You are a code reviewer. Analyze code and provide specific,
actionable feedback on quality, security, and best practices.
Restart session or use /agents to load.
claude --agents '{
"code-reviewer": {
"description": "Expert code reviewer",
"prompt": "You are a senior code reviewer...",
"tools": ["Read", "Grep", "Glob", "Bash"],
"model": "sonnet"
}
}'
Session-only, not saved to disk.
.md)../concepts/subagents-system.md - Subagents overview../lookup/subagent-frontmatter.md - All configuration fields../examples/subagents/ - Example subagentsReference: https://docs.anthropic.com/en/docs/claude-code/sub-agents