SKILL.md--- name: agent-identifier description: Use when creating or configuring Claude Code agents and their frontmatter. version: 0.1.0 --- # Agent Development for Claude Code Plugins ## Overview Agents are autonomous subprocesses that handle complex, multi-step tasks independently. Understanding agent structure, triggering conditions, and system prompt design enables creating powerful autonomous capabilities. **Key concepts:** - Agents are FOR autonomous work, commands are FOR user-initiated actions - Markdown file format with YAML frontmatter - Triggering via description field with examples - System prompt defines agent behavior - Model and color customization ## When to Use Use this skill when the user asks to: - Create an agent - Add an agent - Write a subagent - Define agent frontmatter - Decide when to use description examples - Configure agent tools, colors, or model behavior - Design autonomous agent structure, triggering conditions, or system prompts ## When Not to Use Do not use this skill for: - Slash command design - Hook configuration - MCP server setup - General plugin layout questions that belong to `plugin-structure` ## Agent File Structure ### Complete Format ```markdown --- name: agent-identifier description: Use this agent when [triggering conditions]. Examples: <example> Context: [Situation description] user: "[User request]" assistant: "[How assistant should respond and use this agent]" <commentary> [Why this agent should be triggered] </commentary> </example> <example> [Additional example...] </example> model: inherit color: blue tools: ["Read", "Write", "Grep"] --- You are [agent role description]... **Your Core Responsibilities:** 1. [Responsibility 1] 2. [Responsibility 2] **Analysis Process:** [Step-by-step workflow] **Output Format:** [What to return] ``` ## Frontmatter Fields ### name (required) Agent identifier used for namespacing and invocation. **Format:** lowercase, numbers, hyphens only **Length:** 3-50 characters **Pattern:** Must start and end with alphanumeric **Good examples:** - `code-reviewer` - `test-generator` - `api-docs-writer` - `security-analyzer` **Bad examples:** - `helper` (too generic) - `-agent-` (starts/ends with hyphen) - `my_agent` (underscores not allowed) - `ag` (too short, < 3 chars) ### description (required) Defines when Claude should trigger this agent. **This is the most critical field.** **Must include:** 1. Triggering conditions ("Use this agent when...") 2. Multiple `<example>` blocks showing usage 3. Context, user request, and assistant response in each example 4. `<commentary>` explaining why agent triggers **Format:** ``` Use this agent when [conditions]. Examples: <example> Context: [Scenario description] user: "[What user says]" assistant: "[How Claude should respond]" <commentary> [Why this agent is appropriate] </commentary> </example> [More examples...] ``` **Best practices:** - Incl