$npx -y skills add evan043/claude-cli-advanced-starter-pack --skill agent-creatorCreate Claude Code CLI agents (subagents) following best practices - proper Task tool configuration, agent specialization, workflow integration, and RAG-enhanced knowledge bases
| 1 | # Agent Creator Skill |
| 2 | |
| 3 | Expert-level Claude Code agent creation following official Anthropic best practices. |
| 4 | |
| 5 | ## When to Use This Skill |
| 6 | |
| 7 | This skill is automatically invoked when: |
| 8 | |
| 9 | - Creating new specialized agents/subagents |
| 10 | - Designing agent workflows |
| 11 | - Configuring agent tool access |
| 12 | - Setting up multi-agent coordination |
| 13 | |
| 14 | ## Agent Architecture Overview |
| 15 | |
| 16 | ### What are Claude Code Agents? |
| 17 | |
| 18 | Agents (subagents) are specialized Claude instances launched via the `Task` tool to handle complex, multi-step tasks autonomously. They: |
| 19 | |
| 20 | - Run in isolated contexts with specific tool access |
| 21 | - Execute tasks without interrupting main conversation |
| 22 | - Return results upon completion |
| 23 | - Can run in parallel for independent tasks |
| 24 | |
| 25 | ### Agent Types |
| 26 | |
| 27 | | Agent Type | Description | Tools | |
| 28 | |------------|-------------|-------| |
| 29 | | `general-purpose` | Research, search, multi-step tasks | All tools | |
| 30 | | `Explore` | Fast codebase exploration | All except Edit, Write | |
| 31 | | `Plan` | Planning and discovery | All except Edit, Write | |
| 32 | | `Bash` | Command execution specialist | Bash only | |
| 33 | |
| 34 | ## Creating Custom Agents |
| 35 | |
| 36 | ### Skill-Based Agents |
| 37 | |
| 38 | Agents defined as skills live in `.claude/skills/{skill-name}/`: |
| 39 | |
| 40 | ``` |
| 41 | .claude/skills/ |
| 42 | my-agent/ |
| 43 | skill.md # Main skill definition (YAML frontmatter) |
| 44 | context/ # Agent context files |
| 45 | README.md |
| 46 | patterns.md |
| 47 | examples.md |
| 48 | workflows/ # Sub-workflows |
| 49 | README.md |
| 50 | sub-task-1.md |
| 51 | sub-task-2.md |
| 52 | ``` |
| 53 | |
| 54 | ### skill.md Format |
| 55 | |
| 56 | ```markdown |
| 57 | --- |
| 58 | name: my-agent |
| 59 | description: Brief description shown in skill list |
| 60 | --- |
| 61 | |
| 62 | # Agent Title |
| 63 | |
| 64 | Detailed agent instructions, patterns, and capabilities. |
| 65 | |
| 66 | ## When to Use This Agent |
| 67 | |
| 68 | List specific scenarios when this agent should be invoked. |
| 69 | |
| 70 | ## Capabilities |
| 71 | |
| 72 | - What this agent can do |
| 73 | - Tools it has access to |
| 74 | - Patterns it follows |
| 75 | |
| 76 | ## Workflow |
| 77 | |
| 78 | Step-by-step process the agent follows. |
| 79 | |
| 80 | ## Output Format |
| 81 | |
| 82 | What the agent returns upon completion. |
| 83 | ``` |
| 84 | |
| 85 | ## Agent Design Patterns |
| 86 | |
| 87 | ### Pattern 1: Discovery Agent |
| 88 | |
| 89 | Purpose: Research and understand before implementation. |
| 90 | |
| 91 | ```markdown |
| 92 | --- |
| 93 | name: discovery-agent |
| 94 | description: Research codebase, find patterns, gather requirements |
| 95 | --- |
| 96 | |
| 97 | # Discovery Agent |
| 98 | |
| 99 | ## Purpose |
| 100 | |
| 101 | Explore the codebase to understand: |
| 102 | - Existing patterns and conventions |
| 103 | - File organization and structure |
| 104 | - Dependencies and relationships |
| 105 | - Potential impact areas |
| 106 | |
| 107 | ## Workflow |
| 108 | |
| 109 | 1. **Initial Search** - Use Glob/Grep to find relevant files |
| 110 | 2. **Deep Read** - Read key files to understand patterns |
| 111 | 3. **Map Dependencies** - Trace imports and relationships |
| 112 | 4. **Document Findings** - Summarize discoveries |
| 113 | |
| 114 | ## Output |
| 115 | |
| 116 | Return a structured report: |
| 117 | - Files discovered |
| 118 | - Patterns identified |
| 119 | - Key dependencies |
| 120 | - Recommendations |
| 121 | ``` |
| 122 | |
| 123 | ### Pattern 2: Implementation Agent |
| 124 | |
| 125 | Purpose: Execute code changes with proper patterns. |
| 126 | |
| 127 | ```markdown |
| 128 | --- |
| 129 | name: implementation-agent |
| 130 | description: Write code following project patterns and conventions |
| 131 | --- |
| 132 | |
| 133 | # Implementation Agent |
| 134 | |
| 135 | ## Purpose |
| 136 | |
| 137 | Implement features following project standards: |
| 138 | - Use established patterns |
| 139 | - Maintain consistency |
| 140 | - Add appropriate tests |
| 141 | - Update documentation |
| 142 | |
| 143 | ## Prerequisites |
| 144 | |
| 145 | - Discovery complete |
| 146 | - Plan approved |
| 147 | - Target files identified |
| 148 | |
| 149 | ## Workflow |
| 150 | |
| 151 | 1. **Read Target Files** - Understand current state |
| 152 | 2. **Apply Patterns** - Use project conventions |
| 153 | 3. **Implement Changes** - Write clean code |
| 154 | 4. **Add Tests** - Cover new functionality |
| 155 | 5. **Validate** - Ensure no regressions |
| 156 | |
| 157 | ## Output |
| 158 | |
| 159 | Return implementation summary: |
| 160 | - Files modified |
| 161 | - Tests added |
| 162 | - Breaking changes (if any) |
| 163 | ``` |
| 164 | |
| 165 | ### Pattern 3: QA Agent |
| 166 | |
| 167 | Purpose: Validate changes and ensure quality. |
| 168 | |
| 169 | ```markdown |
| 170 | --- |
| 171 | name: qa-agent |
| 172 | description: Validate changes, run tests, verify patterns |
| 173 | --- |
| 174 | |
| 175 | # QA Agent |
| 176 | |
| 177 | ## Purpose |
| 178 | |
| 179 | Ensure quality through: |
| 180 | - Pattern compliance |
| 181 | - Test coverage |
| 182 | - Error handling |
| 183 | - Performance impact |
| 184 | |
| 185 | ## Workflow |
| 186 | |
| 187 | 1. **Review Changes** - Examine modified files |
| 188 | 2. **Run Tests** - Execute relevant test suites |
| 189 | 3. **Check Patterns** - Verify convention compliance |
| 190 | 4. **Report Issues** - Document findings |
| 191 | |
| 192 | ## Output |
| 193 | |
| 194 | Return QA report: |
| 195 | - Tests passed/failed |
| 196 | - Pattern violations |
| 197 | - Recommendations |
| 198 | - Sign-off status |
| 199 | ``` |
| 200 | |
| 201 | ### Pattern 4: Orchestrator Agent |
| 202 | |
| 203 | Purpose: Coordinate multiple agents for complex tasks. |
| 204 | |
| 205 | ```markdown |
| 206 | --- |
| 207 | name: orchestrator-agent |
| 208 | description: Coordinate multi-agent workflows for complex tasks |
| 209 | --- |
| 210 | |
| 211 | # Orchestrator Agent |
| 212 | |
| 213 | ## Purpose |
| 214 | |
| 215 | Coordinate complex workflows: |
| 216 | - Decompose tasks |
| 217 | - Assign to specialized agents |
| 218 | - Aggregate results |
| 219 | - Handle dependencies |
| 220 | |
| 221 | ## Workflow |
| 222 | |
| 223 | 1. **Analyze Task** - Understand scope |
| 224 | 2. **Create Plan** - Break into subtasks |
| 225 | 3. **Dispatch Agents** - Launch specialized agents |
| 226 | 4. **Monitor Progress** - Track completion |
| 227 | 5. **Aggregate Results** - Combine outputs |
| 228 | |
| 229 | ## Agent Dispatch |
| 230 | |
| 231 | Launch agents in |