@kurokeita/add-skill 2.6.1 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/README.md +43 -64
  2. package/dist/bin/cli.js +270 -478
  3. package/dist/skills/statusline-setup/.claude-plugin/plugin.json +1 -1
  4. package/dist/skills/statusline-setup/SKILL.md +48 -448
  5. package/dist/skills/statusline-setup/mod/hooks/register.tsx +93 -103
  6. package/dist/skills/statusline-setup/mod/tests/work.test.ts +28 -10
  7. package/dist/skills/statusline-setup/mod/types/index.d.ts +2 -1
  8. package/dist/skills/universalize-agents/reference/mapping.md +3 -2
  9. package/package.json +3 -3
  10. package/dist/agents/backend-specialist.md +0 -277
  11. package/dist/agents/code-archaeologist.md +0 -114
  12. package/dist/agents/database-architect.md +0 -238
  13. package/dist/agents/debugger.md +0 -231
  14. package/dist/agents/devops-engineer.md +0 -242
  15. package/dist/agents/documentation-writer.md +0 -104
  16. package/dist/agents/explorer-agent.md +0 -79
  17. package/dist/agents/frontend-specialist.md +0 -594
  18. package/dist/agents/game-developer.md +0 -162
  19. package/dist/agents/mobile-developer.md +0 -383
  20. package/dist/agents/orchestrator.md +0 -435
  21. package/dist/agents/penetration-tester.md +0 -188
  22. package/dist/agents/performance-optimizer.md +0 -191
  23. package/dist/agents/product-manager.md +0 -122
  24. package/dist/agents/product-owner.md +0 -106
  25. package/dist/agents/project-planner.md +0 -408
  26. package/dist/agents/qa-automation-engineer.md +0 -109
  27. package/dist/agents/security-auditor.md +0 -171
  28. package/dist/agents/test-engineer.md +0 -158
  29. package/dist/skills/agent-identifier/SKILL.md +0 -431
  30. package/dist/skills/agent-identifier/examples/agent-creation-prompt.md +0 -247
  31. package/dist/skills/agent-identifier/examples/complete-agent-examples.md +0 -432
  32. package/dist/skills/agent-identifier/references/agent-creation-system-prompt.md +0 -215
  33. package/dist/skills/agent-identifier/references/system-prompt-design.md +0 -419
  34. package/dist/skills/agent-identifier/references/triggering-examples.md +0 -508
  35. package/dist/skills/agent-identifier/scripts/validate-agent.sh +0 -217
  36. package/dist/skills/code-review-excellence/SKILL.md +0 -525
  37. package/dist/skills/component-refactoring/SKILL.md +0 -492
  38. package/dist/skills/component-refactoring/references/complexity-patterns.md +0 -493
  39. package/dist/skills/component-refactoring/references/component-splitting.md +0 -477
  40. package/dist/skills/component-refactoring/references/hook-extraction.md +0 -317
  41. package/dist/skills/context7-guidelines/SKILL.md +0 -31
  42. package/dist/skills/feature-design-assistant/SKILL.md +0 -371
  43. package/dist/skills/find-bugs/SKILL.md +0 -75
  44. package/dist/skills/frontend-design/SKILL.md +0 -45
  45. package/dist/skills/go-concurrency-patterns/SKILL.md +0 -657
  46. package/dist/skills/grill-me/SKILL.md +0 -9
  47. package/dist/skills/handoff/SKILL.md +0 -16
  48. package/dist/skills/koreader-plugin-development/SKILL.md +0 -141
  49. package/dist/skills/koreader-plugin-development/examples/2-example-patch.lua +0 -17
  50. package/dist/skills/koreader-plugin-development/examples/_meta.lua +0 -6
  51. package/dist/skills/koreader-plugin-development/examples/helloworld.lua +0 -36
  52. package/dist/skills/koreader-plugin-development/references/debugging.md +0 -92
  53. package/dist/skills/koreader-plugin-development/references/events-and-widgets.md +0 -102
  54. package/dist/skills/koreader-plugin-development/references/patches.md +0 -118
  55. package/dist/skills/koreader-plugin-development/references/plugin-anatomy.md +0 -97
  56. package/dist/skills/make-instruction/SKILL.md +0 -68
  57. package/dist/skills/make-prompt/SKILL.md +0 -70
  58. package/dist/skills/make-skill/SKILL.md +0 -147
  59. package/dist/skills/prd-to-tasks/SKILL.md +0 -164
  60. package/dist/skills/react-native-async-patterns/SKILL.md +0 -256
  61. package/dist/skills/react-native-performance/SKILL.md +0 -425
  62. package/dist/skills/react-native-testing/SKILL.md +0 -458
  63. package/dist/skills/react-native-zustand-patterns/SKILL.md +0 -343
  64. package/dist/skills/skill-creator/SKILL.md +0 -385
  65. package/dist/skills/skill-creator/scripts/init_skill.cjs +0 -235
  66. package/dist/skills/skill-creator/scripts/package_skill.cjs +0 -84
  67. package/dist/skills/skill-creator/scripts/validate_skill.cjs +0 -127
  68. package/dist/skills/skill-development/SKILL.md +0 -676
  69. package/dist/skills/skill-development/references/skill-creator-original.md +0 -210
  70. package/dist/skills/sql-optimization-patterns/SKILL.md +0 -509
  71. package/dist/skills/test-driven-development/SKILL.md +0 -114
  72. package/dist/skills/test-driven-development/deep-modules.md +0 -33
  73. package/dist/skills/test-driven-development/interface-design.md +0 -35
  74. package/dist/skills/test-driven-development/mocking.md +0 -68
  75. package/dist/skills/test-driven-development/refactoring.md +0 -10
  76. package/dist/skills/test-driven-development/tests.md +0 -61
  77. package/dist/skills/vercel-react-best-practices/AGENTS.md +0 -2410
  78. package/dist/skills/vercel-react-best-practices/SKILL.md +0 -127
  79. package/dist/skills/vercel-react-best-practices/rules/advanced-event-handler-refs.md +0 -55
  80. package/dist/skills/vercel-react-best-practices/rules/advanced-use-latest.md +0 -49
  81. package/dist/skills/vercel-react-best-practices/rules/async-api-routes.md +0 -38
  82. package/dist/skills/vercel-react-best-practices/rules/async-defer-await.md +0 -80
  83. package/dist/skills/vercel-react-best-practices/rules/async-dependencies.md +0 -36
  84. package/dist/skills/vercel-react-best-practices/rules/async-parallel.md +0 -28
  85. package/dist/skills/vercel-react-best-practices/rules/async-suspense-boundaries.md +0 -99
  86. package/dist/skills/vercel-react-best-practices/rules/bundle-barrel-imports.md +0 -59
  87. package/dist/skills/vercel-react-best-practices/rules/bundle-conditional.md +0 -31
  88. package/dist/skills/vercel-react-best-practices/rules/bundle-defer-third-party.md +0 -49
  89. package/dist/skills/vercel-react-best-practices/rules/bundle-dynamic-imports.md +0 -35
  90. package/dist/skills/vercel-react-best-practices/rules/bundle-preload.md +0 -50
  91. package/dist/skills/vercel-react-best-practices/rules/client-event-listeners.md +0 -74
  92. package/dist/skills/vercel-react-best-practices/rules/client-localstorage-schema.md +0 -71
  93. package/dist/skills/vercel-react-best-practices/rules/client-passive-event-listeners.md +0 -48
  94. package/dist/skills/vercel-react-best-practices/rules/client-swr-dedup.md +0 -56
  95. package/dist/skills/vercel-react-best-practices/rules/js-batch-dom-css.md +0 -82
  96. package/dist/skills/vercel-react-best-practices/rules/js-cache-function-results.md +0 -80
  97. package/dist/skills/vercel-react-best-practices/rules/js-cache-property-access.md +0 -28
  98. package/dist/skills/vercel-react-best-practices/rules/js-cache-storage.md +0 -70
  99. package/dist/skills/vercel-react-best-practices/rules/js-combine-iterations.md +0 -32
  100. package/dist/skills/vercel-react-best-practices/rules/js-early-exit.md +0 -50
  101. package/dist/skills/vercel-react-best-practices/rules/js-hoist-regexp.md +0 -45
  102. package/dist/skills/vercel-react-best-practices/rules/js-index-maps.md +0 -37
  103. package/dist/skills/vercel-react-best-practices/rules/js-length-check-first.md +0 -50
  104. package/dist/skills/vercel-react-best-practices/rules/js-min-max-loop.md +0 -82
  105. package/dist/skills/vercel-react-best-practices/rules/js-set-map-lookups.md +0 -24
  106. package/dist/skills/vercel-react-best-practices/rules/js-tosorted-immutable.md +0 -57
  107. package/dist/skills/vercel-react-best-practices/rules/rendering-activity.md +0 -26
  108. package/dist/skills/vercel-react-best-practices/rules/rendering-animate-svg-wrapper.md +0 -47
  109. package/dist/skills/vercel-react-best-practices/rules/rendering-conditional-render.md +0 -40
  110. package/dist/skills/vercel-react-best-practices/rules/rendering-content-visibility.md +0 -38
  111. package/dist/skills/vercel-react-best-practices/rules/rendering-hoist-jsx.md +0 -46
  112. package/dist/skills/vercel-react-best-practices/rules/rendering-hydration-no-flicker.md +0 -82
  113. package/dist/skills/vercel-react-best-practices/rules/rendering-svg-precision.md +0 -28
  114. package/dist/skills/vercel-react-best-practices/rules/rerender-defer-reads.md +0 -39
  115. package/dist/skills/vercel-react-best-practices/rules/rerender-dependencies.md +0 -45
  116. package/dist/skills/vercel-react-best-practices/rules/rerender-derived-state.md +0 -29
  117. package/dist/skills/vercel-react-best-practices/rules/rerender-functional-setstate.md +0 -74
  118. package/dist/skills/vercel-react-best-practices/rules/rerender-lazy-state-init.md +0 -58
  119. package/dist/skills/vercel-react-best-practices/rules/rerender-memo.md +0 -44
  120. package/dist/skills/vercel-react-best-practices/rules/rerender-transitions.md +0 -40
  121. package/dist/skills/vercel-react-best-practices/rules/server-after-nonblocking.md +0 -73
  122. package/dist/skills/vercel-react-best-practices/rules/server-cache-lru.md +0 -41
  123. package/dist/skills/vercel-react-best-practices/rules/server-cache-react.md +0 -76
  124. package/dist/skills/vercel-react-best-practices/rules/server-parallel-fetching.md +0 -83
  125. package/dist/skills/vercel-react-best-practices/rules/server-serialization.md +0 -38
  126. package/dist/skills/web-design-guidelines/SKILL.md +0 -40
  127. package/dist/skills/workflow-patterns/SKILL.md +0 -623
  128. package/dist/skills/write-prd/SKILL.md +0 -162
  129. package/dist/workflows/brainstorm.md +0 -113
  130. package/dist/workflows/create.md +0 -60
  131. package/dist/workflows/debug.md +0 -107
  132. package/dist/workflows/deploy.md +0 -178
  133. package/dist/workflows/enhance.md +0 -64
  134. package/dist/workflows/github-pull-request-create.md +0 -134
  135. package/dist/workflows/orchestrate.md +0 -246
  136. package/dist/workflows/plan.md +0 -90
  137. package/dist/workflows/preview.md +0 -83
  138. package/dist/workflows/status.md +0 -87
  139. package/dist/workflows/test.md +0 -144
  140. package/dist/workflows/ui-ux-pro-max.md +0 -315
@@ -1,158 +0,0 @@
1
- ---
2
- name: test-engineer
3
- description: Expert in testing, TDD, and test automation. Use for writing tests, improving coverage, debugging test failures. Triggers on test, spec, coverage, jest, pytest, playwright, e2e, unit test.
4
- tools: Read, Grep, Glob, Bash, Edit, Write
5
- model: inherit
6
- skills: clean-code, testing-patterns, tdd-workflow, webapp-testing, code-review-checklist, lint-and-validate
7
- ---
8
-
9
- # Test Engineer
10
-
11
- Expert in test automation, TDD, and comprehensive testing strategies.
12
-
13
- ## Core Philosophy
14
-
15
- > "Find what the developer forgot. Test behavior, not implementation."
16
-
17
- ## Your Mindset
18
-
19
- - **Proactive**: Discover untested paths
20
- - **Systematic**: Follow testing pyramid
21
- - **Behavior-focused**: Test what matters to users
22
- - **Quality-driven**: Coverage is a guide, not a goal
23
-
24
- ---
25
-
26
- ## Testing Pyramid
27
-
28
- ```
29
- /\ E2E (Few)
30
- / \ Critical user flows
31
- /----\
32
- / \ Integration (Some)
33
- /--------\ API, DB, services
34
- / \
35
- /------------\ Unit (Many)
36
- Functions, logic
37
- ```
38
-
39
- ---
40
-
41
- ## Framework Selection
42
-
43
- | Language | Unit | Integration | E2E |
44
- |----------|------|-------------|-----|
45
- | TypeScript | Vitest, Jest | Supertest | Playwright |
46
- | Python | Pytest | Pytest | Playwright |
47
- | React | Testing Library | MSW | Playwright |
48
-
49
- ---
50
-
51
- ## TDD Workflow
52
-
53
- ```
54
- 🔴 RED → Write failing test
55
- 🟢 GREEN → Minimal code to pass
56
- 🔵 REFACTOR → Improve code quality
57
- ```
58
-
59
- ---
60
-
61
- ## Test Type Selection
62
-
63
- | Scenario | Test Type |
64
- |----------|-----------|
65
- | Business logic | Unit |
66
- | API endpoints | Integration |
67
- | User flows | E2E |
68
- | Components | Component/Unit |
69
-
70
- ---
71
-
72
- ## AAA Pattern
73
-
74
- | Step | Purpose |
75
- |------|---------|
76
- | **Arrange** | Set up test data |
77
- | **Act** | Execute code |
78
- | **Assert** | Verify outcome |
79
-
80
- ---
81
-
82
- ## Coverage Strategy
83
-
84
- | Area | Target |
85
- |------|--------|
86
- | Critical paths | 100% |
87
- | Business logic | 80%+ |
88
- | Utilities | 70%+ |
89
- | UI layout | As needed |
90
-
91
- ---
92
-
93
- ## Deep Audit Approach
94
-
95
- ### Discovery
96
-
97
- | Target | Find |
98
- |--------|------|
99
- | Routes | Scan app directories |
100
- | APIs | Grep HTTP methods |
101
- | Components | Find UI files |
102
-
103
- ### Systematic Testing
104
-
105
- 1. Map all endpoints
106
- 2. Verify responses
107
- 3. Cover critical paths
108
-
109
- ---
110
-
111
- ## Mocking Principles
112
-
113
- | Mock | Don't Mock |
114
- |------|------------|
115
- | External APIs | Code under test |
116
- | Database (unit) | Simple deps |
117
- | Network | Pure functions |
118
-
119
- ---
120
-
121
- ## Review Checklist
122
-
123
- - [ ] Coverage 80%+ on critical paths
124
- - [ ] AAA pattern followed
125
- - [ ] Tests are isolated
126
- - [ ] Descriptive naming
127
- - [ ] Edge cases covered
128
- - [ ] External deps mocked
129
- - [ ] Cleanup after tests
130
- - [ ] Fast unit tests (<100ms)
131
-
132
- ---
133
-
134
- ## Anti-Patterns
135
-
136
- | ❌ Don't | ✅ Do |
137
- |----------|-------|
138
- | Test implementation | Test behavior |
139
- | Multiple asserts | One per test |
140
- | Dependent tests | Independent |
141
- | Ignore flaky | Fix root cause |
142
- | Skip cleanup | Always reset |
143
-
144
- ---
145
-
146
- ## When You Should Be Used
147
-
148
- - Writing unit tests
149
- - TDD implementation
150
- - E2E test creation
151
- - Improving coverage
152
- - Debugging test failures
153
- - Test infrastructure setup
154
- - API integration tests
155
-
156
- ---
157
-
158
- > **Remember:** Good tests are documentation. They explain what the code should do.
@@ -1,431 +0,0 @@
1
- ---
2
- name: Agent Development
3
- description: 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.
4
- version: 0.1.0
5
- ---
6
-
7
- # Agent Development for Claude Code Plugins
8
-
9
- ## Overview
10
-
11
- 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.
12
-
13
- **Key concepts:**
14
-
15
- - Agents are FOR autonomous work, commands are FOR user-initiated actions
16
- - Markdown file format with YAML frontmatter
17
- - Triggering via description field with examples
18
- - System prompt defines agent behavior
19
- - Model and color customization
20
-
21
- ## Agent File Structure
22
-
23
- ### Complete Format
24
-
25
- ```markdown
26
- ---
27
- name: agent-identifier
28
- description: Use this agent when [triggering conditions]. Examples:
29
-
30
- <example>
31
- Context: [Situation description]
32
- user: "[User request]"
33
- assistant: "[How assistant should respond and use this agent]"
34
- <commentary>
35
- [Why this agent should be triggered]
36
- </commentary>
37
- </example>
38
-
39
- <example>
40
- [Additional example...]
41
- </example>
42
-
43
- model: inherit
44
- color: blue
45
- tools: ["Read", "Write", "Grep"]
46
- ---
47
-
48
- You are [agent role description]...
49
-
50
- **Your Core Responsibilities:**
51
- 1. [Responsibility 1]
52
- 2. [Responsibility 2]
53
-
54
- **Analysis Process:**
55
- [Step-by-step workflow]
56
-
57
- **Output Format:**
58
- [What to return]
59
- ```
60
-
61
- ## Frontmatter Fields
62
-
63
- ### name (required)
64
-
65
- Agent identifier used for namespacing and invocation.
66
-
67
- **Format:** lowercase, numbers, hyphens only
68
- **Length:** 3-50 characters
69
- **Pattern:** Must start and end with alphanumeric
70
-
71
- **Good examples:**
72
-
73
- - `code-reviewer`
74
- - `test-generator`
75
- - `api-docs-writer`
76
- - `security-analyzer`
77
-
78
- **Bad examples:**
79
-
80
- - `helper` (too generic)
81
- - `-agent-` (starts/ends with hyphen)
82
- - `my_agent` (underscores not allowed)
83
- - `ag` (too short, < 3 chars)
84
-
85
- ### description (required)
86
-
87
- Defines when Claude should trigger this agent. **This is the most critical field.**
88
-
89
- **Must include:**
90
-
91
- 1. Triggering conditions ("Use this agent when...")
92
- 2. Multiple `<example>` blocks showing usage
93
- 3. Context, user request, and assistant response in each example
94
- 4. `<commentary>` explaining why agent triggers
95
-
96
- **Format:**
97
-
98
- ```
99
- Use this agent when [conditions]. Examples:
100
-
101
- <example>
102
- Context: [Scenario description]
103
- user: "[What user says]"
104
- assistant: "[How Claude should respond]"
105
- <commentary>
106
- [Why this agent is appropriate]
107
- </commentary>
108
- </example>
109
-
110
- [More examples...]
111
- ```
112
-
113
- **Best practices:**
114
-
115
- - Include 2-4 concrete examples
116
- - Show proactive and reactive triggering
117
- - Cover different phrasings of same intent
118
- - Explain reasoning in commentary
119
- - Be specific about when NOT to use the agent
120
-
121
- ### model (required)
122
-
123
- Which model the agent should use.
124
-
125
- **Options:**
126
-
127
- - `inherit` - Use same model as parent (recommended)
128
- - `sonnet` - Claude Sonnet (balanced)
129
- - `opus` - Claude Opus (most capable, expensive)
130
- - `haiku` - Claude Haiku (fast, cheap)
131
-
132
- **Recommendation:** Use `inherit` unless agent needs specific model capabilities.
133
-
134
- ### color (required)
135
-
136
- Visual identifier for agent in UI.
137
-
138
- **Options:** `blue`, `cyan`, `green`, `yellow`, `magenta`, `red`
139
-
140
- **Guidelines:**
141
-
142
- - Choose distinct colors for different agents in same plugin
143
- - Use consistent colors for similar agent types
144
- - Blue/cyan: Analysis, review
145
- - Green: Success-oriented tasks
146
- - Yellow: Caution, validation
147
- - Red: Critical, security
148
- - Magenta: Creative, generation
149
-
150
- ### tools (optional)
151
-
152
- Restrict agent to specific tools.
153
-
154
- **Format:** Array of tool names
155
-
156
- ```yaml
157
- tools: ["Read", "Write", "Grep", "Bash"]
158
- ```
159
-
160
- **Default:** If omitted, agent has access to all tools
161
-
162
- **Best practice:** Limit tools to minimum needed (principle of least privilege)
163
-
164
- **Common tool sets:**
165
-
166
- - Read-only analysis: `["Read", "Grep", "Glob"]`
167
- - Code generation: `["Read", "Write", "Grep"]`
168
- - Testing: `["Read", "Bash", "Grep"]`
169
- - Full access: Omit field or use `["*"]`
170
-
171
- ## System Prompt Design
172
-
173
- The markdown body becomes the agent's system prompt. Write in second person, addressing the agent directly.
174
-
175
- ### Structure
176
-
177
- **Standard template:**
178
-
179
- ```markdown
180
- You are [role] specializing in [domain].
181
-
182
- **Your Core Responsibilities:**
183
- 1. [Primary responsibility]
184
- 2. [Secondary responsibility]
185
- 3. [Additional responsibilities...]
186
-
187
- **Analysis Process:**
188
- 1. [Step one]
189
- 2. [Step two]
190
- 3. [Step three]
191
- [...]
192
-
193
- **Quality Standards:**
194
- - [Standard 1]
195
- - [Standard 2]
196
-
197
- **Output Format:**
198
- Provide results in this format:
199
- - [What to include]
200
- - [How to structure]
201
-
202
- **Edge Cases:**
203
- Handle these situations:
204
- - [Edge case 1]: [How to handle]
205
- - [Edge case 2]: [How to handle]
206
- ```
207
-
208
- ### Best Practices
209
-
210
- ✅ **DO:**
211
-
212
- - Write in second person ("You are...", "You will...")
213
- - Be specific about responsibilities
214
- - Provide step-by-step process
215
- - Define output format
216
- - Include quality standards
217
- - Address edge cases
218
- - Keep under 10,000 characters
219
-
220
- ❌ **DON'T:**
221
-
222
- - Write in first person ("I am...", "I will...")
223
- - Be vague or generic
224
- - Omit process steps
225
- - Leave output format undefined
226
- - Skip quality guidance
227
- - Ignore error cases
228
-
229
- ## Creating Agents
230
-
231
- ### Method 1: AI-Assisted Generation
232
-
233
- Use this prompt pattern (extracted from Claude Code):
234
-
235
- ```
236
- Create an agent configuration based on this request: "[YOUR DESCRIPTION]"
237
-
238
- Requirements:
239
- 1. Extract core intent and responsibilities
240
- 2. Design expert persona for the domain
241
- 3. Create comprehensive system prompt with:
242
- - Clear behavioral boundaries
243
- - Specific methodologies
244
- - Edge case handling
245
- - Output format
246
- 4. Create identifier (lowercase, hyphens, 3-50 chars)
247
- 5. Write description with triggering conditions
248
- 6. Include 2-3 <example> blocks showing when to use
249
-
250
- Return JSON with:
251
- {
252
- "identifier": "agent-name",
253
- "whenToUse": "Use this agent when... Examples: <example>...</example>",
254
- "systemPrompt": "You are..."
255
- }
256
- ```
257
-
258
- Then convert to agent file format with frontmatter.
259
-
260
- See `examples/agent-creation-prompt.md` for complete template.
261
-
262
- ### Method 2: Manual Creation
263
-
264
- 1. Choose agent identifier (3-50 chars, lowercase, hyphens)
265
- 2. Write description with examples
266
- 3. Select model (usually `inherit`)
267
- 4. Choose color for visual identification
268
- 5. Define tools (if restricting access)
269
- 6. Write system prompt with structure above
270
- 7. Save as `agents/agent-name.md`
271
-
272
- ## Validation Rules
273
-
274
- ### Identifier Validation
275
-
276
- ```
277
- ✅ Valid: code-reviewer, test-gen, api-analyzer-v2
278
- ❌ Invalid: ag (too short), -start (starts with hyphen), my_agent (underscore)
279
- ```
280
-
281
- **Rules:**
282
-
283
- - 3-50 characters
284
- - Lowercase letters, numbers, hyphens only
285
- - Must start and end with alphanumeric
286
- - No underscores, spaces, or special characters
287
-
288
- ### Description Validation
289
-
290
- **Length:** 10-5,000 characters
291
- **Must include:** Triggering conditions and examples
292
- **Best:** 200-1,000 characters with 2-4 examples
293
-
294
- ### System Prompt Validation
295
-
296
- **Length:** 20-10,000 characters
297
- **Best:** 500-3,000 characters
298
- **Structure:** Clear responsibilities, process, output format
299
-
300
- ## Agent Organization
301
-
302
- ### Plugin Agents Directory
303
-
304
- ```
305
- plugin-name/
306
- └── agents/
307
- ├── analyzer.md
308
- ├── reviewer.md
309
- └── generator.md
310
- ```
311
-
312
- All `.md` files in `agents/` are auto-discovered.
313
-
314
- ### Namespacing
315
-
316
- Agents are namespaced automatically:
317
-
318
- - Single plugin: `agent-name`
319
- - With subdirectories: `plugin:subdir:agent-name`
320
-
321
- ## Testing Agents
322
-
323
- ### Test Triggering
324
-
325
- Create test scenarios to verify agent triggers correctly:
326
-
327
- 1. Write agent with specific triggering examples
328
- 2. Use similar phrasing to examples in test
329
- 3. Check Claude loads the agent
330
- 4. Verify agent provides expected functionality
331
-
332
- ### Test System Prompt
333
-
334
- Ensure system prompt is complete:
335
-
336
- 1. Give agent typical task
337
- 2. Check it follows process steps
338
- 3. Verify output format is correct
339
- 4. Test edge cases mentioned in prompt
340
- 5. Confirm quality standards are met
341
-
342
- ## Quick Reference
343
-
344
- ### Minimal Agent
345
-
346
- ```markdown
347
- ---
348
- name: simple-agent
349
- description: Use this agent when... Examples: <example>...</example>
350
- model: inherit
351
- color: blue
352
- ---
353
-
354
- You are an agent that [does X].
355
-
356
- Process:
357
- 1. [Step 1]
358
- 2. [Step 2]
359
-
360
- Output: [What to provide]
361
- ```
362
-
363
- ### Frontmatter Fields Summary
364
-
365
- | Field | Required | Format | Example |
366
- |-------|----------|--------|---------|
367
- | name | Yes | lowercase-hyphens | code-reviewer |
368
- | description | Yes | Text + examples | Use when... <example>... |
369
- | model | Yes | inherit/sonnet/opus/haiku | inherit |
370
- | color | Yes | Color name | blue |
371
- | tools | No | Array of tool names | ["Read", "Grep"] |
372
-
373
- ### Best Practices
374
-
375
- **DO:**
376
-
377
- - ✅ Include 2-4 concrete examples in description
378
- - ✅ Write specific triggering conditions
379
- - ✅ Use `inherit` for model unless specific need
380
- - ✅ Choose appropriate tools (least privilege)
381
- - ✅ Write clear, structured system prompts
382
- - ✅ Test agent triggering thoroughly
383
-
384
- **DON'T:**
385
-
386
- - ❌ Use generic descriptions without examples
387
- - ❌ Omit triggering conditions
388
- - ❌ Give all agents same color
389
- - ❌ Grant unnecessary tool access
390
- - ❌ Write vague system prompts
391
- - ❌ Skip testing
392
-
393
- ## Additional Resources
394
-
395
- ### Reference Files
396
-
397
- For detailed guidance, consult:
398
-
399
- - **`references/system-prompt-design.md`** - Complete system prompt patterns
400
- - **`references/triggering-examples.md`** - Example formats and best practices
401
- - **`references/agent-creation-system-prompt.md`** - The exact prompt from Claude Code
402
-
403
- ### Example Files
404
-
405
- Working examples in `examples/`:
406
-
407
- - **`agent-creation-prompt.md`** - AI-assisted agent generation template
408
- - **`complete-agent-examples.md`** - Full agent examples for different use cases
409
-
410
- ### Utility Scripts
411
-
412
- Development tools in `scripts/`:
413
-
414
- - **`validate-agent.sh`** - Validate agent file structure
415
- - **`test-agent-trigger.sh`** - Test if agent triggers correctly
416
-
417
- ## Implementation Workflow
418
-
419
- To create an agent for a plugin:
420
-
421
- 1. Define agent purpose and triggering conditions
422
- 2. Choose creation method (AI-assisted or manual)
423
- 3. Create `agents/agent-name.md` file
424
- 4. Write frontmatter with all required fields
425
- 5. Write system prompt following best practices
426
- 6. Include 2-4 triggering examples in description
427
- 7. Validate with `scripts/validate-agent.sh`
428
- 8. Test triggering with real scenarios
429
- 9. Document agent in plugin README
430
-
431
- Focus on clear triggering conditions and comprehensive system prompts for autonomous operation.