| name | agent-template |
| description | Generate custom agent from template. Use when creating a new subagent from scratch, or scaffolding an agent file with correct frontmatter. |
| user-invocable | true |
Agent Template Generator
Generate a custom agent file based on requirements.
Usage: /agent-template [agent-name] [purpose]
Templates
| Purpose | Template | Tools | Color | Model |
|---|
| Review/Audit | Reviewer | Read, Grep, Glob, Bash | yellow | inherit |
| Generate/Create | Generator | Read, Write, Grep, Glob | cyan | inherit |
| Fix/Modify | Fixer | Read, Write, Edit, Bash, Grep | red | inherit |
| Test/Validate | Tester | Read, Bash, Grep, Glob | green | inherit |
| Document | Documenter | Read, Write, Grep, Glob | cyan | inherit |
| Orchestrate | Orchestrator | Read, Write, Bash, Grep, Glob, Agent | cyan | haiku |
Process
-
Gather Requirements
- Agent name (lowercase, hyphenated)
- Purpose
- Tools needed
- Model (fable/opus/sonnet/haiku/inherit — inherit is the recommended default)
- Preloaded skills (if any)
-
Select Template based on purpose
-
Generate File at .claude/agents/[name].md
-
Validate with /agent-check
Frontmatter Reference (official fields)
---
name: agent-name
description: >
Use this agent PROACTIVELY when [triggering conditions]. Examples:
<example>
Context: [situation]
user: "[request]"
assistant: "[response]"
<commentary>[why this agent]</commentary>
</example>
color: cyan
model: inherit
effort: medium
tools:
- Read
- Write
- Edit
- Bash
- Grep
- Glob
- Agent
- WebFetch
- WebSearch
- TodoWrite
- NotebookEdit
disallowedTools:
- NotebookEdit
maxTurns: 20
skills:
- linked-skill
memory: project
background: false
isolation: worktree
---
Not supported in filesystem/plugin agent frontmatter — do not emit these:
hooks, mcpServers, permissionMode (security restriction), and forkContext
(not an official field). Agents fork automatically when dispatched.
Reviewer Template Structure
---
name: [name]
description: >
Use this agent PROACTIVELY when [triggering conditions]. Examples:
<example>
Context: [situation]
user: "[request]"
assistant: "[response]"
</example>
color: yellow
tools:
- Read
- Grep
- Glob
- Bash
model: inherit
skills:
- linked-skill
# maxTurns: 20
# memory: project
---
# [Name] Agent
## Activation
When to trigger
## Review Checklist
- [ ] Check items
## Output Format
Report structure
Example
/agent-template security-scanner "scan code for vulnerabilities"
Output: Created .claude/agents/security-scanner.md