cc-dev-template 0.1.7 → 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/references/audit.md +55 -391
- package/src/skills/create-agent-skills/references/create.md +0 -2
- package/src/skills/create-agent-skills/references/modify.md +0 -2
- package/src/skills/create-agent-skills/references/principles.md +40 -404
- 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
package/package.json
CHANGED
|
@@ -1,429 +1,93 @@
|
|
|
1
1
|
# Audit Existing Skills
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Read `references/principles.md` first.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## What To Do
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
- Writing style violations
|
|
7
|
+
1. **Discover skills** - Run `scripts/find-skills.js` to list available skills
|
|
8
|
+
2. **Ask which to audit** - Get user's choice (all, user-level, project-level, or specific skill)
|
|
9
|
+
3. **Read everything** - Read SKILL.md AND every file in references/, workflows/, scripts/
|
|
10
|
+
4. **Evaluate each file** - Ask: Would Claude know what to DO after reading this?
|
|
11
|
+
5. **Report findings** - Present issues with principle violated and suggested fix
|
|
13
12
|
|
|
14
|
-
|
|
13
|
+
## What Makes a Good Skill
|
|
15
14
|
|
|
16
|
-
|
|
15
|
+
**Actionability**: Every file tells Claude what to DO, not what the skill is ABOUT.
|
|
17
16
|
|
|
18
|
-
|
|
17
|
+
**Progressive disclosure**: SKILL.md is lean (<150 lines). Heavy content lives in references/. Claude loads what it needs when it needs it.
|
|
19
18
|
|
|
20
|
-
**
|
|
19
|
+
**Routing coherence**: Multi-phase skills route to reference files. Each file hands off clearly to the next step or completes the flow.
|
|
21
20
|
|
|
22
|
-
|
|
21
|
+
**No dead ends**: At every point, Claude knows what to do next.
|
|
23
22
|
|
|
24
|
-
|
|
23
|
+
## How to Audit
|
|
25
24
|
|
|
26
|
-
|
|
27
|
-
Find skills at both user and project levels.
|
|
25
|
+
### 1. Discover and Read Everything
|
|
28
26
|
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
~/.claude/skills/ # User-level skills
|
|
32
|
-
.claude/skills/ # Project-level skills (current project)
|
|
33
|
-
src/skills/ # Source skills (if in dev-template)
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
**Run the discovery script:**
|
|
37
|
-
```bash
|
|
38
|
-
node ~/.claude/skills/create-agent-skills/scripts/find-skills.js
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
**For each skill found, record:**
|
|
42
|
-
- Full path to SKILL.md
|
|
43
|
-
- Skill name (directory name)
|
|
44
|
-
- Location type (user/project/source)
|
|
45
|
-
</step>
|
|
46
|
-
|
|
47
|
-
<step name="Ask Audit Scope">
|
|
48
|
-
Determine what to audit.
|
|
49
|
-
|
|
50
|
-
Use `AskUserQuestion`:
|
|
51
|
-
- **All skills** - Review everything discovered
|
|
52
|
-
- **User-level only** - Just ~/.claude/skills/
|
|
53
|
-
- **Project-level only** - Just .claude/skills/
|
|
54
|
-
- **Specific skill** - Name the skill to audit
|
|
55
|
-
|
|
56
|
-
If user selects "Specific skill," ask which one from the discovered list.
|
|
57
|
-
</step>
|
|
58
|
-
|
|
59
|
-
<step name="Audit Each Skill">
|
|
60
|
-
For each skill in scope, **READ THE ENTIRE SKILL.MD FILE** and perform these checks in order. The first check is the most important.
|
|
61
|
-
|
|
62
|
-
---
|
|
63
|
-
|
|
64
|
-
### CHECK 0: Is This Written as a Prompt? (CRITICAL)
|
|
65
|
-
|
|
66
|
-
**This is the most important check.** Read the entire SKILL.md and evaluate:
|
|
67
|
-
|
|
68
|
-
**Is it instructions TO Claude, or documentation ABOUT the skill?**
|
|
69
|
-
|
|
70
|
-
A SKILL.md should tell Claude what to DO right now. It should NOT describe what the skill is, who it's for, or how it works abstractly.
|
|
71
|
-
|
|
72
|
-
**Red flags that indicate documentation, not a prompt:**
|
|
73
|
-
|
|
74
|
-
| Red Flag | Why It's Wrong |
|
|
75
|
-
|----------|----------------|
|
|
76
|
-
| "Who this is for: Developers..." | Meta-description. Claude doesn't need to know the audience. |
|
|
77
|
-
| "Success looks like: Running X produces Y" | Meta-description. This describes outcomes, doesn't instruct. |
|
|
78
|
-
| "This skill orchestrates..." | Describes what skill IS, not what to DO. |
|
|
79
|
-
| "The purpose of this skill is..." | Documentation language, not instruction. |
|
|
80
|
-
| Large inline schemas (YAML, JSON examples) | Should be in references/, loaded when needed. |
|
|
81
|
-
| Explaining how phases work abstractly | Should just route to phase files with instructions. |
|
|
82
|
-
|
|
83
|
-
**What a good SKILL.md looks like:**
|
|
84
|
-
|
|
85
|
-
```markdown
|
|
86
|
-
## What To Do Now
|
|
87
|
-
|
|
88
|
-
<step name="Get Input">
|
|
89
|
-
Ask the user which form to implement.
|
|
90
|
-
</step>
|
|
91
|
-
|
|
92
|
-
<step name="Check State">
|
|
93
|
-
Look for existing workflow at `.claude/workflows/{formname}/workflow.yaml`
|
|
94
|
-
|
|
95
|
-
If exists: Read it, determine current phase.
|
|
96
|
-
If not: Initialize new workflow.
|
|
97
|
-
</step>
|
|
98
|
-
|
|
99
|
-
<step name="Route to Phase">
|
|
100
|
-
Based on current phase, read the appropriate file:
|
|
101
|
-
|
|
102
|
-
| Phase | File |
|
|
103
|
-
|-------|------|
|
|
104
|
-
| phase1 | `references/phase1.md` |
|
|
105
|
-
| phase2 | `references/phase2.md` |
|
|
106
|
-
</step>
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
**What a BAD SKILL.md looks like:**
|
|
110
|
-
|
|
111
|
-
```markdown
|
|
112
|
-
## Purpose
|
|
113
|
-
|
|
114
|
-
This skill orchestrates the complete migration of Oracle Forms...
|
|
115
|
-
|
|
116
|
-
**Who this is for**: Developers migrating Oracle Forms.
|
|
27
|
+
Use `scripts/find-skills.js` to list available skills. After selecting a skill to audit:
|
|
117
28
|
|
|
118
|
-
|
|
29
|
+
- Read SKILL.md completely
|
|
30
|
+
- Read every file in references/, workflows/, and any other subdirectories
|
|
31
|
+
- Trace the execution path: if SKILL.md says "read references/phase1.md", read that file too
|
|
119
32
|
|
|
120
|
-
|
|
33
|
+
**You cannot audit a skill without reading all its files.**
|
|
121
34
|
|
|
122
|
-
|
|
35
|
+
### 2. Evaluate Each File
|
|
123
36
|
|
|
124
|
-
|
|
37
|
+
For each file, ask:
|
|
125
38
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
**Evaluation questions:**
|
|
132
|
-
|
|
133
|
-
1. If Claude reads this right now, does it know what to DO?
|
|
134
|
-
2. Is there a clear "What To Do Now" section with concrete steps?
|
|
135
|
-
3. Or does it just describe what the skill is and how it works?
|
|
39
|
+
- After reading this, would Claude know what to DO next?
|
|
40
|
+
- Does this tell Claude what to DO, or just describe what the skill is ABOUT?
|
|
41
|
+
- Does this file hand off clearly to another file, or is there a dead end?
|
|
42
|
+
- Are any referenced files missing?
|
|
136
43
|
|
|
137
|
-
|
|
138
|
-
- **CRITICAL** if SKILL.md reads like documentation
|
|
139
|
-
- **CRITICAL** if large schemas/examples are inline instead of in references/
|
|
140
|
-
- **CRITICAL** if no clear action instructions exist
|
|
44
|
+
### 3. Note External Dependencies
|
|
141
45
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
```
|
|
46
|
+
If the skill references:
|
|
47
|
+
- Sub-agents (e.g., "spawn adr-agent")
|
|
48
|
+
- Commands (e.g., "run /create-adr")
|
|
49
|
+
- Scripts outside the skill directory
|
|
147
50
|
|
|
148
|
-
|
|
51
|
+
Flag these with their expected locations. They aren't audited here, but the user should know they exist.
|
|
149
52
|
|
|
150
|
-
###
|
|
53
|
+
### 4. Check Structural Basics
|
|
151
54
|
|
|
152
|
-
|
|
55
|
+
- SKILL.md has valid YAML frontmatter (name, description)
|
|
56
|
+
- Name matches directory name
|
|
57
|
+
- Description explains WHEN to use (trigger phrases), not just WHAT it does
|
|
58
|
+
- Files referenced in SKILL.md actually exist
|
|
153
59
|
|
|
154
|
-
|
|
155
|
-
|--------------|--------------|-----|
|
|
156
|
-
| YAML/JSON schemas | `references/schemas.md` | Loaded only when needed |
|
|
157
|
-
| Detailed phase explanations | `references/phaseN.md` | Progressive disclosure |
|
|
158
|
-
| Examples >10 lines | `references/examples.md` | Keep SKILL.md lean |
|
|
159
|
-
| API documentation | `references/api.md` | Not needed upfront |
|
|
160
|
-
| Historical context | `references/background.md` | Not actionable |
|
|
60
|
+
## Red Flags
|
|
161
61
|
|
|
162
|
-
**
|
|
163
|
-
- Code blocks >20 lines
|
|
164
|
-
- Tables >10 rows
|
|
165
|
-
- Schema definitions
|
|
166
|
-
- Detailed explanations of internals
|
|
62
|
+
**Documentation language**: "This skill orchestrates...", "Who this is for:", "Success looks like:" - these describe, they don't instruct.
|
|
167
63
|
|
|
168
|
-
**
|
|
169
|
-
```
|
|
170
|
-
CONTENT: [skill-name] - ~150 lines of YAML schemas should be in references/
|
|
171
|
-
CONTENT: [skill-name] - Phase explanations (lines 50-200) should be in separate phase files
|
|
172
|
-
CONTENT: [skill-name] - "Key Design Principles" section is background, not instructions
|
|
173
|
-
```
|
|
64
|
+
**Inline heavy content**: Large YAML schemas, detailed examples, extensive phase explanations - these belong in references/.
|
|
174
65
|
|
|
175
|
-
|
|
66
|
+
**No clear action**: After reading a file, Claude doesn't know what to do next.
|
|
176
67
|
|
|
177
|
-
|
|
68
|
+
**Missing routing**: Multi-phase skill but all content inline instead of routing to reference files.
|
|
178
69
|
|
|
179
|
-
|
|
70
|
+
## Report Format
|
|
180
71
|
|
|
181
|
-
Does SKILL.md act as a lean router that:
|
|
182
|
-
1. Asks/determines what to do
|
|
183
|
-
2. Routes to the appropriate reference file
|
|
184
|
-
3. Lets the reference file contain the detailed instructions
|
|
185
|
-
|
|
186
|
-
**Good pattern:**
|
|
187
|
-
```markdown
|
|
188
|
-
<step name="Route to Phase">
|
|
189
|
-
| currentPhase | Action |
|
|
190
|
-
|--------------|--------|
|
|
191
|
-
| phase1 | Read `references/phase1.md` |
|
|
192
|
-
| phase2 | Read `references/phase2.md` |
|
|
193
|
-
</step>
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
**Bad pattern:**
|
|
197
72
|
```markdown
|
|
198
|
-
|
|
199
|
-
[100 lines of phase 1 instructions]
|
|
200
|
-
|
|
201
|
-
## Phase 2: Discovery
|
|
202
|
-
[100 lines of phase 2 instructions]
|
|
203
|
-
|
|
204
|
-
## Phase 3: Analysis
|
|
205
|
-
[100 lines of phase 3 instructions]
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
**Record issues:**
|
|
209
|
-
```
|
|
210
|
-
ROUTER: [skill-name] - Has 12 phases but all instructions inline. Should route to reference files.
|
|
211
|
-
ROUTER: [skill-name] - references/ directory exists but SKILL.md doesn't route to it.
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
---
|
|
215
|
-
|
|
216
|
-
### CHECK 3: Structure Validation
|
|
217
|
-
|
|
218
|
-
**Verify:**
|
|
219
|
-
- [ ] SKILL.md exists
|
|
220
|
-
- [ ] SKILL.md has YAML frontmatter (starts with `---`)
|
|
221
|
-
- [ ] Frontmatter has `name` field
|
|
222
|
-
- [ ] Frontmatter has `description` field
|
|
223
|
-
- [ ] `name` matches directory name
|
|
224
|
-
- [ ] `name` is hyphen-case (lowercase, hyphens only)
|
|
225
|
-
|
|
226
|
-
**Record issues:**
|
|
227
|
-
```
|
|
228
|
-
STRUCTURE: [skill-name] - [specific issue]
|
|
229
|
-
```
|
|
230
|
-
|
|
231
|
-
---
|
|
232
|
-
|
|
233
|
-
### CHECK 4: Description Quality
|
|
234
|
-
|
|
235
|
-
**Read the description and verify:**
|
|
236
|
-
- [ ] Under 1024 characters
|
|
237
|
-
- [ ] Uses third person ("This skill should be used when...")
|
|
238
|
-
- [ ] Contains specific trigger phrases users would say
|
|
239
|
-
- [ ] Explains WHEN to use, not just WHAT it does
|
|
240
|
-
|
|
241
|
-
**Record issues:**
|
|
242
|
-
```
|
|
243
|
-
DESCRIPTION: [skill-name] - [specific issue]
|
|
244
|
-
```
|
|
73
|
+
# Audit Report: [skill-name]
|
|
245
74
|
|
|
246
|
-
|
|
75
|
+
## Summary
|
|
76
|
+
- Files audited: [list all files read]
|
|
77
|
+
- External dependencies: [list any sub-agents, commands, scripts referenced]
|
|
247
78
|
|
|
248
|
-
|
|
79
|
+
## Findings
|
|
249
80
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
**
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
**Record issues:**
|
|
257
|
-
```
|
|
258
|
-
STYLE: [skill-name] - Found [count] instances of second person
|
|
259
|
-
STYLE: [skill-name] - Negative framing: "[example]"
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
---
|
|
263
|
-
|
|
264
|
-
### CHECK 6: Size Analysis
|
|
265
|
-
|
|
266
|
-
**Measure:**
|
|
267
|
-
- Word count of SKILL.md body
|
|
268
|
-
- Line count
|
|
269
|
-
|
|
270
|
-
**Thresholds:**
|
|
271
|
-
| Metric | Good | Warning | Critical |
|
|
272
|
-
|--------|------|---------|----------|
|
|
273
|
-
| Words | <2,000 | 2,000-3,500 | >3,500 |
|
|
274
|
-
| Lines | <300 | 300-500 | >500 |
|
|
275
|
-
|
|
276
|
-
**Record issues:**
|
|
277
|
-
```
|
|
278
|
-
SIZE: [skill-name] - SKILL.md is [X] words ([Y] lines) - needs restructuring
|
|
279
|
-
```
|
|
280
|
-
|
|
281
|
-
---
|
|
282
|
-
|
|
283
|
-
### CHECK 7: Reference Integrity
|
|
284
|
-
|
|
285
|
-
**For every path mentioned in SKILL.md:**
|
|
286
|
-
- Verify file exists
|
|
287
|
-
- Flag broken references
|
|
288
|
-
|
|
289
|
-
**For every file in references/:**
|
|
290
|
-
- Check if SKILL.md mentions it
|
|
291
|
-
- Flag orphaned files
|
|
292
|
-
|
|
293
|
-
**Record issues:**
|
|
294
|
-
```
|
|
295
|
-
BROKEN: [skill-name] - References `references/phase1.md` but file doesn't exist
|
|
296
|
-
ORPHAN: [skill-name] - `references/old-workflow.md` exists but isn't referenced
|
|
297
|
-
```
|
|
298
|
-
|
|
299
|
-
</step>
|
|
300
|
-
|
|
301
|
-
<step name="Generate Report">
|
|
302
|
-
Compile findings, prioritizing CRITICAL issues first.
|
|
303
|
-
|
|
304
|
-
**Report format:**
|
|
305
|
-
|
|
306
|
-
```markdown
|
|
307
|
-
# Skill Audit Report
|
|
308
|
-
|
|
309
|
-
Generated: [timestamp]
|
|
310
|
-
Skills audited: [count]
|
|
311
|
-
|
|
312
|
-
## Critical Issues (Fix Immediately)
|
|
313
|
-
|
|
314
|
-
### [skill-name]
|
|
315
|
-
- PROMPT_QUALITY: Written as documentation, not instructions
|
|
316
|
-
- Contains "Who this is for:", "Success looks like:" meta-descriptions
|
|
317
|
-
- No clear "What To Do" section
|
|
318
|
-
- ~200 lines of inline YAML schemas
|
|
319
|
-
|
|
320
|
-
**This skill will not work properly.** Claude won't know what action to take.
|
|
321
|
-
|
|
322
|
-
## Warnings
|
|
323
|
-
|
|
324
|
-
### [skill-name]
|
|
325
|
-
- SIZE: 2,800 words - consider moving content to references/
|
|
326
|
-
- STYLE: 3 instances of negative framing
|
|
81
|
+
### [Issue title]
|
|
82
|
+
**File**: [path]
|
|
83
|
+
**Problem**: [what's wrong]
|
|
84
|
+
**Principle**: [which principle is violated - actionability, progressive disclosure, routing, etc.]
|
|
85
|
+
**Suggested fix**: [specific rewrite or change]
|
|
327
86
|
|
|
328
87
|
## Passing
|
|
329
|
-
|
|
330
|
-
- skill-name-1
|
|
331
|
-
- skill-name-2
|
|
332
|
-
|
|
333
|
-
## Recommendations
|
|
334
|
-
|
|
335
|
-
1. **[skill-name]**: Complete rewrite needed. Current version is documentation, not a prompt.
|
|
336
|
-
2. **[other-skill]**: Move YAML schemas to references/schemas.md
|
|
88
|
+
[What works well about this skill]
|
|
337
89
|
```
|
|
338
90
|
|
|
339
|
-
|
|
340
|
-
</step>
|
|
341
|
-
|
|
342
|
-
<step name="Offer Fixes">
|
|
343
|
-
After presenting the report, offer to help fix issues.
|
|
344
|
-
|
|
345
|
-
**For CRITICAL prompt quality issues:**
|
|
346
|
-
Offer to help rewrite the skill properly. This requires:
|
|
347
|
-
1. Understanding what the skill should DO
|
|
348
|
-
2. Rewriting as instructions, not documentation
|
|
349
|
-
3. Moving heavy content to references/
|
|
350
|
-
4. Creating proper router pattern
|
|
351
|
-
|
|
352
|
-
**For other issues:**
|
|
353
|
-
- Second person → imperative conversion
|
|
354
|
-
- Negative → positive framing
|
|
355
|
-
- Content moves to references/
|
|
356
|
-
|
|
357
|
-
Use `AskUserQuestion`:
|
|
358
|
-
- **Help fix critical issues** - Work through rewriting problematic skills
|
|
359
|
-
- **Fix style issues only** - Auto-fix second person, negative framing
|
|
360
|
-
- **Just the report** - No fixes now
|
|
361
|
-
|
|
362
|
-
If user wants to fix critical issues, transition to `references/modify.md`.
|
|
363
|
-
</step>
|
|
364
|
-
|
|
365
|
-
</steps>
|
|
366
|
-
|
|
367
|
-
## Quick Audit Checklist
|
|
368
|
-
|
|
369
|
-
### Critical (Must Fix)
|
|
370
|
-
- [ ] SKILL.md is written as instructions, not documentation
|
|
371
|
-
- [ ] No meta-descriptions ("Who this is for", "Success looks like")
|
|
372
|
-
- [ ] Clear "What To Do" section with concrete steps
|
|
373
|
-
- [ ] Heavy content (schemas, examples) in references/, not inline
|
|
374
|
-
- [ ] Router pattern used for multi-phase skills
|
|
375
|
-
|
|
376
|
-
### Important
|
|
377
|
-
- [ ] Valid frontmatter with name and description
|
|
378
|
-
- [ ] Description has trigger phrases
|
|
379
|
-
- [ ] Under 2,000 words
|
|
380
|
-
- [ ] All references exist
|
|
381
|
-
|
|
382
|
-
### Style
|
|
383
|
-
- [ ] No second person
|
|
384
|
-
- [ ] Positive framing
|
|
385
|
-
- [ ] Imperative form
|
|
386
|
-
|
|
387
|
-
## Anti-Patterns to Catch
|
|
388
|
-
|
|
389
|
-
### The Documentation Skill
|
|
390
|
-
**Pattern:** Reads like a README explaining what the skill does.
|
|
391
|
-
```markdown
|
|
392
|
-
## Purpose
|
|
393
|
-
This skill helps developers migrate forms...
|
|
394
|
-
|
|
395
|
-
## Who This Is For
|
|
396
|
-
Developers working on Oracle Forms migration.
|
|
397
|
-
|
|
398
|
-
## How It Works
|
|
399
|
-
The skill has 12 phases...
|
|
400
|
-
```
|
|
401
|
-
|
|
402
|
-
**Problem:** Claude reads this and thinks "interesting, but what should I DO?"
|
|
403
|
-
|
|
404
|
-
**Fix:** Rewrite as instructions:
|
|
405
|
-
```markdown
|
|
406
|
-
## What To Do Now
|
|
407
|
-
|
|
408
|
-
<step name="Get Form Name">
|
|
409
|
-
Ask which form to implement.
|
|
410
|
-
</step>
|
|
411
|
-
|
|
412
|
-
<step name="Route to Current Phase">
|
|
413
|
-
Read workflow.yaml, route to appropriate phase file.
|
|
414
|
-
</step>
|
|
415
|
-
```
|
|
416
|
-
|
|
417
|
-
### The Kitchen Sink Skill
|
|
418
|
-
**Pattern:** Everything inline, no progressive disclosure.
|
|
419
|
-
|
|
420
|
-
**Problem:** 500+ lines, Claude gets lost in irrelevant details.
|
|
421
|
-
|
|
422
|
-
**Fix:** Keep SKILL.md as router (<150 lines), move details to references/.
|
|
423
|
-
|
|
424
|
-
### The Schema Dump
|
|
425
|
-
**Pattern:** 100+ lines of YAML/JSON schemas inline.
|
|
426
|
-
|
|
427
|
-
**Problem:** Schemas are reference material, not instructions.
|
|
91
|
+
## After the Audit
|
|
428
92
|
|
|
429
|
-
|
|
93
|
+
Present findings to the user. If issues were found, offer to help fix them. For significant rewrites (documentation → instructions), transition to `references/modify.md`.
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# Skill Development Principles
|
|
2
2
|
|
|
3
|
-
This document contains the deep knowledge required to create, audit, and modify Claude Code skills correctly. Read this before any skill work.
|
|
4
|
-
|
|
5
3
|
## The Fundamental Truth
|
|
6
4
|
|
|
7
5
|
**A skill is just a prompt with progressive disclosure.**
|
|
@@ -34,16 +32,6 @@ This skill orchestrates the complete migration of Oracle Forms to React/Go.
|
|
|
34
32
|
## How It Works
|
|
35
33
|
|
|
36
34
|
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
35
|
```
|
|
48
36
|
|
|
49
37
|
**Why this fails:** Claude reads this and thinks "interesting information, but what should I DO right now?" There are no actionable instructions.
|
|
@@ -93,45 +81,25 @@ After writing SKILL.md, ask: **"If Claude reads this right now, does it know wha
|
|
|
93
81
|
|
|
94
82
|
If the answer is "it would understand what the skill is about" but not "it would know what to do," rewrite it.
|
|
95
83
|
|
|
96
|
-
##
|
|
84
|
+
## Progressive Disclosure
|
|
97
85
|
|
|
98
|
-
### The Problem Without
|
|
99
|
-
|
|
100
|
-
To handle a complex workflow, all instructions must be in one giant prompt:
|
|
101
|
-
|
|
102
|
-
```
|
|
103
|
-
Here's how to plan a feature:
|
|
104
|
-
1. First gather requirements... [500 lines]
|
|
105
|
-
2. Then explore the codebase... [500 lines]
|
|
106
|
-
3. Then check ADRs... [500 lines]
|
|
107
|
-
4. Then draft the plan... [500 lines]
|
|
108
|
-
5. Then validate... [500 lines]
|
|
109
|
-
6. Then finalize... [500 lines]
|
|
110
|
-
```
|
|
86
|
+
### The Problem Without It
|
|
111
87
|
|
|
112
|
-
|
|
113
|
-
- Massive context consumption upfront
|
|
88
|
+
To handle a complex workflow, all instructions must be in one giant prompt (3,000+ lines). Problems:
|
|
89
|
+
- Massive context consumption upfront
|
|
114
90
|
- Claude may get confused by irrelevant instructions
|
|
115
91
|
- Hard to maintain and update
|
|
116
|
-
- Scales poorly
|
|
92
|
+
- Scales poorly
|
|
117
93
|
|
|
118
94
|
### The Solution: Three-Level Loading
|
|
119
95
|
|
|
120
|
-
Skills use progressive disclosure to load information just-in-time:
|
|
121
|
-
|
|
122
96
|
| Level | What Loads | When | Size Target |
|
|
123
97
|
|-------|------------|------|-------------|
|
|
124
98
|
| **1. Metadata** | `name` + `description` | Always (at startup) | ~100 words |
|
|
125
|
-
| **2. SKILL.md body** | Full instructions | When skill triggers |
|
|
126
|
-
| **3. Bundled resources** | references/, scripts
|
|
127
|
-
|
|
128
|
-
**Benefits:**
|
|
129
|
-
- Small initial context footprint
|
|
130
|
-
- Claude only sees relevant instructions for current phase
|
|
131
|
-
- Easy to add/modify individual phases
|
|
132
|
-
- Scales infinitely—heavy content lives in references/
|
|
99
|
+
| **2. SKILL.md body** | Full instructions | When skill triggers | <2,000 words |
|
|
100
|
+
| **3. Bundled resources** | references/, scripts/ | Only when Claude needs them | Unlimited |
|
|
133
101
|
|
|
134
|
-
###
|
|
102
|
+
### In Practice
|
|
135
103
|
|
|
136
104
|
```
|
|
137
105
|
SKILL.md (small router):
|
|
@@ -141,13 +109,9 @@ SKILL.md (small router):
|
|
|
141
109
|
references/planning.md:
|
|
142
110
|
"Gather requirements.
|
|
143
111
|
When done → read references/drafting.md"
|
|
144
|
-
|
|
145
|
-
references/drafting.md:
|
|
146
|
-
"Create the plan artifact.
|
|
147
|
-
When done → read references/validation.md"
|
|
148
112
|
```
|
|
149
113
|
|
|
150
|
-
If the user stops after planning, drafting
|
|
114
|
+
If the user stops after planning, drafting instructions are never loaded.
|
|
151
115
|
|
|
152
116
|
## Frontmatter Requirements
|
|
153
117
|
|
|
@@ -174,124 +138,35 @@ description: What this skill does and when to use it
|
|
|
174
138
|
|
|
175
139
|
The description is the most important part of a skill. Claude uses it to decide whether to activate.
|
|
176
140
|
|
|
177
|
-
**
|
|
178
|
-
|
|
141
|
+
**Good (specific triggers, third person):**
|
|
179
142
|
```yaml
|
|
180
|
-
|
|
181
|
-
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 (PreToolUse, PostToolUse, Stop).
|
|
182
|
-
|
|
183
|
-
# GOOD - clear scenarios
|
|
184
|
-
description: Extract text and tables from PDF files, fill forms, merge documents. Use when working with PDF files or when the user mentions PDFs, forms, or document extraction.
|
|
143
|
+
description: This skill should be used when the user asks to "create a hook", "add a PreToolUse hook", or mentions hook events (PreToolUse, PostToolUse, Stop).
|
|
185
144
|
```
|
|
186
145
|
|
|
187
|
-
**
|
|
188
|
-
|
|
146
|
+
**Bad:**
|
|
189
147
|
```yaml
|
|
190
|
-
#
|
|
148
|
+
# Wrong person
|
|
191
149
|
description: Use this skill when working with hooks.
|
|
192
150
|
|
|
193
|
-
#
|
|
151
|
+
# Vague, no triggers
|
|
194
152
|
description: Provides hook guidance.
|
|
195
153
|
|
|
196
|
-
#
|
|
197
|
-
description:
|
|
198
|
-
|
|
199
|
-
# BAD - too much detail (makes Claude think it can wing it)
|
|
200
|
-
description: This skill parses PDF files using PyPDF2, extracts text with OCR fallback, handles encrypted files with password prompts, and outputs to markdown format with table preservation...
|
|
154
|
+
# Too detailed (Claude thinks it knows enough and won't activate)
|
|
155
|
+
description: This skill parses PDF files using PyPDF2, extracts text with OCR fallback...
|
|
201
156
|
```
|
|
202
157
|
|
|
203
|
-
**Key insight
|
|
204
|
-
|
|
205
|
-
### Optional Fields
|
|
206
|
-
|
|
207
|
-
```yaml
|
|
208
|
-
---
|
|
209
|
-
name: skill-name
|
|
210
|
-
description: ...
|
|
211
|
-
license: Apache-2.0
|
|
212
|
-
allowed-tools: Read, Grep, Glob, Write
|
|
213
|
-
metadata:
|
|
214
|
-
version: 1.0.0
|
|
215
|
-
author: team-name
|
|
216
|
-
---
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
- `allowed-tools`: Restricts which tools Claude can use (security/safety)
|
|
220
|
-
- `license`: For distributed skills
|
|
221
|
-
- `metadata`: Custom key-value pairs
|
|
222
|
-
|
|
223
|
-
## Writing Style Requirements
|
|
224
|
-
|
|
225
|
-
### Imperative/Infinitive Form (Mandatory)
|
|
226
|
-
|
|
227
|
-
Write instructions as directives, not suggestions or descriptions.
|
|
228
|
-
|
|
229
|
-
**Correct (imperative):**
|
|
230
|
-
```markdown
|
|
231
|
-
Parse the configuration file.
|
|
232
|
-
Extract the relevant fields.
|
|
233
|
-
Validate input before processing.
|
|
234
|
-
Run the test suite to verify changes.
|
|
235
|
-
```
|
|
236
|
-
|
|
237
|
-
**Incorrect (second person):**
|
|
238
|
-
```markdown
|
|
239
|
-
You should parse the configuration file.
|
|
240
|
-
You can extract the relevant fields.
|
|
241
|
-
You need to validate input before processing.
|
|
242
|
-
You might want to run the test suite.
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
**Incorrect (passive/descriptive):**
|
|
246
|
-
```markdown
|
|
247
|
-
The configuration file should be parsed.
|
|
248
|
-
Fields are extracted from the response.
|
|
249
|
-
Input validation is performed.
|
|
250
|
-
```
|
|
251
|
-
|
|
252
|
-
### Objective Instructional Tone
|
|
253
|
-
|
|
254
|
-
Focus on WHAT to do, not WHO should do it:
|
|
255
|
-
|
|
256
|
-
**Correct:**
|
|
257
|
-
```markdown
|
|
258
|
-
To accomplish X, do Y.
|
|
259
|
-
For validation, check the following criteria.
|
|
260
|
-
When errors occur, retry with exponential backoff.
|
|
261
|
-
```
|
|
262
|
-
|
|
263
|
-
**Incorrect:**
|
|
264
|
-
```markdown
|
|
265
|
-
You can accomplish X by doing Y.
|
|
266
|
-
Claude should check the following criteria.
|
|
267
|
-
If you encounter errors, you might retry.
|
|
268
|
-
```
|
|
269
|
-
|
|
270
|
-
### Positive Framing
|
|
271
|
-
|
|
272
|
-
Tell Claude what TO do, not what NOT to do:
|
|
273
|
-
|
|
274
|
-
| Negative (avoid) | Positive (correct) |
|
|
275
|
-
|------------------|-------------------|
|
|
276
|
-
| Don't hallucinate facts | Only use information from provided documents |
|
|
277
|
-
| Don't be too formal | Write in a conversational, friendly tone |
|
|
278
|
-
| Avoid long paragraphs | Keep paragraphs to 3-4 sentences |
|
|
279
|
-
| Don't skip error handling | Include comprehensive error handling |
|
|
280
|
-
| Never make assumptions | Base responses on provided data |
|
|
158
|
+
**Key insight:** If the description explains too much about WHAT, Claude believes it already knows enough and won't activate. Focus on WHEN to use, not HOW it works.
|
|
281
159
|
|
|
282
160
|
## Skill Structure
|
|
283
161
|
|
|
284
|
-
### Minimal
|
|
285
|
-
|
|
162
|
+
### Minimal
|
|
286
163
|
```
|
|
287
164
|
skill-name/
|
|
288
165
|
└── SKILL.md
|
|
289
166
|
```
|
|
290
|
-
|
|
291
167
|
Good for: Simple knowledge, no complex workflows
|
|
292
168
|
|
|
293
|
-
### Standard
|
|
294
|
-
|
|
169
|
+
### Standard (Recommended)
|
|
295
170
|
```
|
|
296
171
|
skill-name/
|
|
297
172
|
├── SKILL.md
|
|
@@ -300,64 +175,34 @@ skill-name/
|
|
|
300
175
|
└── scripts/
|
|
301
176
|
└── helper.py
|
|
302
177
|
```
|
|
303
|
-
|
|
304
178
|
Good for: Most skills with detailed documentation or utilities
|
|
305
179
|
|
|
306
|
-
### Complete Skill
|
|
307
|
-
|
|
308
|
-
```
|
|
309
|
-
skill-name/
|
|
310
|
-
├── SKILL.md # Lean router
|
|
311
|
-
├── references/ # Docs loaded as needed
|
|
312
|
-
│ ├── workflow-1.md
|
|
313
|
-
│ ├── workflow-2.md
|
|
314
|
-
│ └── patterns.md
|
|
315
|
-
├── scripts/ # Executable utilities
|
|
316
|
-
│ ├── validate.py
|
|
317
|
-
│ └── generate.sh
|
|
318
|
-
└── assets/ # Files for output (templates, etc.)
|
|
319
|
-
└── template.yaml
|
|
320
|
-
```
|
|
321
|
-
|
|
322
|
-
Good for: Complex multi-workflow skills
|
|
323
|
-
|
|
324
180
|
### When to Use Each Directory
|
|
325
181
|
|
|
326
|
-
**references/** -
|
|
182
|
+
**references/** - Content Claude reads into context:
|
|
327
183
|
- Detailed workflow instructions
|
|
328
184
|
- Domain knowledge and patterns
|
|
329
|
-
- API documentation
|
|
330
185
|
- Schemas and specifications
|
|
331
186
|
|
|
332
187
|
**scripts/** - Executable code for deterministic operations:
|
|
333
188
|
- Validation utilities
|
|
334
189
|
- Code generation
|
|
335
|
-
- Data transformation
|
|
336
190
|
- File operations that need reliability
|
|
337
191
|
|
|
338
|
-
**Benefits of scripts:** Execute without loading into context (token-efficient), deterministic reliability, can be tested independently
|
|
339
|
-
|
|
340
192
|
**assets/** - Files used in output but never read:
|
|
341
193
|
- Templates Claude copies/modifies
|
|
342
194
|
- Boilerplate code
|
|
343
|
-
- Images, icons, fonts
|
|
344
|
-
- Sample documents
|
|
345
195
|
|
|
346
196
|
## Size Guidelines
|
|
347
197
|
|
|
348
|
-
|
|
349
|
-
- **
|
|
350
|
-
- **Maximum**: 5,000 words (strongly discouraged)
|
|
351
|
-
- **Anthropic guidance**: Under 500 lines
|
|
352
|
-
|
|
353
|
-
If SKILL.md exceeds these limits, move content to references/.
|
|
198
|
+
- **SKILL.md target**: <2,000 words
|
|
199
|
+
- **SKILL.md maximum**: 5,000 words (strongly discouraged)
|
|
354
200
|
|
|
355
|
-
|
|
201
|
+
If SKILL.md exceeds limits, move content to references/.
|
|
356
202
|
|
|
357
|
-
> "The context window is a public good—your skill shares it with everything else.
|
|
358
|
-
> — Anthropic Engineering
|
|
203
|
+
> "The context window is a public good—your skill shares it with everything else."
|
|
359
204
|
|
|
360
|
-
Challenge every piece of content: Does it justify its token cost? If Claude already knows it
|
|
205
|
+
Challenge every piece of content: Does it justify its token cost? If Claude already knows it, remove it.
|
|
361
206
|
|
|
362
207
|
## Activation Patterns
|
|
363
208
|
|
|
@@ -365,250 +210,41 @@ Challenge every piece of content: Does it justify its token cost? If Claude alre
|
|
|
365
210
|
|
|
366
211
|
**1. Autonomous (Description Match)**
|
|
367
212
|
Claude reads skill descriptions and decides when to activate based on user request matching.
|
|
368
|
-
|
|
369
|
-
- Less reliable (~50-84% success rate in community testing)
|
|
213
|
+
- Less reliable (~50-84% success rate)
|
|
370
214
|
- Works better with specific trigger phrases
|
|
371
|
-
-
|
|
215
|
+
- Fails if description is too detailed
|
|
372
216
|
|
|
373
217
|
**2. Explicit (Slash Command)**
|
|
374
218
|
A slash command forces skill activation:
|
|
375
|
-
|
|
376
219
|
```markdown
|
|
377
220
|
# /create-skill command
|
|
378
221
|
Activate the create-agent-skills skill to guide the user through skill creation.
|
|
379
222
|
```
|
|
380
|
-
|
|
381
|
-
- Most reliable method
|
|
382
|
-
- Use for critical workflows
|
|
383
|
-
- Don't rely solely on autonomous activation
|
|
223
|
+
Most reliable method.
|
|
384
224
|
|
|
385
225
|
**3. Hybrid (Recommended)**
|
|
386
226
|
Slash command for explicit invocation + good description for autonomous discovery.
|
|
387
227
|
|
|
388
|
-
### Improving Activation Reliability
|
|
389
|
-
|
|
390
|
-
1. **Specific trigger phrases** in description
|
|
391
|
-
2. **Reference in CLAUDE.md** for project skills
|
|
392
|
-
3. **Keep description focused on WHEN**, not detailed HOW
|
|
393
|
-
|
|
394
228
|
## Common Mistakes
|
|
395
229
|
|
|
396
230
|
### Mistake 1: Treating SKILL.md as Documentation
|
|
397
|
-
|
|
398
|
-
**Problem:** Writing about the skill instead of instructions for Claude
|
|
399
|
-
|
|
400
|
-
```markdown
|
|
401
|
-
# BAD - describes the skill
|
|
402
|
-
This skill helps users create PDF documents. It uses PyPDF2
|
|
403
|
-
for parsing and supports various output formats...
|
|
404
|
-
```
|
|
405
|
-
|
|
406
|
-
```markdown
|
|
407
|
-
# GOOD - instructs Claude
|
|
408
|
-
Parse the input PDF using the bundled script.
|
|
409
|
-
Extract text content, preserving table structure.
|
|
410
|
-
Output as markdown with proper heading hierarchy.
|
|
411
|
-
```
|
|
231
|
+
Writing about the skill instead of instructions for Claude.
|
|
412
232
|
|
|
413
233
|
### Mistake 2: Everything in One File
|
|
414
|
-
|
|
415
|
-
**Problem:** Putting all content in SKILL.md
|
|
416
|
-
|
|
417
|
-
```
|
|
418
|
-
skill-name/
|
|
419
|
-
└── SKILL.md (8,000 words)
|
|
420
|
-
```
|
|
421
|
-
|
|
422
|
-
**Solution:** Use progressive disclosure
|
|
423
|
-
|
|
424
|
-
```
|
|
425
|
-
skill-name/
|
|
426
|
-
├── SKILL.md (1,800 words - router)
|
|
427
|
-
└── references/
|
|
428
|
-
├── workflow-a.md (2,500 words)
|
|
429
|
-
└── workflow-b.md (3,700 words)
|
|
430
|
-
```
|
|
234
|
+
Putting all content in SKILL.md instead of using references/.
|
|
431
235
|
|
|
432
236
|
### Mistake 3: Vague Descriptions
|
|
237
|
+
No trigger phrases, unclear when to use.
|
|
433
238
|
|
|
434
|
-
|
|
239
|
+
### Mistake 4: Missing Resource References
|
|
240
|
+
References exist but SKILL.md doesn't mention them.
|
|
435
241
|
|
|
436
|
-
|
|
437
|
-
description: Helps with code review.
|
|
438
|
-
```
|
|
439
|
-
|
|
440
|
-
**Solution:** Specific scenarios and phrases
|
|
441
|
-
|
|
442
|
-
```yaml
|
|
443
|
-
description: This skill should be used when the user asks to "review this PR", "check my code", "find bugs", or mentions code quality, security review, or performance analysis.
|
|
444
|
-
```
|
|
242
|
+
## Validation
|
|
445
243
|
|
|
446
|
-
|
|
244
|
+
Run: `node ~/.claude/skills/create-agent-skills/scripts/validate-skill.js [skill-path]`
|
|
447
245
|
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
You might want to validate the output.
|
|
454
|
-
```
|
|
455
|
-
|
|
456
|
-
**Solution:** Imperative form
|
|
457
|
-
|
|
458
|
-
```markdown
|
|
459
|
-
First read the config file.
|
|
460
|
-
Parse the fields using the schema.
|
|
461
|
-
Validate output against expected format.
|
|
462
|
-
```
|
|
463
|
-
|
|
464
|
-
### Mistake 5: Missing Resource References
|
|
465
|
-
|
|
466
|
-
**Problem:** References exist but SKILL.md doesn't mention them
|
|
467
|
-
|
|
468
|
-
```markdown
|
|
469
|
-
# SKILL.md
|
|
470
|
-
[Content with no mention of references/]
|
|
471
|
-
```
|
|
472
|
-
|
|
473
|
-
**Solution:** Explicit pointers to resources
|
|
474
|
-
|
|
475
|
-
```markdown
|
|
476
|
-
## Additional Resources
|
|
477
|
-
|
|
478
|
-
For detailed patterns, read `references/patterns.md`.
|
|
479
|
-
For validation, run `scripts/validate.py`.
|
|
480
|
-
```
|
|
481
|
-
|
|
482
|
-
## Prompting Principles for Skill Content
|
|
483
|
-
|
|
484
|
-
Skills ARE prompts. The quality of a skill depends on applying good prompting principles when writing its content. These principles come from ADR-002 (Structured Prompting Practices) and the `prompting` skill.
|
|
485
|
-
|
|
486
|
-
### Core Principle: Explain WHY, Not Just WHAT
|
|
487
|
-
|
|
488
|
-
Provide purpose and context rather than exhaustive implementation details. Trust Claude's intelligence.
|
|
489
|
-
|
|
490
|
-
**Mental Model**: Treat Claude like a brilliant senior colleague, not a junior who needs hand-holding.
|
|
491
|
-
|
|
492
|
-
**Provide:**
|
|
493
|
-
- The goal or purpose of the task
|
|
494
|
-
- Why this matters (business context, use case)
|
|
495
|
-
- Constraints that exist (technical, business, regulatory)
|
|
496
|
-
- What success looks like
|
|
497
|
-
|
|
498
|
-
**Avoid providing:**
|
|
499
|
-
- Every possible edge case (Claude handles these intelligently)
|
|
500
|
-
- Step-by-step implementation unless genuinely needed
|
|
501
|
-
- Obvious best practices for the domain
|
|
502
|
-
|
|
503
|
-
### Use Positive Framing
|
|
504
|
-
|
|
505
|
-
Tell Claude what TO do, not what NOT to do. Negatives require extra processing and can prime unwanted behavior.
|
|
506
|
-
|
|
507
|
-
| Negative Framing | Positive Framing |
|
|
508
|
-
|------------------|------------------|
|
|
509
|
-
| "Don't hallucinate facts" | "Only use information from the provided documents" |
|
|
510
|
-
| "Don't be too verbose" | "Keep responses concise and focused" |
|
|
511
|
-
| "Avoid making assumptions" | "Base responses on the provided data" |
|
|
512
|
-
| "Never skip validation" | "Always validate input before processing" |
|
|
513
|
-
|
|
514
|
-
### Be Clear and Direct
|
|
515
|
-
|
|
516
|
-
Claude 4.x models are more literal than previous versions. State exactly what is needed without hedging.
|
|
517
|
-
|
|
518
|
-
| Vague | Clear |
|
|
519
|
-
|-------|-------|
|
|
520
|
-
| "Maybe consider validating..." | "Validate input before processing" |
|
|
521
|
-
| "It might be helpful to..." | "Include error handling for edge cases" |
|
|
522
|
-
| "You could potentially..." | "Generate tests for all public functions" |
|
|
523
|
-
|
|
524
|
-
### Provide Context
|
|
525
|
-
|
|
526
|
-
Every skill instruction benefits from context. Answer:
|
|
527
|
-
1. **Why does this matter?** (Purpose, goal)
|
|
528
|
-
2. **Who is this for?** (Audience, user type)
|
|
529
|
-
3. **What does success look like?** (Outcomes, criteria)
|
|
530
|
-
4. **What constraints exist?** (Technical limits, requirements)
|
|
531
|
-
|
|
532
|
-
### The Complete Prompt Checklist
|
|
533
|
-
|
|
534
|
-
When writing skill content, verify each section answers:
|
|
535
|
-
|
|
536
|
-
- [ ] **WHAT** is Claude being asked to do?
|
|
537
|
-
- [ ] **WHY** does this matter? (Purpose, goal)
|
|
538
|
-
- [ ] **WHO** is this for? (Audience, user type)
|
|
539
|
-
- [ ] **SUCCESS** looks like what? (Outcomes, criteria)
|
|
540
|
-
- [ ] Frame everything **POSITIVELY** (what TO do)
|
|
541
|
-
|
|
542
|
-
### Quick Diagnostics
|
|
543
|
-
|
|
544
|
-
If a skill produces problematic results:
|
|
545
|
-
|
|
546
|
-
| Problem | Likely Cause | Fix |
|
|
547
|
-
|---------|--------------|-----|
|
|
548
|
-
| Too minimal/basic | Not explicit about expectations | Add "Create a fully-featured..." or specify depth |
|
|
549
|
-
| Off-topic | Missing context about purpose | Explain WHY and what it's for |
|
|
550
|
-
| Inconsistent | Vague instructions | Be more direct and specific |
|
|
551
|
-
| Overly cautious | Negative framing | Reframe positively |
|
|
552
|
-
| Missing key details | Didn't explain success criteria | Define concrete outcomes |
|
|
553
|
-
|
|
554
|
-
### Common Antipatterns
|
|
555
|
-
|
|
556
|
-
**The Micromanager**: Providing step-by-step implementation instead of goals.
|
|
557
|
-
- Fix: Explain the goal, let Claude handle implementation.
|
|
558
|
-
|
|
559
|
-
**The Negative Nancy**: String of "don't do X" instructions.
|
|
560
|
-
- Fix: Reframe every negative as a positive instruction.
|
|
561
|
-
|
|
562
|
-
**The Context-Free Zone**: Bare instruction with no purpose or audience.
|
|
563
|
-
- Fix: Explain who uses it, why it exists, what success looks like.
|
|
564
|
-
|
|
565
|
-
**The Vague Suggestion**: Hedged language like "maybe consider..."
|
|
566
|
-
- Fix: Be direct and explicit about what is needed.
|
|
567
|
-
|
|
568
|
-
### Reference
|
|
569
|
-
|
|
570
|
-
For comprehensive prompting guidance, consult:
|
|
571
|
-
- **ADR-002**: Structured Prompting Practices for Agents and Commands
|
|
572
|
-
- **Prompting skill**: `~/.claude/skills/prompting/SKILL.md`
|
|
573
|
-
|
|
574
|
-
These principles are mandatory for all skill content. Apply them when writing SKILL.md files and reference documents.
|
|
575
|
-
|
|
576
|
-
## Validation Checklist
|
|
577
|
-
|
|
578
|
-
Before finalizing any skill, verify:
|
|
579
|
-
|
|
580
|
-
### Structure
|
|
581
|
-
- [ ] SKILL.md exists with valid YAML frontmatter
|
|
582
|
-
- [ ] `name` field matches directory name (hyphen-case)
|
|
583
|
-
- [ ] `description` field present and under 1024 characters
|
|
584
|
-
- [ ] All referenced files actually exist
|
|
585
|
-
|
|
586
|
-
### Description Quality
|
|
587
|
-
- [ ] Uses third person ("This skill should be used when...")
|
|
588
|
-
- [ ] Includes specific trigger phrases
|
|
589
|
-
- [ ] Lists concrete scenarios
|
|
590
|
-
- [ ] Not overly detailed about implementation
|
|
591
|
-
|
|
592
|
-
### Content Quality
|
|
593
|
-
- [ ] Body uses imperative/infinitive form throughout
|
|
594
|
-
- [ ] No second person ("you should", "you can")
|
|
595
|
-
- [ ] Body under 2,000 words (or content moved to references/)
|
|
596
|
-
- [ ] Positive framing (what TO do, not what NOT to do)
|
|
597
|
-
|
|
598
|
-
### Prompting Quality
|
|
599
|
-
- [ ] Explains WHY, not just WHAT (purpose and context provided)
|
|
600
|
-
- [ ] Clear and direct language (no hedging or vague suggestions)
|
|
601
|
-
- [ ] Success criteria defined (what does good output look like?)
|
|
602
|
-
- [ ] Avoids micromanagement (goals over step-by-step instructions)
|
|
603
|
-
- [ ] No antipatterns (Micromanager, Negative Nancy, Context-Free Zone, Vague Suggestion)
|
|
604
|
-
|
|
605
|
-
### Progressive Disclosure
|
|
606
|
-
- [ ] SKILL.md acts as router to heavier content
|
|
607
|
-
- [ ] Detailed docs in references/
|
|
608
|
-
- [ ] Deterministic operations in scripts/
|
|
609
|
-
- [ ] References clearly pointed to from SKILL.md
|
|
610
|
-
|
|
611
|
-
### Testing
|
|
612
|
-
- [ ] Skill triggers on expected user queries
|
|
613
|
-
- [ ] Content is helpful for intended tasks
|
|
614
|
-
- [ ] No duplicated information across files
|
|
246
|
+
Manual checks:
|
|
247
|
+
- Is this instructions, not documentation?
|
|
248
|
+
- Would Claude know what to DO?
|
|
249
|
+
- Is heavy content in references/?
|
|
250
|
+
- Does the description have trigger phrases?
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: {{SKILL_NAME}}
|
|
3
|
+
description: {{What it does}} Use when {{trigger conditions}}.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<essential_principles>
|
|
7
|
+
## {{Core Concept}}
|
|
8
|
+
|
|
9
|
+
{{Principles that ALWAYS apply, regardless of which workflow runs}}
|
|
10
|
+
|
|
11
|
+
### 1. {{First principle}}
|
|
12
|
+
{{Explanation}}
|
|
13
|
+
|
|
14
|
+
### 2. {{Second principle}}
|
|
15
|
+
{{Explanation}}
|
|
16
|
+
|
|
17
|
+
### 3. {{Third principle}}
|
|
18
|
+
{{Explanation}}
|
|
19
|
+
</essential_principles>
|
|
20
|
+
|
|
21
|
+
<intake>
|
|
22
|
+
**Ask the user:**
|
|
23
|
+
|
|
24
|
+
What would you like to do?
|
|
25
|
+
1. {{First option}}
|
|
26
|
+
2. {{Second option}}
|
|
27
|
+
3. {{Third option}}
|
|
28
|
+
|
|
29
|
+
**Wait for response before proceeding.**
|
|
30
|
+
</intake>
|
|
31
|
+
|
|
32
|
+
<routing>
|
|
33
|
+
| Response | Workflow |
|
|
34
|
+
|----------|----------|
|
|
35
|
+
| 1, "{{keywords}}" | `workflows/{{first-workflow}}.md` |
|
|
36
|
+
| 2, "{{keywords}}" | `workflows/{{second-workflow}}.md` |
|
|
37
|
+
| 3, "{{keywords}}" | `workflows/{{third-workflow}}.md` |
|
|
38
|
+
|
|
39
|
+
**After reading the workflow, follow it exactly.**
|
|
40
|
+
</routing>
|
|
41
|
+
|
|
42
|
+
<quick_reference>
|
|
43
|
+
## {{Skill Name}} Quick Reference
|
|
44
|
+
|
|
45
|
+
{{Brief reference information always useful to have visible}}
|
|
46
|
+
</quick_reference>
|
|
47
|
+
|
|
48
|
+
<reference_index>
|
|
49
|
+
## Domain Knowledge
|
|
50
|
+
|
|
51
|
+
All in `references/`:
|
|
52
|
+
- {{reference-1.md}} - {{purpose}}
|
|
53
|
+
- {{reference-2.md}} - {{purpose}}
|
|
54
|
+
</reference_index>
|
|
55
|
+
|
|
56
|
+
<workflows_index>
|
|
57
|
+
## Workflows
|
|
58
|
+
|
|
59
|
+
All in `workflows/`:
|
|
60
|
+
|
|
61
|
+
| Workflow | Purpose |
|
|
62
|
+
|----------|---------|
|
|
63
|
+
| {{first-workflow}}.md | {{purpose}} |
|
|
64
|
+
| {{second-workflow}}.md | {{purpose}} |
|
|
65
|
+
| {{third-workflow}}.md | {{purpose}} |
|
|
66
|
+
</workflows_index>
|
|
67
|
+
|
|
68
|
+
<success_criteria>
|
|
69
|
+
A well-executed {{skill name}}:
|
|
70
|
+
- {{First criterion}}
|
|
71
|
+
- {{Second criterion}}
|
|
72
|
+
- {{Third criterion}}
|
|
73
|
+
</success_criteria>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: {{SKILL_NAME}}
|
|
3
|
+
description: {{What it does}} Use when {{trigger conditions}}.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<objective>
|
|
7
|
+
{{Clear statement of what this skill accomplishes}}
|
|
8
|
+
</objective>
|
|
9
|
+
|
|
10
|
+
<quick_start>
|
|
11
|
+
{{Immediate actionable guidance - what Claude should do first}}
|
|
12
|
+
</quick_start>
|
|
13
|
+
|
|
14
|
+
<process>
|
|
15
|
+
## Step 1: {{First action}}
|
|
16
|
+
|
|
17
|
+
{{Instructions for step 1}}
|
|
18
|
+
|
|
19
|
+
## Step 2: {{Second action}}
|
|
20
|
+
|
|
21
|
+
{{Instructions for step 2}}
|
|
22
|
+
|
|
23
|
+
## Step 3: {{Third action}}
|
|
24
|
+
|
|
25
|
+
{{Instructions for step 3}}
|
|
26
|
+
</process>
|
|
27
|
+
|
|
28
|
+
<success_criteria>
|
|
29
|
+
{{Skill name}} is complete when:
|
|
30
|
+
- [ ] {{First success criterion}}
|
|
31
|
+
- [ ] {{Second success criterion}}
|
|
32
|
+
- [ ] {{Third success criterion}}
|
|
33
|
+
</success_criteria>
|