cc-dev-template 0.1.6 → 0.1.7
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.
- package/package.json +1 -1
- package/src/skills/create-agent-skills/SKILL.md +24 -68
- package/src/skills/create-agent-skills/references/audit.md +275 -180
- package/src/skills/create-agent-skills/references/create.md +79 -320
- package/src/skills/create-agent-skills/references/modify.md +57 -330
- package/src/skills/create-agent-skills/references/principles.md +77 -0
|
@@ -1,370 +1,129 @@
|
|
|
1
1
|
# Create a New Skill
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Guide the user through building a skill via interactive conversation. Extract their domain knowledge, then produce a properly structured skill.
|
|
4
4
|
|
|
5
|
-
##
|
|
6
|
-
|
|
7
|
-
Transform the user's domain expertise into a reusable skill that:
|
|
8
|
-
- Activates when relevant (good description with trigger phrases)
|
|
9
|
-
- Uses progressive disclosure (lean SKILL.md, heavy content in references/)
|
|
10
|
-
- Follows writing conventions (imperative form, positive framing)
|
|
11
|
-
- Includes appropriate tooling (scripts for deterministic operations)
|
|
12
|
-
|
|
13
|
-
**Success looks like:** The user can restart Claude Code, ask for help with the task the skill covers, and Claude performs exactly as discussed.
|
|
14
|
-
|
|
15
|
-
## Before Starting
|
|
16
|
-
|
|
17
|
-
Read `references/principles.md` to understand skill fundamentals. This workflow assumes familiarity with:
|
|
18
|
-
- Three-level progressive disclosure
|
|
19
|
-
- Frontmatter requirements
|
|
20
|
-
- Writing style (imperative form)
|
|
21
|
-
- Structure patterns
|
|
22
|
-
|
|
23
|
-
## Workflow
|
|
5
|
+
## What To Do
|
|
24
6
|
|
|
25
7
|
<steps>
|
|
26
8
|
|
|
27
|
-
<step name="
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
**Ask about:**
|
|
31
|
-
- What task or workflow should this skill handle?
|
|
32
|
-
- What does the user do repeatedly that they want to standardize?
|
|
33
|
-
- What domain knowledge is required that Claude doesn't naturally have?
|
|
34
|
-
- Are there specific tools, APIs, or file formats involved?
|
|
35
|
-
- What does success look like when this task is done well?
|
|
36
|
-
|
|
37
|
-
**Listen for:**
|
|
38
|
-
- Concrete examples of the task being performed
|
|
39
|
-
- Edge cases and gotchas the user has learned
|
|
40
|
-
- Terminology and concepts specific to this domain
|
|
41
|
-
- Patterns that work well vs. patterns to avoid
|
|
42
|
-
|
|
43
|
-
**Take time here.** The quality of the skill depends on extracting comprehensive domain knowledge. Ask follow-up questions. Request examples. Understand WHY certain approaches work better than others.
|
|
44
|
-
|
|
45
|
-
This is a conversation, not an interrogation. Let the user explain naturally and guide them to cover important aspects.
|
|
46
|
-
</step>
|
|
9
|
+
<step name="Have a Conversation">
|
|
10
|
+
Talk with the user to understand what they need. This is the most important step.
|
|
47
11
|
|
|
48
|
-
|
|
49
|
-
|
|
12
|
+
**Goals of the conversation:**
|
|
13
|
+
- Understand the task they want to standardize
|
|
14
|
+
- Extract domain knowledge Claude doesn't naturally have
|
|
15
|
+
- Learn terminology, patterns, edge cases, gotchas
|
|
16
|
+
- Get concrete examples of the task done well
|
|
50
17
|
|
|
51
|
-
**
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
18
|
+
**Good questions:**
|
|
19
|
+
- "Walk me through how you do this today."
|
|
20
|
+
- "What's the most important thing to get right?"
|
|
21
|
+
- "What mistakes do people commonly make?"
|
|
22
|
+
- "What would an expert know that a beginner wouldn't?"
|
|
55
23
|
|
|
56
|
-
**
|
|
57
|
-
- "Based on what you've described, I'm thinking this skill should be called `[name]` and handle [scope]. Does that capture what you need?"
|
|
58
|
-
- "Should this be a focused skill for just [X], or should it also handle [Y] and [Z]?"
|
|
24
|
+
**Take time here.** The skill's quality depends entirely on understanding the domain deeply. Ask follow-up questions. Request examples. Understand WHY certain approaches work.
|
|
59
25
|
|
|
60
|
-
|
|
61
|
-
- **Focused is better**: One skill = one capability
|
|
62
|
-
- **Split if needed**: "document-processing" should become "pdf-editor" + "xlsx-analyzer"
|
|
63
|
-
- **Group if cohesive**: Related tasks that share context can be one skill with routing
|
|
26
|
+
This should feel like a conversation, not a form to fill out.
|
|
64
27
|
</step>
|
|
65
28
|
|
|
66
|
-
<step name="
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
**Determine what's needed:**
|
|
29
|
+
<step name="Determine Scope and Structure">
|
|
30
|
+
Based on the conversation, decide:
|
|
70
31
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
| Detailed procedures or multiple phases | references/ directory |
|
|
75
|
-
| Repeated code or validation | scripts/ directory |
|
|
76
|
-
| Templates or boilerplate | assets/ directory |
|
|
32
|
+
1. **Name**: What to call it (hyphen-case)
|
|
33
|
+
2. **Scope**: One focused task or multiple related workflows?
|
|
34
|
+
3. **Complexity**: Does it need references/? scripts/? Or just SKILL.md?
|
|
77
35
|
|
|
78
|
-
**
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
skill-name/
|
|
83
|
-
├── SKILL.md (router: ask user intent, route to workflow)
|
|
84
|
-
└── references/
|
|
85
|
-
├── workflow-a.md
|
|
86
|
-
├── workflow-b.md
|
|
87
|
-
└── shared-knowledge.md (if workflows share context)
|
|
88
|
-
```
|
|
36
|
+
**Principles:**
|
|
37
|
+
- Focused is better than broad
|
|
38
|
+
- If it has distinct workflows, use router pattern with references/
|
|
39
|
+
- If it needs reliable code execution, add scripts/
|
|
89
40
|
|
|
90
|
-
|
|
91
|
-
Identify deterministic operations that should be code:
|
|
92
|
-
|
|
93
|
-
```
|
|
94
|
-
skill-name/
|
|
95
|
-
├── SKILL.md
|
|
96
|
-
├── references/
|
|
97
|
-
│ └── ...
|
|
98
|
-
└── scripts/
|
|
99
|
-
├── validate.py # Validation that needs reliability
|
|
100
|
-
└── generate.sh # Code generation
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
**Present the plan to the user:**
|
|
104
|
-
"Here's the structure I'm proposing: [describe]. Does this cover everything?"
|
|
41
|
+
Confirm with user: "I'm thinking this should be called `[name]` and cover [scope]. Sound right?"
|
|
105
42
|
</step>
|
|
106
43
|
|
|
107
44
|
<step name="Craft the Description">
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
**Formula:**
|
|
111
|
-
```
|
|
112
|
-
[What the skill does] + [When to use it with specific trigger phrases]
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
**Process:**
|
|
116
|
-
1. List 5-10 phrases a user might say when they need this skill
|
|
117
|
-
2. Identify the core capability in one sentence
|
|
118
|
-
3. Combine into third-person description under 1024 characters
|
|
119
|
-
|
|
120
|
-
**Example construction:**
|
|
121
|
-
|
|
122
|
-
User phrases:
|
|
123
|
-
- "create a new component"
|
|
124
|
-
- "build me a React component"
|
|
125
|
-
- "make a form component"
|
|
126
|
-
- "scaffold a page"
|
|
127
|
-
- "generate component boilerplate"
|
|
128
|
-
|
|
129
|
-
Core capability: "Creates React components following team conventions"
|
|
130
|
-
|
|
131
|
-
Final description:
|
|
132
|
-
```yaml
|
|
133
|
-
description: This skill should be used when the user asks to "create a component", "build a React component", "scaffold a page", "generate component boilerplate", or mentions creating new UI elements. Creates React components following team conventions with proper TypeScript types, styling patterns, and test files.
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
**Ask the user to validate:**
|
|
137
|
-
"When you need this skill, what would you say to Claude? Let me make sure those phrases are in the description."
|
|
138
|
-
</step>
|
|
139
|
-
|
|
140
|
-
<step name="Write the Content">
|
|
141
|
-
Generate the skill files following all conventions.
|
|
142
|
-
|
|
143
|
-
**Writing rules (from principles.md):**
|
|
144
|
-
|
|
145
|
-
1. **Imperative form**: "Parse the file", not "You should parse"
|
|
146
|
-
2. **Positive framing**: "Use X approach", not "Don't use Y approach"
|
|
147
|
-
3. **Objective tone**: Facts and directives, not suggestions
|
|
148
|
-
4. **Size limits**: SKILL.md under 2,000 words; move detail to references/
|
|
149
|
-
|
|
150
|
-
**Prompting principles (mandatory for quality skills):**
|
|
151
|
-
|
|
152
|
-
1. **Explain WHY, not just WHAT**: Provide purpose and context. Trust Claude's intelligence.
|
|
153
|
-
2. **Define success**: What does good output look like? Include concrete criteria.
|
|
154
|
-
3. **Be clear and direct**: No hedging ("maybe consider..."). State what is needed.
|
|
155
|
-
4. **Provide context**: Who is this for? Why does it matter? What constraints exist?
|
|
156
|
-
5. **Avoid micromanagement**: Goals over step-by-step instructions unless complexity requires it.
|
|
157
|
-
|
|
158
|
-
See `references/principles.md` → "Prompting Principles for Skill Content" for complete guidance.
|
|
159
|
-
|
|
160
|
-
**SKILL.md structure for simple skills:**
|
|
161
|
-
```markdown
|
|
162
|
-
---
|
|
163
|
-
name: skill-name
|
|
164
|
-
description: [crafted description]
|
|
165
|
-
---
|
|
166
|
-
|
|
167
|
-
# Skill Title
|
|
168
|
-
|
|
169
|
-
[Brief purpose - 1-2 sentences]
|
|
170
|
-
|
|
171
|
-
## What To Do
|
|
172
|
-
|
|
173
|
-
[Core instructions in imperative form]
|
|
45
|
+
The description determines when Claude activates the skill. This is critical.
|
|
174
46
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
[Domain knowledge the user shared]
|
|
178
|
-
|
|
179
|
-
## Examples
|
|
180
|
-
|
|
181
|
-
[Concrete examples from the conversation]
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
**SKILL.md structure for routing skills:**
|
|
185
|
-
```markdown
|
|
186
|
-
---
|
|
187
|
-
name: skill-name
|
|
188
|
-
description: [crafted description]
|
|
189
|
-
---
|
|
190
|
-
|
|
191
|
-
# Skill Title
|
|
192
|
-
|
|
193
|
-
[Brief purpose]
|
|
194
|
-
|
|
195
|
-
## What To Do Now
|
|
196
|
-
|
|
197
|
-
<step name="Understand Intent">
|
|
198
|
-
Ask what the user wants to accomplish.
|
|
199
|
-
[Options based on workflows]
|
|
200
|
-
</step>
|
|
201
|
-
|
|
202
|
-
<step name="Route to Workflow">
|
|
203
|
-
| Choice | Action |
|
|
204
|
-
|--------|--------|
|
|
205
|
-
| Option A | Read `references/workflow-a.md` |
|
|
206
|
-
| Option B | Read `references/workflow-b.md` |
|
|
207
|
-
</step>
|
|
208
|
-
|
|
209
|
-
## Quick Reference
|
|
210
|
-
|
|
211
|
-
[Shared knowledge that applies to all workflows]
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
**Reference file structure:**
|
|
215
|
-
```markdown
|
|
216
|
-
# Workflow Name
|
|
217
|
-
|
|
218
|
-
## Purpose
|
|
219
|
-
|
|
220
|
-
[What this workflow accomplishes]
|
|
221
|
-
|
|
222
|
-
## Steps
|
|
223
|
-
|
|
224
|
-
<steps>
|
|
225
|
-
<step name="Step 1">
|
|
226
|
-
[Instructions]
|
|
227
|
-
</step>
|
|
47
|
+
**Collect trigger phrases from user:**
|
|
48
|
+
"When you need this skill, what would you say to Claude?"
|
|
228
49
|
|
|
229
|
-
|
|
230
|
-
|
|
50
|
+
List 5-10 phrases they might use, then combine into a description that:
|
|
51
|
+
- Uses third person ("This skill should be used when...")
|
|
52
|
+
- Includes the actual trigger phrases
|
|
53
|
+
- Stays under 1024 characters
|
|
231
54
|
</step>
|
|
232
|
-
</steps>
|
|
233
|
-
|
|
234
|
-
## Key Principles
|
|
235
55
|
|
|
236
|
-
|
|
237
|
-
|
|
56
|
+
<step name="Write the Skill">
|
|
57
|
+
Create the skill files. Apply these principles:
|
|
238
58
|
|
|
239
|
-
**
|
|
240
|
-
|
|
241
|
-
- Include clear usage comments
|
|
242
|
-
- Handle errors gracefully
|
|
243
|
-
- Make scripts executable (`chmod +x`)
|
|
244
|
-
</step>
|
|
59
|
+
**The skill must be instructions, not documentation.**
|
|
60
|
+
If Claude reads it, it should know what to DO, not just understand what the skill is about.
|
|
245
61
|
|
|
246
|
-
|
|
247
|
-
|
|
62
|
+
**Use progressive disclosure.**
|
|
63
|
+
SKILL.md should be lean (<150 lines for routers, <300 for simple skills). Heavy content goes in references/.
|
|
248
64
|
|
|
249
|
-
**
|
|
65
|
+
**Apply prompting guidelines:**
|
|
66
|
+
- Explain WHY, not just WHAT
|
|
67
|
+
- Define what success looks like
|
|
68
|
+
- Be clear and direct
|
|
69
|
+
- Avoid micromanagement - give goals, not step-by-step unless truly needed
|
|
250
70
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
71
|
+
**Writing style:**
|
|
72
|
+
- Imperative form ("Parse the file", not "You should parse")
|
|
73
|
+
- Positive framing ("Use X approach", not "Don't use Y")
|
|
74
|
+
- No meta-descriptions ("Who this is for", "Success looks like" don't belong in SKILL.md)
|
|
255
75
|
|
|
256
|
-
|
|
257
|
-
"Should this skill be available in all your projects (user level) or just this project/team (project level)?"
|
|
258
|
-
|
|
259
|
-
For this dev-template framework, skills typically go to `src/skills/` first, then get installed to user level via the install script.
|
|
76
|
+
Read `references/principles.md` for the full guide on what makes a good skill.
|
|
260
77
|
</step>
|
|
261
78
|
|
|
262
|
-
<step name="
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
**Order:**
|
|
266
|
-
1. Create directory structure
|
|
267
|
-
2. Write SKILL.md
|
|
268
|
-
3. Write reference files (if any)
|
|
269
|
-
4. Write scripts (if any)
|
|
270
|
-
5. Copy assets (if any)
|
|
79
|
+
<step name="Choose Install Location">
|
|
80
|
+
Ask: "Should this be available everywhere (user level) or just this project (project level)?"
|
|
271
81
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
82
|
+
| Level | Path |
|
|
83
|
+
|-------|------|
|
|
84
|
+
| User | `~/.claude/skills/[name]/` |
|
|
85
|
+
| Project | `.claude/skills/[name]/` |
|
|
276
86
|
</step>
|
|
277
87
|
|
|
278
|
-
<step name="Validate">
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
**Check:**
|
|
282
|
-
- [ ] SKILL.md has valid YAML frontmatter
|
|
283
|
-
- [ ] `name` matches directory name
|
|
284
|
-
- [ ] `description` under 1024 characters
|
|
285
|
-
- [ ] `description` uses third person and has trigger phrases
|
|
286
|
-
- [ ] Body uses imperative form (scan for "you should", "you can")
|
|
287
|
-
- [ ] Body under 2,000 words
|
|
288
|
-
- [ ] All referenced files exist
|
|
289
|
-
- [ ] Scripts are executable (if any)
|
|
88
|
+
<step name="Create and Validate">
|
|
89
|
+
Write the files, then validate:
|
|
290
90
|
|
|
291
|
-
If validation finds issues, fix them immediately.
|
|
292
|
-
|
|
293
|
-
**Run the validation script:**
|
|
294
91
|
```bash
|
|
295
92
|
node ~/.claude/skills/create-agent-skills/scripts/validate-skill.js [skill-path]
|
|
296
93
|
```
|
|
297
|
-
</step>
|
|
298
94
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
2. Start a new conversation
|
|
305
|
-
3. Say one of the trigger phrases from the description
|
|
306
|
-
4. Verify the skill activates and behaves correctly
|
|
95
|
+
Fix any issues found. The validator checks structure, but also manually verify:
|
|
96
|
+
- Is this written as instructions, not documentation?
|
|
97
|
+
- Would Claude know what to DO after reading this?
|
|
98
|
+
- Is heavy content in references/, not inline?
|
|
99
|
+
</step>
|
|
307
100
|
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
101
|
+
<step name="Test">
|
|
102
|
+
Guide the user:
|
|
103
|
+
1. Restart Claude Code
|
|
104
|
+
2. Say one of the trigger phrases
|
|
105
|
+
3. Verify the skill activates and behaves as expected
|
|
312
106
|
|
|
313
|
-
|
|
314
|
-
- Review the instructions—are they clear enough?
|
|
315
|
-
- Check for second-person language that might confuse
|
|
316
|
-
- Verify examples match expected behavior
|
|
107
|
+
If it doesn't work, iterate. The conversation isn't over until the skill works.
|
|
317
108
|
</step>
|
|
318
109
|
|
|
319
110
|
</steps>
|
|
320
111
|
|
|
321
|
-
##
|
|
322
|
-
|
|
323
|
-
### Good Questions to Ask
|
|
324
|
-
|
|
325
|
-
**Understanding the task:**
|
|
326
|
-
- "Walk me through how you do this task today, step by step."
|
|
327
|
-
- "What's the most important thing to get right?"
|
|
328
|
-
- "What mistakes do people commonly make?"
|
|
329
|
-
|
|
330
|
-
**Extracting domain knowledge:**
|
|
331
|
-
- "Is there terminology I should know for this domain?"
|
|
332
|
-
- "Are there patterns that always work well?"
|
|
333
|
-
- "What would a senior person know that a junior wouldn't?"
|
|
334
|
-
|
|
335
|
-
**Clarifying scope:**
|
|
336
|
-
- "Should this skill handle [edge case] or is that out of scope?"
|
|
337
|
-
- "Are there related tasks this should also cover?"
|
|
338
|
-
- "What's the minimal version of this skill that would be useful?"
|
|
339
|
-
|
|
340
|
-
**Validating understanding:**
|
|
341
|
-
- "Let me summarize what I've learned: [summary]. What am I missing?"
|
|
342
|
-
- "Here's a draft of the key instructions. Does this capture your approach?"
|
|
343
|
-
|
|
344
|
-
### Signs the Conversation Needs More Depth
|
|
112
|
+
## Key Principles
|
|
345
113
|
|
|
346
|
-
-
|
|
347
|
-
- No concrete examples have been shared
|
|
348
|
-
- Edge cases haven't been discussed
|
|
349
|
-
- User says "it depends" without explaining on what
|
|
350
|
-
- The domain has jargon that hasn't been defined
|
|
114
|
+
**The conversation matters most.** A well-structured skill with shallow domain knowledge is worse than a rough skill with deep expertise captured.
|
|
351
115
|
|
|
352
|
-
**
|
|
116
|
+
**Skills are prompts.** Every SKILL.md will be read by Claude. Write it as instructions, not as a README.
|
|
353
117
|
|
|
354
|
-
|
|
118
|
+
**Trust Claude's intelligence.** Explain goals and principles. Don't micromanage with exact templates unless the task is genuinely complex or error-prone.
|
|
355
119
|
|
|
356
|
-
|
|
357
|
-
- Multiple concrete examples discussed
|
|
358
|
-
- Edge cases and gotchas identified
|
|
359
|
-
- User has validated your understanding
|
|
360
|
-
- Structure decision made (simple vs. complex)
|
|
120
|
+
**Progressive disclosure.** Load details only when needed. SKILL.md routes to references/, which contain the heavy content.
|
|
361
121
|
|
|
362
|
-
##
|
|
122
|
+
## Quality Check
|
|
363
123
|
|
|
364
|
-
|
|
124
|
+
Before finishing, verify:
|
|
365
125
|
|
|
366
|
-
1. **
|
|
367
|
-
2. **
|
|
368
|
-
3. **
|
|
369
|
-
4. **
|
|
370
|
-
5. **Work on first use** - User can restart and immediately use it
|
|
126
|
+
1. **Would Claude know what to DO?** Not just understand what the skill is about.
|
|
127
|
+
2. **Is domain knowledge captured?** The user's expertise should be in the skill.
|
|
128
|
+
3. **Is it lean?** Heavy content in references/, not SKILL.md.
|
|
129
|
+
4. **Does the description have triggers?** Specific phrases the user would say.
|