cc-dev-template 0.1.4 → 0.1.6
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/bin/install.js +23 -16
- package/package.json +1 -1
- package/src/skills/create-agent-skills/SKILL.md +95 -0
- package/src/skills/create-agent-skills/references/audit.md +334 -0
- package/src/skills/create-agent-skills/references/create.md +370 -0
- package/src/skills/create-agent-skills/references/modify.md +377 -0
- package/src/skills/create-agent-skills/references/principles.md +537 -0
- package/src/skills/create-agent-skills/scripts/find-skills.js +206 -0
- package/src/skills/create-agent-skills/scripts/validate-skill.js +386 -0
- package/src/skills/orchestration/SKILL.md +1 -1
- package/src/skills/orchestration/references/planning/draft.md +24 -1
- package/src/skills/orchestration/references/planning/explore.md +5 -2
- package/src/skills/orchestration/references/planning/finalize.md +6 -1
- package/src/skills/orchestration/scripts/plan-status.js +1 -1
|
@@ -0,0 +1,377 @@
|
|
|
1
|
+
# Modify an Existing Skill
|
|
2
|
+
|
|
3
|
+
This workflow guides improvements to existing skills. Use it to fix issues found during audits, add new capabilities, or refine skill behavior based on usage experience.
|
|
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
|
|
20
|
+
|
|
21
|
+
<steps>
|
|
22
|
+
|
|
23
|
+
<step name="Identify the Skill">
|
|
24
|
+
Determine which skill to modify.
|
|
25
|
+
|
|
26
|
+
**If coming from audit:**
|
|
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:**
|
|
35
|
+
```bash
|
|
36
|
+
# Check user level
|
|
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
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Confirm the skill exists before proceeding.
|
|
47
|
+
</step>
|
|
48
|
+
|
|
49
|
+
<step name="Understand Current State">
|
|
50
|
+
Read and analyze the existing skill.
|
|
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)
|
|
57
|
+
|
|
58
|
+
**Analyze:**
|
|
59
|
+
- Current frontmatter (name, description)
|
|
60
|
+
- Overall structure and organization
|
|
61
|
+
- Word count and complexity
|
|
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
|
+
```
|
|
75
|
+
</step>
|
|
76
|
+
|
|
77
|
+
<step name="Understand Desired Changes">
|
|
78
|
+
Discuss what the user wants to change.
|
|
79
|
+
|
|
80
|
+
**Common modification types:**
|
|
81
|
+
|
|
82
|
+
| Type | Description |
|
|
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?"
|
|
95
|
+
|
|
96
|
+
**For audit-driven modifications:**
|
|
97
|
+
Reference the specific findings and address each one.
|
|
98
|
+
</step>
|
|
99
|
+
|
|
100
|
+
<step name="Plan the Changes">
|
|
101
|
+
Before making changes, create a clear plan.
|
|
102
|
+
|
|
103
|
+
**For each change, identify:**
|
|
104
|
+
1. What file(s) need modification
|
|
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
|
|
121
|
+
|
|
122
|
+
3. No changes to: scripts/validate.py
|
|
123
|
+
|
|
124
|
+
Proceed with these changes?
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Wait for user confirmation before making changes.
|
|
128
|
+
</step>
|
|
129
|
+
|
|
130
|
+
<step name="Apply Changes">
|
|
131
|
+
Make the planned modifications.
|
|
132
|
+
|
|
133
|
+
**Follow these rules:**
|
|
134
|
+
|
|
135
|
+
### Preserve Valid Content
|
|
136
|
+
Keep working content intact. Only change what needs changing.
|
|
137
|
+
|
|
138
|
+
### Maintain Conventions
|
|
139
|
+
All changes must follow skill conventions:
|
|
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
|
+
```
|
|
156
|
+
|
|
157
|
+
**Apply changes in order:**
|
|
158
|
+
1. Structural changes first (new directories, files)
|
|
159
|
+
2. Content moves second
|
|
160
|
+
3. Content edits third
|
|
161
|
+
4. Deletions last
|
|
162
|
+
</step>
|
|
163
|
+
|
|
164
|
+
<step name="Validate Changes">
|
|
165
|
+
After modifications, verify the skill is correct.
|
|
166
|
+
|
|
167
|
+
**Run validation:**
|
|
168
|
+
```bash
|
|
169
|
+
node ~/.claude/skills/create-agent-skills/scripts/validate-skill.js [skill-path]
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
**Manual checks:**
|
|
173
|
+
- [ ] SKILL.md still has valid frontmatter
|
|
174
|
+
- [ ] All references point to existing files
|
|
175
|
+
- [ ] No broken paths
|
|
176
|
+
- [ ] Word count is acceptable
|
|
177
|
+
- [ ] Writing style is correct
|
|
178
|
+
|
|
179
|
+
**If validation fails:**
|
|
180
|
+
Fix issues before proceeding. Don't leave skill in broken state.
|
|
181
|
+
</step>
|
|
182
|
+
|
|
183
|
+
<step name="Test the Skill">
|
|
184
|
+
Verify the skill works as expected.
|
|
185
|
+
|
|
186
|
+
**For activation changes:**
|
|
187
|
+
1. Restart Claude Code
|
|
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
|
+
```
|
|
217
|
+
</step>
|
|
218
|
+
|
|
219
|
+
</steps>
|
|
220
|
+
|
|
221
|
+
## Common Modifications
|
|
222
|
+
|
|
223
|
+
### Fix Second Person
|
|
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
|
+
```
|
|
368
|
+
|
|
369
|
+
Confirm with user before deleting.
|
|
370
|
+
|
|
371
|
+
### Skill Is Part of a Plugin or Framework
|
|
372
|
+
|
|
373
|
+
Check if skill is:
|
|
374
|
+
- In src/skills/ (development version)
|
|
375
|
+
- In ~/.claude/skills/ (installed version)
|
|
376
|
+
|
|
377
|
+
Modify the source version (src/skills/) and reinstall, rather than modifying installed version directly.
|