cc-dev-template 0.1.6 → 0.1.8
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 +55 -296
- package/src/skills/create-agent-skills/references/create.md +78 -321
- package/src/skills/create-agent-skills/references/modify.md +56 -331
- package/src/skills/create-agent-skills/references/principles.md +103 -390
- package/src/skills/create-agent-skills/templates/router-skill.md +73 -0
- package/src/skills/create-agent-skills/templates/simple-skill.md +33 -0
- package/src/skills/create-agent-skills/workflows/audit-skill.md +3 -0
|
@@ -1,377 +1,102 @@
|
|
|
1
1
|
# Modify an Existing Skill
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Purpose
|
|
6
|
-
|
|
7
|
-
Improve existing skills while maintaining:
|
|
8
|
-
- Structural integrity (valid frontmatter, correct paths)
|
|
9
|
-
- Writing conventions (imperative form, positive framing)
|
|
10
|
-
- Progressive disclosure (lean SKILL.md, heavy content in references/)
|
|
11
|
-
- Activation reliability (good description with triggers)
|
|
12
|
-
|
|
13
|
-
**Success looks like:** The skill works better after modification, passes all validation checks, and the user's specific concerns are addressed.
|
|
14
|
-
|
|
15
|
-
## Before Starting
|
|
16
|
-
|
|
17
|
-
Read `references/principles.md` if not already familiar with skill standards.
|
|
18
|
-
|
|
19
|
-
## Workflow
|
|
3
|
+
## What To Do
|
|
20
4
|
|
|
21
5
|
<steps>
|
|
22
6
|
|
|
23
|
-
<step name="
|
|
7
|
+
<step name="Find the Skill">
|
|
24
8
|
Determine which skill to modify.
|
|
25
9
|
|
|
26
|
-
|
|
27
|
-
The skill path is already known. Proceed to next step.
|
|
28
|
-
|
|
29
|
-
**If user request:**
|
|
30
|
-
Ask which skill they want to modify.
|
|
31
|
-
|
|
32
|
-
Use `AskUserQuestion` with discovered skills as options, or ask for the skill name/path directly.
|
|
33
|
-
|
|
34
|
-
**Find the skill:**
|
|
10
|
+
If coming from audit, the path is known. Otherwise, ask the user or discover:
|
|
35
11
|
```bash
|
|
36
|
-
|
|
37
|
-
ls ~/.claude/skills/[name]/SKILL.md
|
|
38
|
-
|
|
39
|
-
# Check project level
|
|
40
|
-
ls .claude/skills/[name]/SKILL.md
|
|
41
|
-
|
|
42
|
-
# Check source (dev-template)
|
|
43
|
-
ls src/skills/[name]/SKILL.md
|
|
12
|
+
node ~/.claude/skills/create-agent-skills/scripts/find-skills.js
|
|
44
13
|
```
|
|
45
14
|
|
|
46
15
|
Confirm the skill exists before proceeding.
|
|
47
16
|
</step>
|
|
48
17
|
|
|
49
|
-
<step name="
|
|
50
|
-
Read and
|
|
51
|
-
|
|
52
|
-
**Read all skill files:**
|
|
53
|
-
1. SKILL.md (required)
|
|
54
|
-
2. All files in references/ (if exists)
|
|
55
|
-
3. All files in scripts/ (if exists)
|
|
56
|
-
4. List files in assets/ (if exists)
|
|
18
|
+
<step name="Read and Understand">
|
|
19
|
+
Read the entire skill - SKILL.md and all files in references/, scripts/, assets/.
|
|
57
20
|
|
|
58
|
-
|
|
59
|
-
- Current
|
|
60
|
-
-
|
|
61
|
-
-
|
|
62
|
-
- Writing style compliance
|
|
63
|
-
- Resource utilization
|
|
64
|
-
|
|
65
|
-
**Present summary to user:**
|
|
66
|
-
```
|
|
67
|
-
Current state of [skill-name]:
|
|
68
|
-
- Location: [path]
|
|
69
|
-
- Description: [first 100 chars]...
|
|
70
|
-
- SKILL.md size: [X] words
|
|
71
|
-
- References: [list or "none"]
|
|
72
|
-
- Scripts: [list or "none"]
|
|
73
|
-
- Issues found: [list or "none"]
|
|
74
|
-
```
|
|
21
|
+
Summarize for the user:
|
|
22
|
+
- Current structure
|
|
23
|
+
- Word count
|
|
24
|
+
- Any obvious issues (documentation-style writing, inline content that should be in references)
|
|
75
25
|
</step>
|
|
76
26
|
|
|
77
|
-
<step name="Understand
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
| **Fix issues** | Address audit findings (style, size, structure) |
|
|
85
|
-
| **Improve activation** | Better description, more trigger phrases |
|
|
86
|
-
| **Add capability** | New workflow, additional functionality |
|
|
87
|
-
| **Refactor structure** | Move content to references/, add scripts |
|
|
88
|
-
| **Update content** | Revise instructions based on usage experience |
|
|
89
|
-
| **Fix bugs** | Skill doesn't behave as expected |
|
|
90
|
-
|
|
91
|
-
**Ask the user:**
|
|
92
|
-
- "What's not working well with this skill?"
|
|
93
|
-
- "What would you like it to do differently?"
|
|
94
|
-
- "Are there specific issues from an audit to address?"
|
|
27
|
+
<step name="Understand What to Change">
|
|
28
|
+
Ask what the user wants to change:
|
|
29
|
+
- Fix issues from an audit?
|
|
30
|
+
- Improve activation (better description/triggers)?
|
|
31
|
+
- Add new capability?
|
|
32
|
+
- Refactor structure?
|
|
33
|
+
- Fix incorrect behavior?
|
|
95
34
|
|
|
96
|
-
|
|
97
|
-
Reference the specific findings and address each one.
|
|
35
|
+
Get specific about what's wrong and what "fixed" looks like.
|
|
98
36
|
</step>
|
|
99
37
|
|
|
100
|
-
<step name="Plan
|
|
101
|
-
Before
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
2. What specifically changes
|
|
106
|
-
3. Whether new files are needed
|
|
107
|
-
4. Whether files should be deleted or moved
|
|
108
|
-
|
|
109
|
-
**Present plan to user:**
|
|
110
|
-
```
|
|
111
|
-
Proposed changes to [skill-name]:
|
|
112
|
-
|
|
113
|
-
1. SKILL.md
|
|
114
|
-
- Update description to include trigger phrases
|
|
115
|
-
- Convert 12 instances of "you should" to imperative form
|
|
116
|
-
- Move "Advanced Patterns" section to references/
|
|
117
|
-
|
|
118
|
-
2. New file: references/patterns.md
|
|
119
|
-
- Contains moved content from SKILL.md
|
|
120
|
-
- ~800 words
|
|
38
|
+
<step name="Plan Changes">
|
|
39
|
+
Before editing, state what will change:
|
|
40
|
+
- Which files
|
|
41
|
+
- What specifically changes
|
|
42
|
+
- Any new files needed
|
|
121
43
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
Proceed with these changes?
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
Wait for user confirmation before making changes.
|
|
44
|
+
Confirm with user before proceeding.
|
|
128
45
|
</step>
|
|
129
46
|
|
|
130
47
|
<step name="Apply Changes">
|
|
131
|
-
Make the
|
|
48
|
+
Make the modifications. Key rules:
|
|
132
49
|
|
|
133
|
-
**
|
|
50
|
+
**Keep it as instructions, not documentation.**
|
|
51
|
+
If rewriting, ensure Claude would know what to DO after reading.
|
|
134
52
|
|
|
135
|
-
|
|
136
|
-
|
|
53
|
+
**Maintain progressive disclosure.**
|
|
54
|
+
If adding content, consider whether it belongs in references/ instead of SKILL.md.
|
|
137
55
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
- Imperative form
|
|
141
|
-
- Positive framing
|
|
142
|
-
- Third-person descriptions
|
|
143
|
-
- Proper file references
|
|
144
|
-
|
|
145
|
-
### Update References
|
|
146
|
-
If moving content:
|
|
147
|
-
1. Create new reference file with moved content
|
|
148
|
-
2. Update SKILL.md to reference the new file
|
|
149
|
-
3. Verify the reference path is correct
|
|
150
|
-
|
|
151
|
-
### Keep Backups (Optional)
|
|
152
|
-
For significant changes, consider:
|
|
153
|
-
```bash
|
|
154
|
-
cp SKILL.md SKILL.md.backup
|
|
155
|
-
```
|
|
56
|
+
**Follow writing conventions.**
|
|
57
|
+
Imperative form, positive framing, no second person.
|
|
156
58
|
|
|
157
|
-
|
|
158
|
-
1. Structural changes first (new directories, files)
|
|
159
|
-
2. Content moves second
|
|
160
|
-
3. Content edits third
|
|
161
|
-
4. Deletions last
|
|
59
|
+
Read `references/principles.md` for full guidelines.
|
|
162
60
|
</step>
|
|
163
61
|
|
|
164
|
-
<step name="Validate
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
**Run validation:**
|
|
62
|
+
<step name="Validate">
|
|
63
|
+
Run validation:
|
|
168
64
|
```bash
|
|
169
65
|
node ~/.claude/skills/create-agent-skills/scripts/validate-skill.js [skill-path]
|
|
170
66
|
```
|
|
171
67
|
|
|
172
|
-
|
|
173
|
-
-
|
|
174
|
-
-
|
|
175
|
-
-
|
|
176
|
-
- [ ] Word count is acceptable
|
|
177
|
-
- [ ] Writing style is correct
|
|
68
|
+
Also manually verify:
|
|
69
|
+
- Is this instructions, not documentation?
|
|
70
|
+
- Would Claude know what to DO?
|
|
71
|
+
- Is heavy content in references/?
|
|
178
72
|
|
|
179
|
-
|
|
180
|
-
Fix issues before proceeding. Don't leave skill in broken state.
|
|
73
|
+
Fix any issues before finishing.
|
|
181
74
|
</step>
|
|
182
75
|
|
|
183
|
-
<step name="Test
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
2. Test trigger phrases
|
|
189
|
-
3. Verify skill activates
|
|
190
|
-
|
|
191
|
-
**For content changes:**
|
|
192
|
-
1. Activate the skill
|
|
193
|
-
2. Walk through the modified workflow
|
|
194
|
-
3. Verify behavior matches expectations
|
|
195
|
-
|
|
196
|
-
**Ask user to test:**
|
|
197
|
-
"Please restart Claude Code and try using the skill. Let me know if it behaves as expected."
|
|
198
|
-
</step>
|
|
199
|
-
|
|
200
|
-
<step name="Document Changes">
|
|
201
|
-
Record what was changed for future reference.
|
|
202
|
-
|
|
203
|
-
**If skill has version in metadata:**
|
|
204
|
-
```yaml
|
|
205
|
-
metadata:
|
|
206
|
-
version: 1.0.0 → 1.1.0
|
|
207
|
-
```
|
|
208
|
-
|
|
209
|
-
**Summarize changes:**
|
|
210
|
-
```
|
|
211
|
-
Changes made to [skill-name]:
|
|
212
|
-
- Fixed 12 second-person violations
|
|
213
|
-
- Added 5 trigger phrases to description
|
|
214
|
-
- Moved patterns section to references/patterns.md
|
|
215
|
-
- Reduced SKILL.md from 3,200 to 1,800 words
|
|
216
|
-
```
|
|
76
|
+
<step name="Test">
|
|
77
|
+
If the change affects behavior:
|
|
78
|
+
1. Reinstall if needed
|
|
79
|
+
2. Restart Claude Code
|
|
80
|
+
3. Test that the skill works as expected
|
|
217
81
|
</step>
|
|
218
82
|
|
|
219
83
|
</steps>
|
|
220
84
|
|
|
221
85
|
## Common Modifications
|
|
222
86
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
**Find instances:**
|
|
226
|
-
```
|
|
227
|
-
Search for: "you should", "you can", "you need", "you might", "you will", "your"
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
**Convert to imperative:**
|
|
231
|
-
|
|
232
|
-
| Before | After |
|
|
233
|
-
|--------|-------|
|
|
234
|
-
| You should parse the file | Parse the file |
|
|
235
|
-
| You can use grep | Use grep |
|
|
236
|
-
| If you need validation | For validation |
|
|
237
|
-
| You might want to check | Consider checking |
|
|
238
|
-
| Your configuration | The configuration |
|
|
239
|
-
|
|
240
|
-
### Improve Description
|
|
241
|
-
|
|
242
|
-
**Current (bad):**
|
|
243
|
-
```yaml
|
|
244
|
-
description: Helps with API development.
|
|
245
|
-
```
|
|
246
|
-
|
|
247
|
-
**Improved (good):**
|
|
248
|
-
```yaml
|
|
249
|
-
description: This skill should be used when the user asks to "create an API endpoint", "add a REST route", "build an API", or mentions API design, endpoint creation, or REST patterns. Provides guidance for building RESTful APIs with proper error handling and validation.
|
|
250
|
-
```
|
|
251
|
-
|
|
252
|
-
**Process:**
|
|
253
|
-
1. Ask user: "What do you say when you need this skill?"
|
|
254
|
-
2. Collect 5-10 phrases
|
|
255
|
-
3. Combine with capability summary
|
|
256
|
-
4. Keep under 1024 characters
|
|
257
|
-
|
|
258
|
-
### Restructure for Size
|
|
259
|
-
|
|
260
|
-
**Current (too large):**
|
|
261
|
-
```
|
|
262
|
-
skill/
|
|
263
|
-
└── SKILL.md (4,000 words)
|
|
264
|
-
```
|
|
265
|
-
|
|
266
|
-
**Restructured:**
|
|
267
|
-
```
|
|
268
|
-
skill/
|
|
269
|
-
├── SKILL.md (1,500 words - router + essentials)
|
|
270
|
-
└── references/
|
|
271
|
-
├── detailed-workflow.md (1,500 words)
|
|
272
|
-
└── patterns.md (1,000 words)
|
|
273
|
-
```
|
|
274
|
-
|
|
275
|
-
**Process:**
|
|
276
|
-
1. Identify logical sections in oversized SKILL.md
|
|
277
|
-
2. Determine what's essential (stays in SKILL.md)
|
|
278
|
-
3. Move detailed content to references/
|
|
279
|
-
4. Add clear references: "For detailed workflow, read `references/detailed-workflow.md`"
|
|
280
|
-
|
|
281
|
-
### Add Scripts
|
|
282
|
-
|
|
283
|
-
**When to add scripts:**
|
|
284
|
-
- Same code gets written repeatedly
|
|
285
|
-
- Operation needs deterministic reliability
|
|
286
|
-
- Validation that must be consistent
|
|
287
|
-
|
|
288
|
-
**Process:**
|
|
289
|
-
1. Identify the operation to script
|
|
290
|
-
2. Write script in appropriate language
|
|
291
|
-
3. Add to scripts/ directory
|
|
292
|
-
4. Reference in SKILL.md: "Run `scripts/validate.py` to check"
|
|
293
|
-
5. Make executable: `chmod +x scripts/validate.py`
|
|
294
|
-
|
|
295
|
-
### Convert Negative to Positive Framing
|
|
296
|
-
|
|
297
|
-
| Negative | Positive |
|
|
298
|
-
|----------|----------|
|
|
299
|
-
| Don't use deprecated APIs | Use only current, supported APIs |
|
|
300
|
-
| Never commit secrets | Store secrets in environment variables |
|
|
301
|
-
| Avoid long functions | Keep functions under 50 lines |
|
|
302
|
-
| Don't skip tests | Include tests for all new code |
|
|
303
|
-
|
|
304
|
-
### Add New Workflow
|
|
305
|
-
|
|
306
|
-
**For routing skills:**
|
|
307
|
-
|
|
308
|
-
1. Create new reference file: `references/new-workflow.md`
|
|
309
|
-
2. Add routing option in SKILL.md
|
|
310
|
-
3. Update description if new triggers needed
|
|
311
|
-
|
|
312
|
-
**Structure of new workflow file:**
|
|
313
|
-
```markdown
|
|
314
|
-
# New Workflow Name
|
|
315
|
-
|
|
316
|
-
## Purpose
|
|
317
|
-
|
|
318
|
-
[What this workflow accomplishes]
|
|
319
|
-
|
|
320
|
-
## Steps
|
|
321
|
-
|
|
322
|
-
<steps>
|
|
323
|
-
<step name="Step 1">
|
|
324
|
-
[Instructions]
|
|
325
|
-
</step>
|
|
326
|
-
</steps>
|
|
327
|
-
|
|
328
|
-
## Key Principles
|
|
329
|
-
|
|
330
|
-
[Domain knowledge for this workflow]
|
|
331
|
-
```
|
|
332
|
-
|
|
333
|
-
## Modification Checklist
|
|
334
|
-
|
|
335
|
-
Before completing any modification:
|
|
336
|
-
|
|
337
|
-
- [ ] All changes follow skill conventions
|
|
338
|
-
- [ ] Frontmatter still valid
|
|
339
|
-
- [ ] All references point to existing files
|
|
340
|
-
- [ ] SKILL.md under 2,000 words (or justified)
|
|
341
|
-
- [ ] No second person in body
|
|
342
|
-
- [ ] Positive framing throughout
|
|
343
|
-
- [ ] User has confirmed changes are correct
|
|
344
|
-
- [ ] Validation passes
|
|
345
|
-
|
|
346
|
-
## Edge Cases
|
|
347
|
-
|
|
348
|
-
### Skill Has No Issues But User Wants Changes
|
|
349
|
-
|
|
350
|
-
Proceed with user's requested changes while ensuring no regressions. Run full validation after.
|
|
351
|
-
|
|
352
|
-
### Multiple Skills Need Same Fix
|
|
353
|
-
|
|
354
|
-
Consider creating a batch modification:
|
|
355
|
-
1. List all skills needing the fix
|
|
356
|
-
2. Apply same fix pattern to each
|
|
357
|
-
3. Validate all at once
|
|
358
|
-
|
|
359
|
-
### User Wants to Delete a Skill
|
|
360
|
-
|
|
361
|
-
```bash
|
|
362
|
-
# Backup first
|
|
363
|
-
cp -r [skill-path] [skill-path].backup
|
|
364
|
-
|
|
365
|
-
# Remove
|
|
366
|
-
rm -rf [skill-path]
|
|
367
|
-
```
|
|
87
|
+
**Fix documentation-style writing:**
|
|
88
|
+
Rewrite sections that describe the skill ("This skill does X") as instructions ("Do X").
|
|
368
89
|
|
|
369
|
-
|
|
90
|
+
**Improve activation:**
|
|
91
|
+
Collect trigger phrases from user, add to description in third person with quotes.
|
|
370
92
|
|
|
371
|
-
|
|
93
|
+
**Move content to references:**
|
|
94
|
+
Identify inline content (schemas, detailed explanations) that should be loaded on-demand. Create reference file, add pointer in SKILL.md.
|
|
372
95
|
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
96
|
+
**Fix second person:**
|
|
97
|
+
"You should parse" → "Parse"
|
|
98
|
+
"You can use" → "Use"
|
|
376
99
|
|
|
377
|
-
|
|
100
|
+
**Fix negative framing:**
|
|
101
|
+
"Don't skip validation" → "Always validate"
|
|
102
|
+
"Never assume" → "Verify explicitly"
|