Create Agent Skill
Create new Claude Code agents with proper configuration and structure.
Agent File Format
Agents are markdown files in the agents/ directory with YAML frontmatter:
---
name: agent-name
short: Brief 5-8 word description
description: Full description of what the agent does
when: Semantic activation - describe when to use this agent
tools: Glob, Grep, Read, Write, Edit, Bash, WebFetch, WebSearch, TodoWrite
model: sonnet
color: green
---
# Agent Title
Agent prompt content goes here...
Required Frontmatter Fields
| Field |
Description |
Example |
name |
Unique identifier (kebab-case) |
code-reviewer |
description |
One-line summary of agent's purpose |
Reviews code for quality and best practices |
tools |
Comma-separated list of available tools |
Glob, Grep, Read, Write, Edit, Bash |
model |
Model to use: opus, sonnet, or haiku |
sonnet |
color |
Status line color |
green, blue, purple, red, orange, cyan, magenta, yellow, pink, teal, violet |
Optional Frontmatter Fields
| Field |
Description |
Example |
short |
Brief 5-8 word summary for index display |
Reviews code for security and quality |
when |
Semantic activation trigger for index display |
User wants code reviewed, needs security audit, or asks about code quality |
Note: short and when are used for forge-index display. The description field is used by Claude Code for agent invocation.
Model Selection Guidelines
- opus: Strategic decisions, complex architecture, security-critical, compliance, executive-level analysis
- sonnet: Technical implementation, code writing, general development tasks (most common)
- haiku: Quick lookups, simple transformations, fast responses
Available Tools
Common tool combinations by agent type:
Code Development Agents
Glob, Grep, Read, Write, Edit, Bash, TodoWrite
Research/Analysis Agents
Glob, Grep, Read, WebFetch, WebSearch, TodoWrite
Full-Featured Agents
Glob, Grep, Read, Write, Edit, Bash, WebFetch, WebSearch, TodoWrite
Creation Process
- Determine the agent's purpose and expertise area
- Choose appropriate model based on complexity
- Select tools needed for the agent's tasks
- Write clear, actionable agent prompt
- Save to
plugins/<plugin-name>/agents/<agent-name>.md
Example Agent
---
name: code-reviewer
short: Reviews code for security and quality
description: Reviews code changes for quality, security, and best practices
when: User wants code reviewed, needs security audit, or asks about code quality
tools: Glob, Grep, Read, TodoWrite
model: sonnet
color: yellow
---
# Code Reviewer Agent
You are an expert code reviewer focused on quality, security, and maintainability.
## Review Checklist
- Code correctness and logic
- Security vulnerabilities
- Performance considerations
- Code style and consistency
- Test coverage
- Documentation
## Output Format
Provide structured feedback with:
1. Summary of changes
2. Issues found (categorized by severity)
3. Recommendations
4. Approval status
1---2name: create-agent-33description: Create a new Claude Code agent with proper YAML frontmatter structure. Use when the user wants to add a specialized agent to a plugin. Handles agent file creation with name, description, tools, model selection, and color configuration.4---5
6# Create Agent Skill
7
8Create new Claude Code agents with proper configuration and structure.
9
10## Agent File Format
11
12Agents are markdown files in the `agents/` directory with YAML frontmatter:
13
14```markdown
15---
16name: agent-name
17short: Brief 5-8 word description
18description: Full description of what the agent does
19when: Semantic activation - describe when to use this agent
20tools: Glob, Grep, Read, Write, Edit, Bash, WebFetch, WebSearch, TodoWrite
21model: sonnet
22color: green
23---
24
25# Agent Title
26
27Agent prompt content goes here...
28```
29
30## Required Frontmatter Fields
31
32| Field | Description | Example |
33|-------|-------------|---------|
34| `name` | Unique identifier (kebab-case) | `code-reviewer` |
35| `description` | One-line summary of agent's purpose | `Reviews code for quality and best practices` |
36| `tools` | Comma-separated list of available tools | `Glob, Grep, Read, Write, Edit, Bash` |
37| `model` | Model to use: `opus`, `sonnet`, or `haiku` | `sonnet` |
38| `color` | Status line color | `green`, `blue`, `purple`, `red`, `orange`, `cyan`, `magenta`, `yellow`, `pink`, `teal`, `violet` |
39
40## Optional Frontmatter Fields
41
42| Field | Description | Example |
43|-------|-------------|---------|
44| `short` | Brief 5-8 word summary for index display | `Reviews code for security and quality` |
45| `when` | Semantic activation trigger for index display | `User wants code reviewed, needs security audit, or asks about code quality` |
46
47**Note**: `short` and `when` are used for forge-index display. The `description` field is used by Claude Code for agent invocation.
48
49## Model Selection Guidelines
50
51- **opus**: Strategic decisions, complex architecture, security-critical, compliance, executive-level analysis
52- **sonnet**: Technical implementation, code writing, general development tasks (most common)
53- **haiku**: Quick lookups, simple transformations, fast responses
54
55## Available Tools
56
57Common tool combinations by agent type:
58
59### Code Development Agents
60```
61Glob, Grep, Read, Write, Edit, Bash, TodoWrite
62```
63
64### Research/Analysis Agents
65```
66Glob, Grep, Read, WebFetch, WebSearch, TodoWrite
67```
68
69### Full-Featured Agents
70```
71Glob, Grep, Read, Write, Edit, Bash, WebFetch, WebSearch, TodoWrite
72```
73
74## Creation Process
75
761. Determine the agent's purpose and expertise area
772. Choose appropriate model based on complexity
783. Select tools needed for the agent's tasks
794. Write clear, actionable agent prompt
805. Save to `plugins/<plugin-name>/agents/<agent-name>.md`
81
82## Example Agent
83
84```markdown
85---
86name: code-reviewer
87short: Reviews code for security and quality
88description: Reviews code changes for quality, security, and best practices
89when: User wants code reviewed, needs security audit, or asks about code quality
90tools: Glob, Grep, Read, TodoWrite
91model: sonnet
92color: yellow
93---
94
95# Code Reviewer Agent
96
97You are an expert code reviewer focused on quality, security, and maintainability.
98
99## Review Checklist
100
101- Code correctness and logic
102- Security vulnerabilities
103- Performance considerations
104- Code style and consistency
105- Test coverage
106- Documentation
107
108## Output Format
109
110Provide structured feedback with:
1111. Summary of changes
1122. Issues found (categorized by severity)
1133. Recommendations
1144. Approval status
115```