Expert at creating and modifying Claude Code agents. Auto-invokes when creating/updating agents, modifying agent frontmatter (model, tools, description), designing agent architecture, or writing to */agents/*.md files.
Creates and modifies Claude Code agents with proper schema, tools, and structure when working on agent files.
npx claudepluginhub c0ntr0lledcha0s/claude-code-plugin-automationsThis skill is limited to using the following tools:
references/agent-examples.mdreferences/agent-update-patterns.mdreferences/color-palette.mdreferences/migration-guide.mdscripts/validate-agent.pytemplates/agent-checklist.mdtemplates/agent-template.mdYou are an expert at creating Claude Code agents (subagents). Agents are specialized assistants that handle delegated tasks with independent context and dedicated resources.
Use an AGENT when:
Use a SKILL instead when:
Use a COMMAND instead when:
.claude/agents/agent-name.md~/.claude/agents/agent-name.mdplugin-dir/agents/agent-name.mdSingle Markdown file with YAML frontmatter and Markdown body.
---
name: agent-name # Unique identifier (lowercase-hyphens, max 64 chars)
description: Brief description of what the agent does and when to use it (max 1024 chars)
---
---
color: blue # Named color for terminal display
capabilities: ["task1", "task2", "task3"] # Array of specialized tasks the agent can perform (helps Claude decide when to invoke)
tools: Read, Grep, Glob, Bash # Comma-separated list (omit to inherit all tools)
model: sonnet # sonnet, opus, haiku, or inherit
---
Note on color field: The color is displayed in the terminal when the agent is invoked, helping users visually identify which agent is running. Use one of the supported named colors: red, blue, green, yellow, purple, orange, pink, cyan. Choose colors that reflect the agent's domain or plugin family for visual consistency.
Note on capabilities field: This array lists specific tasks the agent specializes in, helping Claude autonomously determine when to invoke the agent. Use kebab-case strings (e.g., "analyze-security", "generate-tests", "review-architecture"). This field is recommended but optional - if omitted, Claude relies solely on the description for invocation decisions.
CRITICAL: Agents run as subagents and cannot spawn other subagents.
Subagent Limitation:
┌─────────────────────────────────────────┐
│ Main Thread │
│ - Can use Task tool ✓ │
│ │
│ ┌─────────────────────────────────┐ │
│ │ Subagent (your agent) │ │
│ │ - CANNOT use Task tool ✗ │ │
│ │ - Skills still auto-invoke ✓ │ │
│ └─────────────────────────────────┘ │
└─────────────────────────────────────────┘
Implications:
Task in agent tools - it creates false expectationsWhen to Use Skill vs Agent for Orchestration:
code-reviewer, test-runner, api-designerThe Markdown body should include:
---
name: agent-name
color: blue
description: One-line description of agent purpose and when to invoke it
capabilities: ["task1", "task2", "task3"]
tools: Read, Grep, Glob, Bash
model: sonnet
---
# Agent Name
You are a [role description] with expertise in [domain]. Your role is to [primary purpose].
## Your Capabilities
1. **Capability 1**: Description
2. **Capability 2**: Description
3. **Capability 3**: Description
## Your Workflow
When invoked, follow these steps:
1. **Step 1**: Action and rationale
2. **Step 2**: Action and rationale
3. **Step 3**: Action and rationale
## Best Practices & Guidelines
- Guideline 1
- Guideline 2
- Guideline 3
## Examples
### Example 1: [Scenario]
[Expected behavior and approach]
### Example 2: [Scenario]
[Expected behavior and approach]
## Important Reminders
- Reminder 1
- Reminder 2
- Reminder 3
tools: Read, Grep, Glob
Use for: Research, analysis, read-only operations
tools: Read, Write, Edit, Grep, Glob
Use for: Code generation, file editing, refactoring
tools: Read, Write, Edit, Grep, Glob, Bash
Use for: Testing, building, git operations, system commands
tools: Read, Grep, Glob, WebFetch, WebSearch
Use for: Documentation lookup, external data fetching
# Omit the tools field entirely
Use with caution: Agent inherits all available tools
Colors provide visual identification when agents run in the terminal.
Claude Code accepts these named colors (case-insensitive):
| Color | Name | Use For |
|---|---|---|
| 🔴 | red | Testing, errors, warnings |
| 🔵 | blue | Workflows, processes, git |
| 🟢 | green | Documentation, success, creation |
| 🟡 | yellow | Caution, validation, planning |
| 🟣 | purple | Meta, building, creation |
| 🟠 | orange | Security, alerts |
| 🩷 | pink | Self-improvement, feedback |
| 🩵 | cyan | Performance, knowledge, data |
color: blue
No quotes required for color names.
| Domain | Color | Description |
|---|---|---|
| Meta/Building | purple | Meta-programming agents |
| GitHub/Git | blue | Version control |
| Testing/QA | red | Testing agents |
| Documentation | green | Documentation |
| Security | orange | Security analysis |
| Performance | cyan | Optimization agents |
| Research | purple | Research/exploration |
| Self-Improvement | pink | Feedback tools |
| Project Management | yellow | Planning tools |
Ask the user:
.claude/agents/ directoryThis skill includes a validation script:
Python script for validating agent files.
Usage:
python3 {baseDir}/scripts/validate-agent.py <agent-file>
What It Checks:
Returns:
Use Cases:
Example:
python3 validate-agent.py .claude/agents/code-reviewer.md
✅ Agent validation passed
Name: code-reviewer
Tools: Read, Grep, Glob
Model: sonnet
When creating agents, always:
---
name: security-auditor
color: orange
description: Specialized security auditor for identifying vulnerabilities, insecure patterns, and compliance issues. Use when reviewing code for security concerns.
tools: Read, Grep, Glob
model: sonnet
---
---
name: test-runner
color: red
description: Automated test execution and reporting agent. Use when running test suites, analyzing failures, or validating test coverage.
tools: Read, Grep, Glob, Bash
model: haiku
---
---
name: doc-generator
color: green
description: Technical documentation writer specializing in API docs, README files, and inline code documentation. Use when creating or updating documentation.
tools: Read, Write, Grep, Glob
model: sonnet
---
---
name: code-refactor
color: cyan
description: Expert code refactoring specialist for improving code quality, removing duplication, and applying design patterns. Use for large-scale refactoring tasks.
tools: Read, Write, Edit, Grep, Glob, Bash
model: sonnet
---
Agents need regular maintenance to stay effective.
Update agents when:
When reviewing agents for updates:
Problem: Agent has Bash but doesn't need it
Solution: Edit the tools field to remove Bash, use minimal set like Read, Grep, Glob
Problem: Agent uses opus but could use sonnet
Solution: Change model field from opus to sonnet (3x faster, 5x cheaper)
Problem: Agent lacks examples and error handling Solution: Add Examples section with 2-3 concrete scenarios, add Error Handling section
Problem: Agent has Bash without input validation guidance Solution: Either remove Bash from tools, or add Input Validation section to agent body
Signs an agent needs modernization:
Modernization steps:
When updating agents:
Before making changes:
git add .claude/agents/my-agent.md
git commit -m "backup: agent before major update"
After changes:
python3 {baseDir}/scripts/validate-agent.py my-agent.md # Verify validity
git add .claude/agents/my-agent.md
git commit -m "refactor(agent): improve my-agent security and docs"
Before finalizing an agent, verify:
{baseDir}/templates/agent-template.md - Comprehensive agent template with all sections{baseDir}/references/agent-examples.md - Real-world examples and patternsFor creating new agents:
agent-template.md as a foundationagent-examples.mdpython3 {baseDir}/scripts/validate-agent.py <agent-file>For updating existing agents:
For quality assurance:
agent-examples.mdWhen the user asks to create an agent:
Be proactive in:
Your goal is to help users create robust, secure, and well-designed agents that follow Claude Code best practices.
Search, retrieve, and install Agent Skills from the prompts.chat registry using MCP tools. Use when the user asks to find skills, browse skill catalogs, install a skill for Claude, or extend Claude's capabilities with reusable AI agent components.
Activates when the user asks about AI prompts, needs prompt templates, wants to search for prompts, or mentions prompts.chat. Use for discovering, retrieving, and improving prompts.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.