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,377 +1,104 @@
|
|
|
1
1
|
# Modify an Existing Skill
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Fix issues, add capabilities, or refine behavior of an existing skill.
|
|
4
4
|
|
|
5
|
-
##
|
|
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
|
|
5
|
+
## What To Do
|
|
20
6
|
|
|
21
7
|
<steps>
|
|
22
8
|
|
|
23
|
-
<step name="
|
|
9
|
+
<step name="Find the Skill">
|
|
24
10
|
Determine which skill to modify.
|
|
25
11
|
|
|
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:**
|
|
12
|
+
If coming from audit, the path is known. Otherwise, ask the user or discover:
|
|
35
13
|
```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
|
|
14
|
+
node ~/.claude/skills/create-agent-skills/scripts/find-skills.js
|
|
44
15
|
```
|
|
45
16
|
|
|
46
17
|
Confirm the skill exists before proceeding.
|
|
47
18
|
</step>
|
|
48
19
|
|
|
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)
|
|
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
|
|
20
|
+
<step name="Read and Understand">
|
|
21
|
+
Read the entire skill - SKILL.md and all files in references/, scripts/, assets/.
|
|
64
22
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
-
|
|
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
|
-
```
|
|
23
|
+
Summarize for the user:
|
|
24
|
+
- Current structure
|
|
25
|
+
- Word count
|
|
26
|
+
- Any obvious issues (documentation-style writing, inline content that should be in references)
|
|
75
27
|
</step>
|
|
76
28
|
|
|
77
|
-
<step name="Understand
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
29
|
+
<step name="Understand What to Change">
|
|
30
|
+
Ask what the user wants to change:
|
|
31
|
+
- Fix issues from an audit?
|
|
32
|
+
- Improve activation (better description/triggers)?
|
|
33
|
+
- Add new capability?
|
|
34
|
+
- Refactor structure?
|
|
35
|
+
- Fix incorrect behavior?
|
|
81
36
|
|
|
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?"
|
|
95
|
-
|
|
96
|
-
**For audit-driven modifications:**
|
|
97
|
-
Reference the specific findings and address each one.
|
|
37
|
+
Get specific about what's wrong and what "fixed" looks like.
|
|
98
38
|
</step>
|
|
99
39
|
|
|
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
|
|
121
|
-
|
|
122
|
-
3. No changes to: scripts/validate.py
|
|
40
|
+
<step name="Plan Changes">
|
|
41
|
+
Before editing, state what will change:
|
|
42
|
+
- Which files
|
|
43
|
+
- What specifically changes
|
|
44
|
+
- Any new files needed
|
|
123
45
|
|
|
124
|
-
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
Wait for user confirmation before making changes.
|
|
46
|
+
Confirm with user before proceeding.
|
|
128
47
|
</step>
|
|
129
48
|
|
|
130
49
|
<step name="Apply Changes">
|
|
131
|
-
Make the
|
|
132
|
-
|
|
133
|
-
**Follow these rules:**
|
|
50
|
+
Make the modifications. Key rules:
|
|
134
51
|
|
|
135
|
-
|
|
136
|
-
|
|
52
|
+
**Keep it as instructions, not documentation.**
|
|
53
|
+
If rewriting, ensure Claude would know what to DO after reading.
|
|
137
54
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
- Imperative form
|
|
141
|
-
- Positive framing
|
|
142
|
-
- Third-person descriptions
|
|
143
|
-
- Proper file references
|
|
55
|
+
**Maintain progressive disclosure.**
|
|
56
|
+
If adding content, consider whether it belongs in references/ instead of SKILL.md.
|
|
144
57
|
|
|
145
|
-
|
|
146
|
-
|
|
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
|
-
```
|
|
58
|
+
**Follow writing conventions.**
|
|
59
|
+
Imperative form, positive framing, no second person.
|
|
156
60
|
|
|
157
|
-
|
|
158
|
-
1. Structural changes first (new directories, files)
|
|
159
|
-
2. Content moves second
|
|
160
|
-
3. Content edits third
|
|
161
|
-
4. Deletions last
|
|
61
|
+
Read `references/principles.md` for full guidelines.
|
|
162
62
|
</step>
|
|
163
63
|
|
|
164
|
-
<step name="Validate
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
**Run validation:**
|
|
64
|
+
<step name="Validate">
|
|
65
|
+
Run validation:
|
|
168
66
|
```bash
|
|
169
67
|
node ~/.claude/skills/create-agent-skills/scripts/validate-skill.js [skill-path]
|
|
170
68
|
```
|
|
171
69
|
|
|
172
|
-
|
|
173
|
-
-
|
|
174
|
-
-
|
|
175
|
-
-
|
|
176
|
-
- [ ] Word count is acceptable
|
|
177
|
-
- [ ] Writing style is correct
|
|
70
|
+
Also manually verify:
|
|
71
|
+
- Is this instructions, not documentation?
|
|
72
|
+
- Would Claude know what to DO?
|
|
73
|
+
- Is heavy content in references/?
|
|
178
74
|
|
|
179
|
-
|
|
180
|
-
Fix issues before proceeding. Don't leave skill in broken state.
|
|
75
|
+
Fix any issues before finishing.
|
|
181
76
|
</step>
|
|
182
77
|
|
|
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
|
-
```
|
|
78
|
+
<step name="Test">
|
|
79
|
+
If the change affects behavior:
|
|
80
|
+
1. Reinstall if needed
|
|
81
|
+
2. Restart Claude Code
|
|
82
|
+
3. Test that the skill works as expected
|
|
217
83
|
</step>
|
|
218
84
|
|
|
219
85
|
</steps>
|
|
220
86
|
|
|
221
87
|
## Common Modifications
|
|
222
88
|
|
|
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
|
-
```
|
|
89
|
+
**Fix documentation-style writing:**
|
|
90
|
+
Rewrite sections that describe the skill ("This skill does X") as instructions ("Do X").
|
|
368
91
|
|
|
369
|
-
|
|
92
|
+
**Improve activation:**
|
|
93
|
+
Collect trigger phrases from user, add to description in third person with quotes.
|
|
370
94
|
|
|
371
|
-
|
|
95
|
+
**Move content to references:**
|
|
96
|
+
Identify inline content (schemas, detailed explanations) that should be loaded on-demand. Create reference file, add pointer in SKILL.md.
|
|
372
97
|
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
98
|
+
**Fix second person:**
|
|
99
|
+
"You should parse" → "Parse"
|
|
100
|
+
"You can use" → "Use"
|
|
376
101
|
|
|
377
|
-
|
|
102
|
+
**Fix negative framing:**
|
|
103
|
+
"Don't skip validation" → "Always validate"
|
|
104
|
+
"Never assume" → "Verify explicitly"
|
|
@@ -16,6 +16,83 @@ This document contains the deep knowledge required to create, audit, and modify
|
|
|
16
16
|
|
|
17
17
|
When a skill "activates," Claude simply reads the SKILL.md file. The file contains natural language instructions telling Claude what to do.
|
|
18
18
|
|
|
19
|
+
## The Most Common Mistake: Documentation vs Instructions
|
|
20
|
+
|
|
21
|
+
**This is the #1 reason skills fail.** People write SKILL.md as if it's a README explaining what the skill does. But SKILL.md IS the prompt—it must tell Claude what to DO.
|
|
22
|
+
|
|
23
|
+
### Documentation (WRONG)
|
|
24
|
+
|
|
25
|
+
```markdown
|
|
26
|
+
## Purpose
|
|
27
|
+
|
|
28
|
+
This skill orchestrates the complete migration of Oracle Forms to React/Go.
|
|
29
|
+
|
|
30
|
+
**Who this is for**: Developers migrating Oracle Forms.
|
|
31
|
+
|
|
32
|
+
**Success looks like**: Running /implement-form progresses through all phases.
|
|
33
|
+
|
|
34
|
+
## How It Works
|
|
35
|
+
|
|
36
|
+
The skill has 12 phases. Phase 1 does scaffolding, Phase 2 does discovery...
|
|
37
|
+
|
|
38
|
+
## YAML Schema
|
|
39
|
+
|
|
40
|
+
```yaml
|
|
41
|
+
form:
|
|
42
|
+
name: FORMNAME
|
|
43
|
+
prefix: xx
|
|
44
|
+
status: in_progress
|
|
45
|
+
# ... 50 more lines of schema
|
|
46
|
+
```
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**Why this fails:** Claude reads this and thinks "interesting information, but what should I DO right now?" There are no actionable instructions.
|
|
50
|
+
|
|
51
|
+
### Instructions (CORRECT)
|
|
52
|
+
|
|
53
|
+
```markdown
|
|
54
|
+
## What To Do Now
|
|
55
|
+
|
|
56
|
+
<step name="Get Form Name">
|
|
57
|
+
Ask which form to implement. Store the form name.
|
|
58
|
+
</step>
|
|
59
|
+
|
|
60
|
+
<step name="Check Workflow State">
|
|
61
|
+
Look for `.claude/workflows/{formname}/workflow.yaml`
|
|
62
|
+
|
|
63
|
+
If exists: Read it, determine current phase.
|
|
64
|
+
If not: Create new workflow, start at phase 1.
|
|
65
|
+
</step>
|
|
66
|
+
|
|
67
|
+
<step name="Route to Phase">
|
|
68
|
+
Based on `currentPhase`, read the appropriate file:
|
|
69
|
+
|
|
70
|
+
| Phase | File |
|
|
71
|
+
|-------|------|
|
|
72
|
+
| phase1 | `references/phase1.md` |
|
|
73
|
+
| phase2 | `references/phase2.md` |
|
|
74
|
+
</step>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
**Why this works:** Claude knows exactly what to do. Each step is an action. Heavy content (schemas, phase details) lives in references/.
|
|
78
|
+
|
|
79
|
+
### Red Flags in SKILL.md
|
|
80
|
+
|
|
81
|
+
| Red Flag | Problem |
|
|
82
|
+
|----------|---------|
|
|
83
|
+
| "Who this is for:" | Meta-description. Claude doesn't need audience info. |
|
|
84
|
+
| "Success looks like:" | Describes outcomes, doesn't instruct. |
|
|
85
|
+
| "This skill orchestrates..." | Describes what skill IS, not what to DO. |
|
|
86
|
+
| "The purpose is..." | Documentation language. |
|
|
87
|
+
| Large inline schemas | Reference material, not instructions. |
|
|
88
|
+
| Phase explanations | Should route to phase files, not explain inline. |
|
|
89
|
+
|
|
90
|
+
### The Test
|
|
91
|
+
|
|
92
|
+
After writing SKILL.md, ask: **"If Claude reads this right now, does it know what action to take?"**
|
|
93
|
+
|
|
94
|
+
If the answer is "it would understand what the skill is about" but not "it would know what to do," rewrite it.
|
|
95
|
+
|
|
19
96
|
## Why Progressive Disclosure Matters
|
|
20
97
|
|
|
21
98
|
### The Problem Without Skills
|