@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,676 +0,0 @@
1
- ---
2
- name: Skill Development
3
- description: This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill content", or needs guidance on skill structure, progressive disclosure, or skill development best practices for Claude Code plugins.
4
- version: 0.1.0
5
- ---
6
-
7
- # Skill Development for Claude Code Plugins
8
-
9
- This skill provides guidance for creating effective skills for Claude Code plugins.
10
-
11
- ## About Skills
12
-
13
- Skills are modular, self-contained packages that extend Claude's capabilities by providing
14
- specialized knowledge, workflows, and tools. Think of them as "onboarding guides" for specific
15
- domains or tasks—they transform Claude from a general-purpose agent into a specialized agent
16
- equipped with procedural knowledge that no model can fully possess.
17
-
18
- ### What Skills Provide
19
-
20
- 1. Specialized workflows - Multi-step procedures for specific domains
21
- 2. Tool integrations - Instructions for working with specific file formats or APIs
22
- 3. Domain expertise - Company-specific knowledge, schemas, business logic
23
- 4. Bundled resources - Scripts, references, and assets for complex and repetitive tasks
24
-
25
- ### Anatomy of a Skill
26
-
27
- Every skill consists of a required SKILL.md file and optional bundled resources:
28
-
29
- ```
30
- skill-name/
31
- ├── SKILL.md (required)
32
- │ ├── YAML frontmatter metadata (required)
33
- │ │ ├── name: (required)
34
- │ │ └── description: (required)
35
- │ └── Markdown instructions (required)
36
- └── Bundled Resources (optional)
37
- ├── scripts/ - Executable code (Python/Bash/etc.)
38
- ├── references/ - Documentation intended to be loaded into context as needed
39
- └── assets/ - Files used in output (templates, icons, fonts, etc.)
40
- ```
41
-
42
- #### SKILL.md (required)
43
-
44
- **Metadata Quality:** The `name` and `description` in YAML frontmatter determine when Claude will use the skill. Be specific about what the skill does and when to use it. Use the third-person (e.g. "This skill should be used when..." instead of "Use this skill when...").
45
-
46
- #### Bundled Resources (optional)
47
-
48
- ##### Scripts (`scripts/`)
49
-
50
- Executable code (Python/Bash/etc.) for tasks that require deterministic reliability or are repeatedly rewritten.
51
-
52
- - **When to include**: When the same code is being rewritten repeatedly or deterministic reliability is needed
53
- - **Example**: `scripts/rotate_pdf.py` for PDF rotation tasks
54
- - **Benefits**: Token efficient, deterministic, may be executed without loading into context
55
- - **Note**: Scripts may still need to be read by Claude for patching or environment-specific adjustments
56
-
57
- ##### References (`references/`)
58
-
59
- Documentation and reference material intended to be loaded as needed into context to inform Claude's process and thinking.
60
-
61
- - **When to include**: For documentation that Claude should reference while working
62
- - **Examples**: `references/finance.md` for financial schemas, `references/mnda.md` for company NDA template, `references/policies.md` for company policies, `references/api_docs.md` for API specifications
63
- - **Use cases**: Database schemas, API documentation, domain knowledge, company policies, detailed workflow guides
64
- - **Benefits**: Keeps SKILL.md lean, loaded only when Claude determines it's needed
65
- - **Best practice**: If files are large (>10k words), include grep search patterns in SKILL.md
66
- - **Avoid duplication**: Information should live in either SKILL.md or references files, not both. Prefer references files for detailed information unless it's truly core to the skill—this keeps SKILL.md lean while making information discoverable without hogging the context window. Keep only essential procedural instructions and workflow guidance in SKILL.md; move detailed reference material, schemas, and examples to references files.
67
-
68
- ##### Assets (`assets/`)
69
-
70
- Files not intended to be loaded into context, but rather used within the output Claude produces.
71
-
72
- - **When to include**: When the skill needs files that will be used in the final output
73
- - **Examples**: `assets/logo.png` for brand assets, `assets/slides.pptx` for PowerPoint templates, `assets/frontend-template/` for HTML/React boilerplate, `assets/font.ttf` for typography
74
- - **Use cases**: Templates, images, icons, boilerplate code, fonts, sample documents that get copied or modified
75
- - **Benefits**: Separates output resources from documentation, enables Claude to use files without loading them into context
76
-
77
- ### Progressive Disclosure Design Principle
78
-
79
- Skills use a three-level loading system to manage context efficiently:
80
-
81
- 1. **Metadata (name + description)** - Always in context (~100 words)
82
- 2. **SKILL.md body** - When skill triggers (<5k words)
83
- 3. **Bundled resources** - As needed by Claude (Unlimited*)
84
-
85
- *Unlimited because scripts can be executed without reading into context window.
86
-
87
- ## Skill Creation Process
88
-
89
- To create a skill, follow the "Skill Creation Process" in order, skipping steps only if there is a clear reason why they are not applicable.
90
-
91
- ### Step 1: Understanding the Skill with Concrete Examples
92
-
93
- Skip this step only when the skill's usage patterns are already clearly understood. It remains valuable even when working with an existing skill.
94
-
95
- To create an effective skill, clearly understand concrete examples of how the skill will be used. This understanding can come from either direct user examples or generated examples that are validated with user feedback.
96
-
97
- For example, when building an image-editor skill, relevant questions include:
98
-
99
- - "What functionality should the image-editor skill support? Editing, rotating, anything else?"
100
- - "Can you give some examples of how this skill would be used?"
101
- - "I can imagine users asking for things like 'Remove the red-eye from this image' or 'Rotate this image'. Are there other ways you imagine this skill being used?"
102
- - "What would a user say that should trigger this skill?"
103
-
104
- To avoid overwhelming users, avoid asking too many questions in a single message. Start with the most important questions and follow up as needed for better effectiveness.
105
-
106
- Conclude this step when there is a clear sense of the functionality the skill should support.
107
-
108
- ### Step 2: Planning the Reusable Skill Contents
109
-
110
- To turn concrete examples into an effective skill, analyze each example by:
111
-
112
- 1. Considering how to execute on the example from scratch
113
- 2. Identifying what scripts, references, and assets would be helpful when executing these workflows repeatedly
114
-
115
- Example: When building a `pdf-editor` skill to handle queries like "Help me rotate this PDF," the analysis shows:
116
-
117
- 1. Rotating a PDF requires re-writing the same code each time
118
- 2. A `scripts/rotate_pdf.py` script would be helpful to store in the skill
119
-
120
- Example: When designing a `frontend-webapp-builder` skill for queries like "Build me a todo app" or "Build me a dashboard to track my steps," the analysis shows:
121
-
122
- 1. Writing a frontend webapp requires the same boilerplate HTML/React each time
123
- 2. An `assets/hello-world/` template containing the boilerplate HTML/React project files would be helpful to store in the skill
124
-
125
- Example: When building a `big-query` skill to handle queries like "How many users have logged in today?" the analysis shows:
126
-
127
- 1. Querying BigQuery requires re-discovering the table schemas and relationships each time
128
- 2. A `references/schema.md` file documenting the table schemas would be helpful to store in the skill
129
-
130
- **For Claude Code plugins:** When building a hooks skill, the analysis shows:
131
-
132
- 1. Developers repeatedly need to validate hooks.json and test hook scripts
133
- 2. `scripts/validate-hook-schema.sh` and `scripts/test-hook.sh` utilities would be helpful
134
- 3. `references/patterns.md` for detailed hook patterns to avoid bloating SKILL.md
135
-
136
- To establish the skill's contents, analyze each concrete example to create a list of the reusable resources to include: scripts, references, and assets.
137
-
138
- ### Step 3: Create Skill Structure
139
-
140
- For Claude Code plugins, create the skill directory structure:
141
-
142
- ```bash
143
- mkdir -p plugin-name/skills/skill-name/{references,examples,scripts}
144
- touch plugin-name/skills/skill-name/SKILL.md
145
- ```
146
-
147
- **Note:** Unlike the generic skill-creator which uses `init_skill.py`, plugin skills are created directly in the plugin's `skills/` directory with a simpler manual structure.
148
-
149
- ### Step 4: Edit the Skill
150
-
151
- When editing the (newly-created or existing) skill, remember that the skill is being created for another instance of Claude to use. Focus on including information that would be beneficial and non-obvious to Claude. Consider what procedural knowledge, domain-specific details, or reusable assets would help another Claude instance execute these tasks more effectively.
152
-
153
- #### Start with Reusable Skill Contents
154
-
155
- To begin implementation, start with the reusable resources identified above: `scripts/`, `references/`, and `assets/` files. Note that this step may require user input. For example, when implementing a `brand-guidelines` skill, the user may need to provide brand assets or templates to store in `assets/`, or documentation to store in `references/`.
156
-
157
- Also, delete any example files and directories not needed for the skill. Create only the directories you actually need (references/, examples/, scripts/).
158
-
159
- #### Update SKILL.md
160
-
161
- **Writing Style:** Write the entire skill using **imperative/infinitive form** (verb-first instructions), not second person. Use objective, instructional language (e.g., "To accomplish X, do Y" rather than "You should do X" or "If you need to do X"). This maintains consistency and clarity for AI consumption.
162
-
163
- **Description (Frontmatter):** Use third-person format with specific trigger phrases:
164
-
165
- ```yaml
166
- ---
167
- name: Skill Name
168
- description: This skill should be used when the user asks to "specific phrase 1", "specific phrase 2", "specific phrase 3". Include exact phrases users would say that should trigger this skill. Be concrete and specific.
169
- version: 0.1.0
170
- ---
171
- ```
172
-
173
- **Good description examples:**
174
-
175
- ```yaml
176
- description: This skill should be used when the user asks to "create a hook", "add a PreToolUse hook", "validate tool use", "implement prompt-based hooks", or mentions hook events (PreToolUse, PostToolUse, Stop).
177
- ```
178
-
179
- **Bad description examples:**
180
-
181
- ```yaml
182
- description: Use this skill when working with hooks. # Wrong person, vague
183
- description: Load when user needs hook help. # Not third person
184
- description: Provides hook guidance. # No trigger phrases
185
- ```
186
-
187
- To complete SKILL.md body, answer the following questions:
188
-
189
- 1. What is the purpose of the skill, in a few sentences?
190
- 2. When should the skill be used? (Include this in frontmatter description with specific triggers)
191
- 3. In practice, how should Claude use the skill? All reusable skill contents developed above should be referenced so that Claude knows how to use them.
192
-
193
- **Keep SKILL.md lean:** Target 1,500-2,000 words for the body. Move detailed content to references/:
194
-
195
- - Detailed patterns → `references/patterns.md`
196
- - Advanced techniques → `references/advanced.md`
197
- - Migration guides → `references/migration.md`
198
- - API references → `references/api-reference.md`
199
-
200
- **Reference resources in SKILL.md:**
201
-
202
- ```markdown
203
- ## Additional Resources
204
-
205
- ### Reference Files
206
-
207
- For detailed patterns and techniques, consult:
208
- - **`references/patterns.md`** - Common patterns
209
- - **`references/advanced.md`** - Advanced use cases
210
-
211
- ### Example Files
212
-
213
- Working examples in `examples/`:
214
- - **`example-script.sh`** - Working example
215
- ```
216
-
217
- ### Step 5: Validate and Test
218
-
219
- **For plugin skills, validation is different from generic skills:**
220
-
221
- 1. **Check structure**: Skill directory in `plugin-name/skills/skill-name/`
222
- 2. **Validate SKILL.md**: Has frontmatter with name and description
223
- 3. **Check trigger phrases**: Description includes specific user queries
224
- 4. **Verify writing style**: Body uses imperative/infinitive form, not second person
225
- 5. **Test progressive disclosure**: SKILL.md is lean (~1,500-2,000 words), detailed content in references/
226
- 6. **Check references**: All referenced files exist
227
- 7. **Validate examples**: Examples are complete and correct
228
- 8. **Test scripts**: Scripts are executable and work correctly
229
-
230
- **Use the skill-reviewer agent:**
231
-
232
- ```
233
- Ask: "Review my skill and check if it follows best practices"
234
- ```
235
-
236
- The skill-reviewer agent will check description quality, content organization, and progressive disclosure.
237
-
238
- ### Step 6: Iterate
239
-
240
- After testing the skill, users may request improvements. Often this happens right after using the skill, with fresh context of how the skill performed.
241
-
242
- **Iteration workflow:**
243
-
244
- 1. Use the skill on real tasks
245
- 2. Notice struggles or inefficiencies
246
- 3. Identify how SKILL.md or bundled resources should be updated
247
- 4. Implement changes and test again
248
-
249
- **Common improvements:**
250
-
251
- - Strengthen trigger phrases in description
252
- - Move long sections from SKILL.md to references/
253
- - Add missing examples or scripts
254
- - Clarify ambiguous instructions
255
- - Add edge case handling
256
-
257
- ## Plugin-Specific Considerations
258
-
259
- ### Skill Location in Plugins
260
-
261
- Plugin skills live in the plugin's `skills/` directory:
262
-
263
- ```
264
- my-plugin/
265
- ├── .claude-plugin/
266
- │ └── plugin.json
267
- ├── commands/
268
- ├── agents/
269
- └── skills/
270
- └── my-skill/
271
- ├── SKILL.md
272
- ├── references/
273
- ├── examples/
274
- └── scripts/
275
- ```
276
-
277
- ### Auto-Discovery
278
-
279
- Claude Code automatically discovers skills:
280
-
281
- - Scans `skills/` directory
282
- - Finds subdirectories containing `SKILL.md`
283
- - Loads skill metadata (name + description) always
284
- - Loads SKILL.md body when skill triggers
285
- - Loads references/examples when needed
286
-
287
- ### No Packaging Needed
288
-
289
- Plugin skills are distributed as part of the plugin, not as separate ZIP files. Users get skills when they install the plugin.
290
-
291
- ### Testing in Plugins
292
-
293
- Test skills by installing plugin locally:
294
-
295
- ```bash
296
- # Test with --plugin-dir
297
- cc --plugin-dir /path/to/plugin
298
-
299
- # Ask questions that should trigger the skill
300
- # Verify skill loads correctly
301
- ```
302
-
303
- ## Examples from Plugin-Dev
304
-
305
- Study the skills in this plugin as examples of best practices:
306
-
307
- **hook-development skill:**
308
-
309
- - Excellent trigger phrases: "create a hook", "add a PreToolUse hook", etc.
310
- - Lean SKILL.md (1,651 words)
311
- - 3 references/ files for detailed content
312
- - 3 examples/ of working hooks
313
- - 3 scripts/ utilities
314
-
315
- **agent-development skill:**
316
-
317
- - Strong triggers: "create an agent", "agent frontmatter", etc.
318
- - Focused SKILL.md (1,438 words)
319
- - References include the AI generation prompt from Claude Code
320
- - Complete agent examples
321
-
322
- **plugin-settings skill:**
323
-
324
- - Specific triggers: "plugin settings", ".local.md files", "YAML frontmatter"
325
- - References show real implementations (multi-agent-swarm, ralph-wiggum)
326
- - Working parsing scripts
327
-
328
- Each demonstrates progressive disclosure and strong triggering.
329
-
330
- ## Progressive Disclosure in Practice
331
-
332
- ### What Goes in SKILL.md
333
-
334
- **Include (always loaded when skill triggers):**
335
-
336
- - Core concepts and overview
337
- - Essential procedures and workflows
338
- - Quick reference tables
339
- - Pointers to references/examples/scripts
340
- - Most common use cases
341
-
342
- **Keep under 3,000 words, ideally 1,500-2,000 words**
343
-
344
- ### What Goes in references/
345
-
346
- **Move to references/ (loaded as needed):**
347
-
348
- - Detailed patterns and advanced techniques
349
- - Comprehensive API documentation
350
- - Migration guides
351
- - Edge cases and troubleshooting
352
- - Extensive examples and walkthroughs
353
-
354
- **Each reference file can be large (2,000-5,000+ words)**
355
-
356
- ### What Goes in examples/
357
-
358
- **Working code examples:**
359
-
360
- - Complete, runnable scripts
361
- - Configuration files
362
- - Template files
363
- - Real-world usage examples
364
-
365
- **Users can copy and adapt these directly**
366
-
367
- ### What Goes in scripts/
368
-
369
- **Utility scripts:**
370
-
371
- - Validation tools
372
- - Testing helpers
373
- - Parsing utilities
374
- - Automation scripts
375
-
376
- **Should be executable and documented**
377
-
378
- ## Writing Style Requirements
379
-
380
- ### Imperative/Infinitive Form
381
-
382
- Write using verb-first instructions, not second person:
383
-
384
- **Correct (imperative):**
385
-
386
- ```
387
- To create a hook, define the event type.
388
- Configure the MCP server with authentication.
389
- Validate settings before use.
390
- ```
391
-
392
- **Incorrect (second person):**
393
-
394
- ```
395
- You should create a hook by defining the event type.
396
- You need to configure the MCP server.
397
- You must validate settings before use.
398
- ```
399
-
400
- ### Third-Person in Description
401
-
402
- The frontmatter description must use third person:
403
-
404
- **Correct:**
405
-
406
- ```yaml
407
- description: This skill should be used when the user asks to "create X", "configure Y"...
408
- ```
409
-
410
- **Incorrect:**
411
-
412
- ```yaml
413
- description: Use this skill when you want to create X...
414
- description: Load this skill when user asks...
415
- ```
416
-
417
- ### Objective, Instructional Language
418
-
419
- Focus on what to do, not who should do it:
420
-
421
- **Correct:**
422
-
423
- ```
424
- Parse the frontmatter using sed.
425
- Extract fields with grep.
426
- Validate values before use.
427
- ```
428
-
429
- **Incorrect:**
430
-
431
- ```
432
- You can parse the frontmatter...
433
- Claude should extract fields...
434
- The user might validate values...
435
- ```
436
-
437
- ## Validation Checklist
438
-
439
- Before finalizing a skill:
440
-
441
- **Structure:**
442
-
443
- - [ ] SKILL.md file exists with valid YAML frontmatter
444
- - [ ] Frontmatter has `name` and `description` fields
445
- - [ ] Markdown body is present and substantial
446
- - [ ] Referenced files actually exist
447
-
448
- **Description Quality:**
449
-
450
- - [ ] Uses third person ("This skill should be used when...")
451
- - [ ] Includes specific trigger phrases users would say
452
- - [ ] Lists concrete scenarios ("create X", "configure Y")
453
- - [ ] Not vague or generic
454
-
455
- **Content Quality:**
456
-
457
- - [ ] SKILL.md body uses imperative/infinitive form
458
- - [ ] Body is focused and lean (1,500-2,000 words ideal, <5k max)
459
- - [ ] Detailed content moved to references/
460
- - [ ] Examples are complete and working
461
- - [ ] Scripts are executable and documented
462
-
463
- **Progressive Disclosure:**
464
-
465
- - [ ] Core concepts in SKILL.md
466
- - [ ] Detailed docs in references/
467
- - [ ] Working code in examples/
468
- - [ ] Utilities in scripts/
469
- - [ ] SKILL.md references these resources
470
-
471
- **Testing:**
472
-
473
- - [ ] Skill triggers on expected user queries
474
- - [ ] Content is helpful for intended tasks
475
- - [ ] No duplicated information across files
476
- - [ ] References load when needed
477
-
478
- ## Common Mistakes to Avoid
479
-
480
- ### Mistake 1: Weak Trigger Description
481
-
482
- ❌ **Bad:**
483
-
484
- ```yaml
485
- description: Provides guidance for working with hooks.
486
- ```
487
-
488
- **Why bad:** Vague, no specific trigger phrases, not third person
489
-
490
- ✅ **Good:**
491
-
492
- ```yaml
493
- description: This skill should be used when the user asks to "create a hook", "add a PreToolUse hook", "validate tool use", or mentions hook events. Provides comprehensive hooks API guidance.
494
- ```
495
-
496
- **Why good:** Third person, specific phrases, concrete scenarios
497
-
498
- ### Mistake 2: Too Much in SKILL.md
499
-
500
- ❌ **Bad:**
501
-
502
- ```
503
- skill-name/
504
- └── SKILL.md (8,000 words - everything in one file)
505
- ```
506
-
507
- **Why bad:** Bloats context when skill loads, detailed content always loaded
508
-
509
- ✅ **Good:**
510
-
511
- ```
512
- skill-name/
513
- ├── SKILL.md (1,800 words - core essentials)
514
- └── references/
515
- ├── patterns.md (2,500 words)
516
- └── advanced.md (3,700 words)
517
- ```
518
-
519
- **Why good:** Progressive disclosure, detailed content loaded only when needed
520
-
521
- ### Mistake 3: Second Person Writing
522
-
523
- ❌ **Bad:**
524
-
525
- ```markdown
526
- You should start by reading the configuration file.
527
- You need to validate the input.
528
- You can use the grep tool to search.
529
- ```
530
-
531
- **Why bad:** Second person, not imperative form
532
-
533
- ✅ **Good:**
534
-
535
- ```markdown
536
- Start by reading the configuration file.
537
- Validate the input before processing.
538
- Use the grep tool to search for patterns.
539
- ```
540
-
541
- **Why good:** Imperative form, direct instructions
542
-
543
- ### Mistake 4: Missing Resource References
544
-
545
- ❌ **Bad:**
546
-
547
- ```markdown
548
- # SKILL.md
549
-
550
- [Core content]
551
-
552
- [No mention of references/ or examples/]
553
- ```
554
-
555
- **Why bad:** Claude doesn't know references exist
556
-
557
- ✅ **Good:**
558
-
559
- ```markdown
560
- # SKILL.md
561
-
562
- [Core content]
563
-
564
- ## Additional Resources
565
-
566
- ### Reference Files
567
- - **`references/patterns.md`** - Detailed patterns
568
- - **`references/advanced.md`** - Advanced techniques
569
-
570
- ### Examples
571
- - **`examples/script.sh`** - Working example
572
- ```
573
-
574
- **Why good:** Claude knows where to find additional information
575
-
576
- ## Quick Reference
577
-
578
- ### Minimal Skill
579
-
580
- ```
581
- skill-name/
582
- └── SKILL.md
583
- ```
584
-
585
- Good for: Simple knowledge, no complex resources needed
586
-
587
- ### Standard Skill (Recommended)
588
-
589
- ```
590
- skill-name/
591
- ├── SKILL.md
592
- ├── references/
593
- │ └── detailed-guide.md
594
- └── examples/
595
- └── working-example.sh
596
- ```
597
-
598
- Good for: Most plugin skills with detailed documentation
599
-
600
- ### Complete Skill
601
-
602
- ```
603
- skill-name/
604
- ├── SKILL.md
605
- ├── references/
606
- │ ├── patterns.md
607
- │ └── advanced.md
608
- ├── examples/
609
- │ ├── example1.sh
610
- │ └── example2.json
611
- └── scripts/
612
- └── validate.sh
613
- ```
614
-
615
- Good for: Complex domains with validation utilities
616
-
617
- ## Best Practices Summary
618
-
619
- ✅ **DO:**
620
-
621
- - Use third-person in description ("This skill should be used when...")
622
- - Include specific trigger phrases ("create X", "configure Y")
623
- - Keep SKILL.md lean (1,500-2,000 words)
624
- - Use progressive disclosure (move details to references/)
625
- - Write in imperative/infinitive form
626
- - Reference supporting files clearly
627
- - Provide working examples
628
- - Create utility scripts for common operations
629
- - Study plugin-dev's skills as templates
630
-
631
- ❌ **DON'T:**
632
-
633
- - Use second person anywhere
634
- - Have vague trigger conditions
635
- - Put everything in SKILL.md (>3,000 words without references/)
636
- - Write in second person ("You should...")
637
- - Leave resources unreferenced
638
- - Include broken or incomplete examples
639
- - Skip validation
640
-
641
- ## Additional Resources
642
-
643
- ### Study These Skills
644
-
645
- Plugin-dev's skills demonstrate best practices:
646
-
647
- - `../hook-development/` - Progressive disclosure, utilities
648
- - `../agent-development/` - AI-assisted creation, references
649
- - `../mcp-integration/` - Comprehensive references
650
- - `../plugin-settings/` - Real-world examples
651
- - `../command-development/` - Clear critical concepts
652
- - `../plugin-structure/` - Good organization
653
-
654
- ### Reference Files
655
-
656
- For complete skill-creator methodology:
657
-
658
- - **`references/skill-creator-original.md`** - Full original skill-creator content
659
-
660
- ## Implementation Workflow
661
-
662
- To create a skill for your plugin:
663
-
664
- 1. **Understand use cases**: Identify concrete examples of skill usage
665
- 2. **Plan resources**: Determine what scripts/references/examples needed
666
- 3. **Create structure**: `mkdir -p skills/skill-name/{references,examples,scripts}`
667
- 4. **Write SKILL.md**:
668
- - Frontmatter with third-person description and trigger phrases
669
- - Lean body (1,500-2,000 words) in imperative form
670
- - Reference supporting files
671
- 5. **Add resources**: Create references/, examples/, scripts/ as needed
672
- 6. **Validate**: Check description, writing style, organization
673
- 7. **Test**: Verify skill loads on expected triggers
674
- 8. **Iterate**: Improve based on usage
675
-
676
- Focus on strong trigger descriptions, progressive disclosure, and imperative writing style for effective skills that load when needed and provide targeted guidance.