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 # Required: lowercase, hyphenated, 3-50 chars
description: > # Required: 200-1000 chars recommended, include <example> blocks.
Use this agent PROACTIVELY when [triggering conditions]. Examples:
<example>
Context: [situation]
user: "[request]"
assistant: "[response]"
<commentary>[why this agent]</commentary>
</example>
color: cyan # Required by Director Mode convention (CI-enforced); optional per spec
model: inherit # Required by Director Mode convention (CI-enforced); optional per spec.
# Valid: fable, opus, sonnet, haiku, inherit, default, best, sonnet[1m],
# opus[1m] (or a full model ID). inherit recommended. NOT opusplan.
effort: medium # Optional: low, medium, high, xhigh, max
tools: # Optional: YAML list (omit = all tools)
- Read
- Write
- Edit
- Bash
- Grep
- Glob
- Agent
- WebFetch
- WebSearch
- TodoWrite
- NotebookEdit
disallowedTools: # Optional: explicit tool blocking
- NotebookEdit
maxTurns: 20 # Optional: max agentic turns before stopping (positive integer)
skills: # Optional: preloaded skill names (list)
- linked-skill
memory: project # Optional: one of user, project, local
background: false # Optional: run the agent in the background (boolean)
isolation: worktree # Optional: run the agent in an isolated git 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
1---2name: agent-template3description: Generate custom agent from template. Use when creating a new subagent from scratch, or scaffolding an agent file with correct frontmatter.4user-invocable: true5---67# Agent Template Generator89Generate a custom agent file based on requirements.1011**Usage**: `/agent-template [agent-name] [purpose]`1213---1415## Templates1617| Purpose | Template | Tools | Color | Model |18|---------|----------|-------|-------|-------|19| Review/Audit | Reviewer | Read, Grep, Glob, Bash | yellow | inherit |20| Generate/Create | Generator | Read, Write, Grep, Glob | cyan | inherit |21| Fix/Modify | Fixer | Read, Write, Edit, Bash, Grep | red | inherit |22| Test/Validate | Tester | Read, Bash, Grep, Glob | green | inherit |23| Document | Documenter | Read, Write, Grep, Glob | cyan | inherit |24| Orchestrate | Orchestrator | Read, Write, Bash, Grep, Glob, Agent | cyan | haiku |2526---2728## Process29301. **Gather Requirements**31 - Agent name (lowercase, hyphenated)32 - Purpose33 - Tools needed34 - Model (fable/opus/sonnet/haiku/inherit — inherit is the recommended default)35 - Preloaded skills (if any)36372. **Select Template** based on purpose38393. **Generate File** at `.claude/agents/[name].md`40414. **Validate** with `/agent-check`4243---4445## Frontmatter Reference (official fields)4647```yaml48---49name: agent-name # Required: lowercase, hyphenated, 3-50 chars50description: > # Required: 200-1000 chars recommended, include <example> blocks.51 Use this agent PROACTIVELY when [triggering conditions]. Examples:52 <example>53 Context: [situation]54 user: "[request]"55 assistant: "[response]"56 <commentary>[why this agent]</commentary>57 </example>58color: cyan # Required by Director Mode convention (CI-enforced); optional per spec59model: inherit # Required by Director Mode convention (CI-enforced); optional per spec.60 # Valid: fable, opus, sonnet, haiku, inherit, default, best, sonnet[1m],61 # opus[1m] (or a full model ID). inherit recommended. NOT opusplan.62effort: medium # Optional: low, medium, high, xhigh, max63tools: # Optional: YAML list (omit = all tools)64 - Read65 - Write66 - Edit67 - Bash68 - Grep69 - Glob70 - Agent71 - WebFetch72 - WebSearch73 - TodoWrite74 - NotebookEdit75disallowedTools: # Optional: explicit tool blocking76 - NotebookEdit77maxTurns: 20 # Optional: max agentic turns before stopping (positive integer)78skills: # Optional: preloaded skill names (list)79 - linked-skill80memory: project # Optional: one of user, project, local81background: false # Optional: run the agent in the background (boolean)82isolation: worktree # Optional: run the agent in an isolated git worktree83---84```8586**Not supported in filesystem/plugin agent frontmatter** — do not emit these:87`hooks`, `mcpServers`, `permissionMode` (security restriction), and `forkContext`88(not an official field). Agents fork automatically when dispatched.8990---9192## Reviewer Template Structure9394```markdown95---96name: [name]97description: >98 Use this agent PROACTIVELY when [triggering conditions]. Examples:99 <example>100 Context: [situation]101 user: "[request]"102 assistant: "[response]"103 </example>104color: yellow105tools:106 - Read107 - Grep108 - Glob109 - Bash110model: inherit111skills:112 - linked-skill113# maxTurns: 20114# memory: project115---116117# [Name] Agent118119## Activation120When to trigger121122## Review Checklist123- [ ] Check items124125## Output Format126Report structure127```128129---130131## Example132133```134/agent-template security-scanner "scan code for vulnerabilities"135136Output: Created .claude/agents/security-scanner.md137```