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.4---56# Agent Template Generator78Generate a custom agent file based on requirements.910**Usage**: `/agent-template [agent-name] [purpose]`1112---1314## Templates1516| Purpose | Template | Tools | Color | Model |17|---------|----------|-------|-------|-------|18| Review/Audit | Reviewer | Read, Grep, Glob, Bash | yellow | inherit |19| Generate/Create | Generator | Read, Write, Grep, Glob | cyan | inherit |20| Fix/Modify | Fixer | Read, Write, Edit, Bash, Grep | red | inherit |21| Test/Validate | Tester | Read, Bash, Grep, Glob | green | inherit |22| Document | Documenter | Read, Write, Grep, Glob | cyan | inherit |23| Orchestrate | Orchestrator | Read, Write, Bash, Grep, Glob, Agent | cyan | haiku |2425---2627## Process28291. **Gather Requirements**30 - Agent name (lowercase, hyphenated)31 - Purpose32 - Tools needed33 - Model (fable/opus/sonnet/haiku/inherit — inherit is the recommended default)34 - Preloaded skills (if any)35362. **Select Template** based on purpose37383. **Generate File** at `.claude/agents/[name].md`39404. **Validate** with `/agent-check`4142---4344## Frontmatter Reference (official fields)4546```yaml47---48name: agent-name # Required: lowercase, hyphenated, 3-50 chars49description: > # Required: 200-1000 chars recommended, include <example> blocks.50 Use this agent PROACTIVELY when [triggering conditions]. Examples:51 <example>52 Context: [situation]53 user: "[request]"54 assistant: "[response]"55 <commentary>[why this agent]</commentary>56 </example>57color: cyan # Required by Director Mode convention (CI-enforced); optional per spec58model: inherit # Required by Director Mode convention (CI-enforced); optional per spec.59 # Valid: fable, opus, sonnet, haiku, inherit, default, best, sonnet[1m],60 # opus[1m] (or a full model ID). inherit recommended. NOT opusplan.61effort: medium # Optional: low, medium, high, xhigh, max62tools: # Optional: YAML list (omit = all tools)63 - Read64 - Write65 - Edit66 - Bash67 - Grep68 - Glob69 - Agent70 - WebFetch71 - WebSearch72 - TodoWrite73 - NotebookEdit74disallowedTools: # Optional: explicit tool blocking75 - NotebookEdit76maxTurns: 20 # Optional: max agentic turns before stopping (positive integer)77skills: # Optional: preloaded skill names (list)78 - linked-skill79memory: project # Optional: one of user, project, local80background: false # Optional: run the agent in the background (boolean)81isolation: worktree # Optional: run the agent in an isolated git worktree82---83```8485**Not supported in filesystem/plugin agent frontmatter** — do not emit these:86`hooks`, `mcpServers`, `permissionMode` (security restriction), and `forkContext`87(not an official field). Agents fork automatically when dispatched.8889---9091## Reviewer Template Structure9293```markdown94---95name: [name]96description: >97 Use this agent PROACTIVELY when [triggering conditions]. Examples:98 <example>99 Context: [situation]100 user: "[request]"101 assistant: "[response]"102 </example>103color: yellow104tools:105 - Read106 - Grep107 - Glob108 - Bash109model: inherit110skills:111 - linked-skill112# maxTurns: 20113# memory: project114---115116# [Name] Agent117118## Activation119When to trigger120121## Review Checklist122- [ ] Check items123124## Output Format125Report structure126```127128---129130## Example131132```133/agent-template security-scanner "scan code for vulnerabilities"134135Output: Created .claude/agents/security-scanner.md136```