What problem does it solve?
Create new Claude Code custom agents (subagents) to enable delegation and specialized automation. Use when: (1) User wants to create a new custom agent, (2) User says 'create agent', 'new agent', 'make subagent', (3) User wants a specialized agent for delegation. Covers: agent file format, YAML frontmatter fields, tool restrictions, model selection, permission modes, persistent memory, and placement.
Core Features & Use Cases
- Frontmatter fields: name, description, model, tools, disallowedTools, permissionMode, maxTurns, skills, mcpServers, hooks, memory, color.
- Workflow: understand purpose, choose appropriate settings (model, tools, memory, permissions), create the agent file with a template, and verify frontmatter syntax and placement.
- Templates & Placement: provides a YAML frontmatter template and guidance for placing agent files under ~/.claude/agents/ (global) or .claude/agents/ (project-specific).
- Restrictions: subagents cannot spawn other subagents; keep body focused to serve as the system prompt for the agent.
Quick Start
Create a new agent file with a YAML frontmatter template at the appropriate claude agents directory and fill in the name, description, and optional fields.