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,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.**
|
|
@@ -16,45 +14,92 @@ This document contains the deep knowledge required to create, audit, and modify
|
|
|
16
14
|
|
|
17
15
|
When a skill "activates," Claude simply reads the SKILL.md file. The file contains natural language instructions telling Claude what to do.
|
|
18
16
|
|
|
19
|
-
##
|
|
17
|
+
## The Most Common Mistake: Documentation vs Instructions
|
|
18
|
+
|
|
19
|
+
**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.
|
|
20
|
+
|
|
21
|
+
### Documentation (WRONG)
|
|
22
|
+
|
|
23
|
+
```markdown
|
|
24
|
+
## Purpose
|
|
25
|
+
|
|
26
|
+
This skill orchestrates the complete migration of Oracle Forms to React/Go.
|
|
27
|
+
|
|
28
|
+
**Who this is for**: Developers migrating Oracle Forms.
|
|
20
29
|
|
|
21
|
-
|
|
30
|
+
**Success looks like**: Running /implement-form progresses through all phases.
|
|
22
31
|
|
|
23
|
-
|
|
32
|
+
## How It Works
|
|
24
33
|
|
|
34
|
+
The skill has 12 phases. Phase 1 does scaffolding, Phase 2 does discovery...
|
|
25
35
|
```
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
36
|
+
|
|
37
|
+
**Why this fails:** Claude reads this and thinks "interesting information, but what should I DO right now?" There are no actionable instructions.
|
|
38
|
+
|
|
39
|
+
### Instructions (CORRECT)
|
|
40
|
+
|
|
41
|
+
```markdown
|
|
42
|
+
## What To Do Now
|
|
43
|
+
|
|
44
|
+
<step name="Get Form Name">
|
|
45
|
+
Ask which form to implement. Store the form name.
|
|
46
|
+
</step>
|
|
47
|
+
|
|
48
|
+
<step name="Check Workflow State">
|
|
49
|
+
Look for `.claude/workflows/{formname}/workflow.yaml`
|
|
50
|
+
|
|
51
|
+
If exists: Read it, determine current phase.
|
|
52
|
+
If not: Create new workflow, start at phase 1.
|
|
53
|
+
</step>
|
|
54
|
+
|
|
55
|
+
<step name="Route to Phase">
|
|
56
|
+
Based on `currentPhase`, read the appropriate file:
|
|
57
|
+
|
|
58
|
+
| Phase | File |
|
|
59
|
+
|-------|------|
|
|
60
|
+
| phase1 | `references/phase1.md` |
|
|
61
|
+
| phase2 | `references/phase2.md` |
|
|
62
|
+
</step>
|
|
33
63
|
```
|
|
34
64
|
|
|
35
|
-
**
|
|
36
|
-
|
|
65
|
+
**Why this works:** Claude knows exactly what to do. Each step is an action. Heavy content (schemas, phase details) lives in references/.
|
|
66
|
+
|
|
67
|
+
### Red Flags in SKILL.md
|
|
68
|
+
|
|
69
|
+
| Red Flag | Problem |
|
|
70
|
+
|----------|---------|
|
|
71
|
+
| "Who this is for:" | Meta-description. Claude doesn't need audience info. |
|
|
72
|
+
| "Success looks like:" | Describes outcomes, doesn't instruct. |
|
|
73
|
+
| "This skill orchestrates..." | Describes what skill IS, not what to DO. |
|
|
74
|
+
| "The purpose is..." | Documentation language. |
|
|
75
|
+
| Large inline schemas | Reference material, not instructions. |
|
|
76
|
+
| Phase explanations | Should route to phase files, not explain inline. |
|
|
77
|
+
|
|
78
|
+
### The Test
|
|
79
|
+
|
|
80
|
+
After writing SKILL.md, ask: **"If Claude reads this right now, does it know what action to take?"**
|
|
81
|
+
|
|
82
|
+
If the answer is "it would understand what the skill is about" but not "it would know what to do," rewrite it.
|
|
83
|
+
|
|
84
|
+
## Progressive Disclosure
|
|
85
|
+
|
|
86
|
+
### The Problem Without It
|
|
87
|
+
|
|
88
|
+
To handle a complex workflow, all instructions must be in one giant prompt (3,000+ lines). Problems:
|
|
89
|
+
- Massive context consumption upfront
|
|
37
90
|
- Claude may get confused by irrelevant instructions
|
|
38
91
|
- Hard to maintain and update
|
|
39
|
-
- Scales poorly
|
|
92
|
+
- Scales poorly
|
|
40
93
|
|
|
41
94
|
### The Solution: Three-Level Loading
|
|
42
95
|
|
|
43
|
-
Skills use progressive disclosure to load information just-in-time:
|
|
44
|
-
|
|
45
96
|
| Level | What Loads | When | Size Target |
|
|
46
97
|
|-------|------------|------|-------------|
|
|
47
98
|
| **1. Metadata** | `name` + `description` | Always (at startup) | ~100 words |
|
|
48
|
-
| **2. SKILL.md body** | Full instructions | When skill triggers |
|
|
49
|
-
| **3. Bundled resources** | references/, scripts
|
|
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 |
|
|
50
101
|
|
|
51
|
-
|
|
52
|
-
- Small initial context footprint
|
|
53
|
-
- Claude only sees relevant instructions for current phase
|
|
54
|
-
- Easy to add/modify individual phases
|
|
55
|
-
- Scales infinitely—heavy content lives in references/
|
|
56
|
-
|
|
57
|
-
### Progressive Disclosure in Practice
|
|
102
|
+
### In Practice
|
|
58
103
|
|
|
59
104
|
```
|
|
60
105
|
SKILL.md (small router):
|
|
@@ -64,13 +109,9 @@ SKILL.md (small router):
|
|
|
64
109
|
references/planning.md:
|
|
65
110
|
"Gather requirements.
|
|
66
111
|
When done → read references/drafting.md"
|
|
67
|
-
|
|
68
|
-
references/drafting.md:
|
|
69
|
-
"Create the plan artifact.
|
|
70
|
-
When done → read references/validation.md"
|
|
71
112
|
```
|
|
72
113
|
|
|
73
|
-
If the user stops after planning, drafting
|
|
114
|
+
If the user stops after planning, drafting instructions are never loaded.
|
|
74
115
|
|
|
75
116
|
## Frontmatter Requirements
|
|
76
117
|
|
|
@@ -97,124 +138,35 @@ description: What this skill does and when to use it
|
|
|
97
138
|
|
|
98
139
|
The description is the most important part of a skill. Claude uses it to decide whether to activate.
|
|
99
140
|
|
|
100
|
-
**
|
|
101
|
-
|
|
141
|
+
**Good (specific triggers, third person):**
|
|
102
142
|
```yaml
|
|
103
|
-
|
|
104
|
-
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).
|
|
105
|
-
|
|
106
|
-
# GOOD - clear scenarios
|
|
107
|
-
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).
|
|
108
144
|
```
|
|
109
145
|
|
|
110
|
-
**
|
|
111
|
-
|
|
146
|
+
**Bad:**
|
|
112
147
|
```yaml
|
|
113
|
-
#
|
|
148
|
+
# Wrong person
|
|
114
149
|
description: Use this skill when working with hooks.
|
|
115
150
|
|
|
116
|
-
#
|
|
151
|
+
# Vague, no triggers
|
|
117
152
|
description: Provides hook guidance.
|
|
118
153
|
|
|
119
|
-
#
|
|
120
|
-
description:
|
|
121
|
-
|
|
122
|
-
# BAD - too much detail (makes Claude think it can wing it)
|
|
123
|
-
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...
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
**Key insight from community testing:** If the description explains too much about WHAT the skill does, Claude believes it already knows enough and won't activate the skill. Keep descriptions focused on WHEN to use, not HOW it works internally.
|
|
127
|
-
|
|
128
|
-
### Optional Fields
|
|
129
|
-
|
|
130
|
-
```yaml
|
|
131
|
-
---
|
|
132
|
-
name: skill-name
|
|
133
|
-
description: ...
|
|
134
|
-
license: Apache-2.0
|
|
135
|
-
allowed-tools: Read, Grep, Glob, Write
|
|
136
|
-
metadata:
|
|
137
|
-
version: 1.0.0
|
|
138
|
-
author: team-name
|
|
139
|
-
---
|
|
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...
|
|
140
156
|
```
|
|
141
157
|
|
|
142
|
-
|
|
143
|
-
- `license`: For distributed skills
|
|
144
|
-
- `metadata`: Custom key-value pairs
|
|
145
|
-
|
|
146
|
-
## Writing Style Requirements
|
|
147
|
-
|
|
148
|
-
### Imperative/Infinitive Form (Mandatory)
|
|
149
|
-
|
|
150
|
-
Write instructions as directives, not suggestions or descriptions.
|
|
151
|
-
|
|
152
|
-
**Correct (imperative):**
|
|
153
|
-
```markdown
|
|
154
|
-
Parse the configuration file.
|
|
155
|
-
Extract the relevant fields.
|
|
156
|
-
Validate input before processing.
|
|
157
|
-
Run the test suite to verify changes.
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
**Incorrect (second person):**
|
|
161
|
-
```markdown
|
|
162
|
-
You should parse the configuration file.
|
|
163
|
-
You can extract the relevant fields.
|
|
164
|
-
You need to validate input before processing.
|
|
165
|
-
You might want to run the test suite.
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
**Incorrect (passive/descriptive):**
|
|
169
|
-
```markdown
|
|
170
|
-
The configuration file should be parsed.
|
|
171
|
-
Fields are extracted from the response.
|
|
172
|
-
Input validation is performed.
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
### Objective Instructional Tone
|
|
176
|
-
|
|
177
|
-
Focus on WHAT to do, not WHO should do it:
|
|
178
|
-
|
|
179
|
-
**Correct:**
|
|
180
|
-
```markdown
|
|
181
|
-
To accomplish X, do Y.
|
|
182
|
-
For validation, check the following criteria.
|
|
183
|
-
When errors occur, retry with exponential backoff.
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
**Incorrect:**
|
|
187
|
-
```markdown
|
|
188
|
-
You can accomplish X by doing Y.
|
|
189
|
-
Claude should check the following criteria.
|
|
190
|
-
If you encounter errors, you might retry.
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
### Positive Framing
|
|
194
|
-
|
|
195
|
-
Tell Claude what TO do, not what NOT to do:
|
|
196
|
-
|
|
197
|
-
| Negative (avoid) | Positive (correct) |
|
|
198
|
-
|------------------|-------------------|
|
|
199
|
-
| Don't hallucinate facts | Only use information from provided documents |
|
|
200
|
-
| Don't be too formal | Write in a conversational, friendly tone |
|
|
201
|
-
| Avoid long paragraphs | Keep paragraphs to 3-4 sentences |
|
|
202
|
-
| Don't skip error handling | Include comprehensive error handling |
|
|
203
|
-
| 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.
|
|
204
159
|
|
|
205
160
|
## Skill Structure
|
|
206
161
|
|
|
207
|
-
### Minimal
|
|
208
|
-
|
|
162
|
+
### Minimal
|
|
209
163
|
```
|
|
210
164
|
skill-name/
|
|
211
165
|
└── SKILL.md
|
|
212
166
|
```
|
|
213
|
-
|
|
214
167
|
Good for: Simple knowledge, no complex workflows
|
|
215
168
|
|
|
216
|
-
### Standard
|
|
217
|
-
|
|
169
|
+
### Standard (Recommended)
|
|
218
170
|
```
|
|
219
171
|
skill-name/
|
|
220
172
|
├── SKILL.md
|
|
@@ -223,64 +175,34 @@ skill-name/
|
|
|
223
175
|
└── scripts/
|
|
224
176
|
└── helper.py
|
|
225
177
|
```
|
|
226
|
-
|
|
227
178
|
Good for: Most skills with detailed documentation or utilities
|
|
228
179
|
|
|
229
|
-
### Complete Skill
|
|
230
|
-
|
|
231
|
-
```
|
|
232
|
-
skill-name/
|
|
233
|
-
├── SKILL.md # Lean router
|
|
234
|
-
├── references/ # Docs loaded as needed
|
|
235
|
-
│ ├── workflow-1.md
|
|
236
|
-
│ ├── workflow-2.md
|
|
237
|
-
│ └── patterns.md
|
|
238
|
-
├── scripts/ # Executable utilities
|
|
239
|
-
│ ├── validate.py
|
|
240
|
-
│ └── generate.sh
|
|
241
|
-
└── assets/ # Files for output (templates, etc.)
|
|
242
|
-
└── template.yaml
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
Good for: Complex multi-workflow skills
|
|
246
|
-
|
|
247
180
|
### When to Use Each Directory
|
|
248
181
|
|
|
249
|
-
**references/** -
|
|
182
|
+
**references/** - Content Claude reads into context:
|
|
250
183
|
- Detailed workflow instructions
|
|
251
184
|
- Domain knowledge and patterns
|
|
252
|
-
- API documentation
|
|
253
185
|
- Schemas and specifications
|
|
254
186
|
|
|
255
187
|
**scripts/** - Executable code for deterministic operations:
|
|
256
188
|
- Validation utilities
|
|
257
189
|
- Code generation
|
|
258
|
-
- Data transformation
|
|
259
190
|
- File operations that need reliability
|
|
260
191
|
|
|
261
|
-
**Benefits of scripts:** Execute without loading into context (token-efficient), deterministic reliability, can be tested independently
|
|
262
|
-
|
|
263
192
|
**assets/** - Files used in output but never read:
|
|
264
193
|
- Templates Claude copies/modifies
|
|
265
194
|
- Boilerplate code
|
|
266
|
-
- Images, icons, fonts
|
|
267
|
-
- Sample documents
|
|
268
195
|
|
|
269
196
|
## Size Guidelines
|
|
270
197
|
|
|
271
|
-
|
|
272
|
-
- **
|
|
273
|
-
- **Maximum**: 5,000 words (strongly discouraged)
|
|
274
|
-
- **Anthropic guidance**: Under 500 lines
|
|
198
|
+
- **SKILL.md target**: <2,000 words
|
|
199
|
+
- **SKILL.md maximum**: 5,000 words (strongly discouraged)
|
|
275
200
|
|
|
276
|
-
If SKILL.md exceeds
|
|
201
|
+
If SKILL.md exceeds limits, move content to references/.
|
|
277
202
|
|
|
278
|
-
|
|
203
|
+
> "The context window is a public good—your skill shares it with everything else."
|
|
279
204
|
|
|
280
|
-
|
|
281
|
-
> — Anthropic Engineering
|
|
282
|
-
|
|
283
|
-
Challenge every piece of content: Does it justify its token cost? If Claude already knows it (general programming knowledge, common patterns), remove it.
|
|
205
|
+
Challenge every piece of content: Does it justify its token cost? If Claude already knows it, remove it.
|
|
284
206
|
|
|
285
207
|
## Activation Patterns
|
|
286
208
|
|
|
@@ -288,250 +210,41 @@ Challenge every piece of content: Does it justify its token cost? If Claude alre
|
|
|
288
210
|
|
|
289
211
|
**1. Autonomous (Description Match)**
|
|
290
212
|
Claude reads skill descriptions and decides when to activate based on user request matching.
|
|
291
|
-
|
|
292
|
-
- Less reliable (~50-84% success rate in community testing)
|
|
213
|
+
- Less reliable (~50-84% success rate)
|
|
293
214
|
- Works better with specific trigger phrases
|
|
294
|
-
-
|
|
215
|
+
- Fails if description is too detailed
|
|
295
216
|
|
|
296
217
|
**2. Explicit (Slash Command)**
|
|
297
218
|
A slash command forces skill activation:
|
|
298
|
-
|
|
299
219
|
```markdown
|
|
300
220
|
# /create-skill command
|
|
301
221
|
Activate the create-agent-skills skill to guide the user through skill creation.
|
|
302
222
|
```
|
|
303
|
-
|
|
304
|
-
- Most reliable method
|
|
305
|
-
- Use for critical workflows
|
|
306
|
-
- Don't rely solely on autonomous activation
|
|
223
|
+
Most reliable method.
|
|
307
224
|
|
|
308
225
|
**3. Hybrid (Recommended)**
|
|
309
226
|
Slash command for explicit invocation + good description for autonomous discovery.
|
|
310
227
|
|
|
311
|
-
### Improving Activation Reliability
|
|
312
|
-
|
|
313
|
-
1. **Specific trigger phrases** in description
|
|
314
|
-
2. **Reference in CLAUDE.md** for project skills
|
|
315
|
-
3. **Keep description focused on WHEN**, not detailed HOW
|
|
316
|
-
|
|
317
228
|
## Common Mistakes
|
|
318
229
|
|
|
319
230
|
### Mistake 1: Treating SKILL.md as Documentation
|
|
320
|
-
|
|
321
|
-
**Problem:** Writing about the skill instead of instructions for Claude
|
|
322
|
-
|
|
323
|
-
```markdown
|
|
324
|
-
# BAD - describes the skill
|
|
325
|
-
This skill helps users create PDF documents. It uses PyPDF2
|
|
326
|
-
for parsing and supports various output formats...
|
|
327
|
-
```
|
|
328
|
-
|
|
329
|
-
```markdown
|
|
330
|
-
# GOOD - instructs Claude
|
|
331
|
-
Parse the input PDF using the bundled script.
|
|
332
|
-
Extract text content, preserving table structure.
|
|
333
|
-
Output as markdown with proper heading hierarchy.
|
|
334
|
-
```
|
|
231
|
+
Writing about the skill instead of instructions for Claude.
|
|
335
232
|
|
|
336
233
|
### Mistake 2: Everything in One File
|
|
337
|
-
|
|
338
|
-
**Problem:** Putting all content in SKILL.md
|
|
339
|
-
|
|
340
|
-
```
|
|
341
|
-
skill-name/
|
|
342
|
-
└── SKILL.md (8,000 words)
|
|
343
|
-
```
|
|
344
|
-
|
|
345
|
-
**Solution:** Use progressive disclosure
|
|
346
|
-
|
|
347
|
-
```
|
|
348
|
-
skill-name/
|
|
349
|
-
├── SKILL.md (1,800 words - router)
|
|
350
|
-
└── references/
|
|
351
|
-
├── workflow-a.md (2,500 words)
|
|
352
|
-
└── workflow-b.md (3,700 words)
|
|
353
|
-
```
|
|
234
|
+
Putting all content in SKILL.md instead of using references/.
|
|
354
235
|
|
|
355
236
|
### Mistake 3: Vague Descriptions
|
|
237
|
+
No trigger phrases, unclear when to use.
|
|
356
238
|
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
```yaml
|
|
360
|
-
description: Helps with code review.
|
|
361
|
-
```
|
|
362
|
-
|
|
363
|
-
**Solution:** Specific scenarios and phrases
|
|
364
|
-
|
|
365
|
-
```yaml
|
|
366
|
-
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.
|
|
367
|
-
```
|
|
368
|
-
|
|
369
|
-
### Mistake 4: Second Person Writing
|
|
370
|
-
|
|
371
|
-
**Problem:** Using "you" throughout
|
|
372
|
-
|
|
373
|
-
```markdown
|
|
374
|
-
You should first read the config file.
|
|
375
|
-
Then you can parse the fields.
|
|
376
|
-
You might want to validate the output.
|
|
377
|
-
```
|
|
378
|
-
|
|
379
|
-
**Solution:** Imperative form
|
|
380
|
-
|
|
381
|
-
```markdown
|
|
382
|
-
First read the config file.
|
|
383
|
-
Parse the fields using the schema.
|
|
384
|
-
Validate output against expected format.
|
|
385
|
-
```
|
|
386
|
-
|
|
387
|
-
### Mistake 5: Missing Resource References
|
|
388
|
-
|
|
389
|
-
**Problem:** References exist but SKILL.md doesn't mention them
|
|
390
|
-
|
|
391
|
-
```markdown
|
|
392
|
-
# SKILL.md
|
|
393
|
-
[Content with no mention of references/]
|
|
394
|
-
```
|
|
395
|
-
|
|
396
|
-
**Solution:** Explicit pointers to resources
|
|
397
|
-
|
|
398
|
-
```markdown
|
|
399
|
-
## Additional Resources
|
|
400
|
-
|
|
401
|
-
For detailed patterns, read `references/patterns.md`.
|
|
402
|
-
For validation, run `scripts/validate.py`.
|
|
403
|
-
```
|
|
404
|
-
|
|
405
|
-
## Prompting Principles for Skill Content
|
|
406
|
-
|
|
407
|
-
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.
|
|
408
|
-
|
|
409
|
-
### Core Principle: Explain WHY, Not Just WHAT
|
|
410
|
-
|
|
411
|
-
Provide purpose and context rather than exhaustive implementation details. Trust Claude's intelligence.
|
|
412
|
-
|
|
413
|
-
**Mental Model**: Treat Claude like a brilliant senior colleague, not a junior who needs hand-holding.
|
|
414
|
-
|
|
415
|
-
**Provide:**
|
|
416
|
-
- The goal or purpose of the task
|
|
417
|
-
- Why this matters (business context, use case)
|
|
418
|
-
- Constraints that exist (technical, business, regulatory)
|
|
419
|
-
- What success looks like
|
|
420
|
-
|
|
421
|
-
**Avoid providing:**
|
|
422
|
-
- Every possible edge case (Claude handles these intelligently)
|
|
423
|
-
- Step-by-step implementation unless genuinely needed
|
|
424
|
-
- Obvious best practices for the domain
|
|
425
|
-
|
|
426
|
-
### Use Positive Framing
|
|
427
|
-
|
|
428
|
-
Tell Claude what TO do, not what NOT to do. Negatives require extra processing and can prime unwanted behavior.
|
|
429
|
-
|
|
430
|
-
| Negative Framing | Positive Framing |
|
|
431
|
-
|------------------|------------------|
|
|
432
|
-
| "Don't hallucinate facts" | "Only use information from the provided documents" |
|
|
433
|
-
| "Don't be too verbose" | "Keep responses concise and focused" |
|
|
434
|
-
| "Avoid making assumptions" | "Base responses on the provided data" |
|
|
435
|
-
| "Never skip validation" | "Always validate input before processing" |
|
|
436
|
-
|
|
437
|
-
### Be Clear and Direct
|
|
438
|
-
|
|
439
|
-
Claude 4.x models are more literal than previous versions. State exactly what is needed without hedging.
|
|
239
|
+
### Mistake 4: Missing Resource References
|
|
240
|
+
References exist but SKILL.md doesn't mention them.
|
|
440
241
|
|
|
441
|
-
|
|
442
|
-
|-------|-------|
|
|
443
|
-
| "Maybe consider validating..." | "Validate input before processing" |
|
|
444
|
-
| "It might be helpful to..." | "Include error handling for edge cases" |
|
|
445
|
-
| "You could potentially..." | "Generate tests for all public functions" |
|
|
242
|
+
## Validation
|
|
446
243
|
|
|
447
|
-
|
|
244
|
+
Run: `node ~/.claude/skills/create-agent-skills/scripts/validate-skill.js [skill-path]`
|
|
448
245
|
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
### The Complete Prompt Checklist
|
|
456
|
-
|
|
457
|
-
When writing skill content, verify each section answers:
|
|
458
|
-
|
|
459
|
-
- [ ] **WHAT** is Claude being asked to do?
|
|
460
|
-
- [ ] **WHY** does this matter? (Purpose, goal)
|
|
461
|
-
- [ ] **WHO** is this for? (Audience, user type)
|
|
462
|
-
- [ ] **SUCCESS** looks like what? (Outcomes, criteria)
|
|
463
|
-
- [ ] Frame everything **POSITIVELY** (what TO do)
|
|
464
|
-
|
|
465
|
-
### Quick Diagnostics
|
|
466
|
-
|
|
467
|
-
If a skill produces problematic results:
|
|
468
|
-
|
|
469
|
-
| Problem | Likely Cause | Fix |
|
|
470
|
-
|---------|--------------|-----|
|
|
471
|
-
| Too minimal/basic | Not explicit about expectations | Add "Create a fully-featured..." or specify depth |
|
|
472
|
-
| Off-topic | Missing context about purpose | Explain WHY and what it's for |
|
|
473
|
-
| Inconsistent | Vague instructions | Be more direct and specific |
|
|
474
|
-
| Overly cautious | Negative framing | Reframe positively |
|
|
475
|
-
| Missing key details | Didn't explain success criteria | Define concrete outcomes |
|
|
476
|
-
|
|
477
|
-
### Common Antipatterns
|
|
478
|
-
|
|
479
|
-
**The Micromanager**: Providing step-by-step implementation instead of goals.
|
|
480
|
-
- Fix: Explain the goal, let Claude handle implementation.
|
|
481
|
-
|
|
482
|
-
**The Negative Nancy**: String of "don't do X" instructions.
|
|
483
|
-
- Fix: Reframe every negative as a positive instruction.
|
|
484
|
-
|
|
485
|
-
**The Context-Free Zone**: Bare instruction with no purpose or audience.
|
|
486
|
-
- Fix: Explain who uses it, why it exists, what success looks like.
|
|
487
|
-
|
|
488
|
-
**The Vague Suggestion**: Hedged language like "maybe consider..."
|
|
489
|
-
- Fix: Be direct and explicit about what is needed.
|
|
490
|
-
|
|
491
|
-
### Reference
|
|
492
|
-
|
|
493
|
-
For comprehensive prompting guidance, consult:
|
|
494
|
-
- **ADR-002**: Structured Prompting Practices for Agents and Commands
|
|
495
|
-
- **Prompting skill**: `~/.claude/skills/prompting/SKILL.md`
|
|
496
|
-
|
|
497
|
-
These principles are mandatory for all skill content. Apply them when writing SKILL.md files and reference documents.
|
|
498
|
-
|
|
499
|
-
## Validation Checklist
|
|
500
|
-
|
|
501
|
-
Before finalizing any skill, verify:
|
|
502
|
-
|
|
503
|
-
### Structure
|
|
504
|
-
- [ ] SKILL.md exists with valid YAML frontmatter
|
|
505
|
-
- [ ] `name` field matches directory name (hyphen-case)
|
|
506
|
-
- [ ] `description` field present and under 1024 characters
|
|
507
|
-
- [ ] All referenced files actually exist
|
|
508
|
-
|
|
509
|
-
### Description Quality
|
|
510
|
-
- [ ] Uses third person ("This skill should be used when...")
|
|
511
|
-
- [ ] Includes specific trigger phrases
|
|
512
|
-
- [ ] Lists concrete scenarios
|
|
513
|
-
- [ ] Not overly detailed about implementation
|
|
514
|
-
|
|
515
|
-
### Content Quality
|
|
516
|
-
- [ ] Body uses imperative/infinitive form throughout
|
|
517
|
-
- [ ] No second person ("you should", "you can")
|
|
518
|
-
- [ ] Body under 2,000 words (or content moved to references/)
|
|
519
|
-
- [ ] Positive framing (what TO do, not what NOT to do)
|
|
520
|
-
|
|
521
|
-
### Prompting Quality
|
|
522
|
-
- [ ] Explains WHY, not just WHAT (purpose and context provided)
|
|
523
|
-
- [ ] Clear and direct language (no hedging or vague suggestions)
|
|
524
|
-
- [ ] Success criteria defined (what does good output look like?)
|
|
525
|
-
- [ ] Avoids micromanagement (goals over step-by-step instructions)
|
|
526
|
-
- [ ] No antipatterns (Micromanager, Negative Nancy, Context-Free Zone, Vague Suggestion)
|
|
527
|
-
|
|
528
|
-
### Progressive Disclosure
|
|
529
|
-
- [ ] SKILL.md acts as router to heavier content
|
|
530
|
-
- [ ] Detailed docs in references/
|
|
531
|
-
- [ ] Deterministic operations in scripts/
|
|
532
|
-
- [ ] References clearly pointed to from SKILL.md
|
|
533
|
-
|
|
534
|
-
### Testing
|
|
535
|
-
- [ ] Skill triggers on expected user queries
|
|
536
|
-
- [ ] Content is helpful for intended tasks
|
|
537
|
-
- [ ] 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>
|