cc-dev-template 0.1.5 → 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/bin/install.js +23 -16
- package/package.json +1 -1
- package/src/skills/create-agent-skills/SKILL.md +51 -0
- package/src/skills/create-agent-skills/references/audit.md +429 -0
- package/src/skills/create-agent-skills/references/create.md +129 -0
- package/src/skills/create-agent-skills/references/modify.md +104 -0
- package/src/skills/create-agent-skills/references/principles.md +614 -0
- package/src/skills/create-agent-skills/scripts/find-skills.js +206 -0
- package/src/skills/create-agent-skills/scripts/validate-skill.js +386 -0
- package/src/skills/orchestration/SKILL.md +1 -1
- package/src/skills/orchestration/scripts/plan-status.js +1 -1
package/bin/install.js
CHANGED
|
@@ -2,11 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
const fs = require('fs');
|
|
4
4
|
const path = require('path');
|
|
5
|
+
const os = require('os');
|
|
5
6
|
const { execSync } = require('child_process');
|
|
6
7
|
|
|
8
|
+
// Parse command line arguments
|
|
9
|
+
const args = process.argv.slice(2);
|
|
10
|
+
const isProjectLevel = args.includes('--project');
|
|
11
|
+
|
|
7
12
|
const SRC_DIR = path.join(__dirname, '..', 'src');
|
|
8
|
-
const CLAUDE_DIR =
|
|
13
|
+
const CLAUDE_DIR = isProjectLevel
|
|
14
|
+
? path.join(process.cwd(), '.claude')
|
|
15
|
+
: path.join(os.homedir(), '.claude');
|
|
9
16
|
|
|
17
|
+
const installMode = isProjectLevel ? 'project-level' : 'user-level';
|
|
18
|
+
console.log(`\nCC Dev Template - ${installMode} installation`);
|
|
19
|
+
console.log('='.repeat(50));
|
|
10
20
|
console.log(`Installing to ${CLAUDE_DIR}...`);
|
|
11
21
|
|
|
12
22
|
// Create directories
|
|
@@ -78,20 +88,6 @@ if (fs.existsSync(skillsDir)) {
|
|
|
78
88
|
});
|
|
79
89
|
console.log(`✓ ${skills.length} skills installed`);
|
|
80
90
|
|
|
81
|
-
// Copy skill-specific scripts to global scripts directory
|
|
82
|
-
const orchScriptsDir = path.join(skillsDir, 'orchestration', 'scripts');
|
|
83
|
-
if (fs.existsSync(orchScriptsDir)) {
|
|
84
|
-
const orchScripts = fs.readdirSync(orchScriptsDir).filter(f => f.endsWith('.js'));
|
|
85
|
-
orchScripts.forEach(file => {
|
|
86
|
-
fs.copyFileSync(
|
|
87
|
-
path.join(orchScriptsDir, file),
|
|
88
|
-
path.join(CLAUDE_DIR, 'scripts', file)
|
|
89
|
-
);
|
|
90
|
-
});
|
|
91
|
-
if (orchScripts.length) {
|
|
92
|
-
console.log(`✓ Orchestration skill scripts copied to scripts/`);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
91
|
} else {
|
|
96
92
|
console.log(' No skills to install');
|
|
97
93
|
}
|
|
@@ -160,6 +156,17 @@ Installed to:
|
|
|
160
156
|
Scripts: ${CLAUDE_DIR}/scripts/
|
|
161
157
|
Skills: ${CLAUDE_DIR}/skills/
|
|
162
158
|
Settings: ${CLAUDE_DIR}/settings.json
|
|
159
|
+
`);
|
|
163
160
|
|
|
164
|
-
|
|
161
|
+
if (isProjectLevel) {
|
|
162
|
+
console.log(`Project-level installation complete.
|
|
163
|
+
You can commit .claude/ to version control to share with your team.
|
|
164
|
+
Claude Code will use project-level settings with user-level as fallback.
|
|
165
165
|
`);
|
|
166
|
+
} else {
|
|
167
|
+
console.log(`User-level installation complete.
|
|
168
|
+
These settings are available globally across all your projects.
|
|
169
|
+
`);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
console.log('Restart Claude Code to pick up changes.');
|
package/package.json
CHANGED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: create-agent-skills
|
|
3
|
+
description: Expert guidance for creating, modifying, and auditing Claude Code skills. This skill should be used when the user asks to "create a skill", "build a new skill", "audit skills", "review my skills", "update a skill", "modify a skill", "improve a skill", or mentions skill development, SKILL.md files, or progressive disclosure.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Create Agent Skills
|
|
7
|
+
|
|
8
|
+
## What To Do Now
|
|
9
|
+
|
|
10
|
+
<step name="Understand Intent">
|
|
11
|
+
Ask what the user wants to do with skills.
|
|
12
|
+
|
|
13
|
+
Use `AskUserQuestion`:
|
|
14
|
+
- **Create a new skill** - Build a skill through guided conversation
|
|
15
|
+
- **Audit existing skills** - Review skills for best practices compliance
|
|
16
|
+
- **Modify a skill** - Update or improve an existing skill
|
|
17
|
+
- **Something else** - Free-form request
|
|
18
|
+
</step>
|
|
19
|
+
|
|
20
|
+
<step name="Route to Workflow">
|
|
21
|
+
Based on choice, read the appropriate workflow:
|
|
22
|
+
|
|
23
|
+
| Choice | Action |
|
|
24
|
+
|--------|--------|
|
|
25
|
+
| Create | Read `references/create.md` |
|
|
26
|
+
| Audit | Read `references/audit.md` |
|
|
27
|
+
| Modify | Read `references/modify.md` |
|
|
28
|
+
| Something else | Help find the right approach |
|
|
29
|
+
</step>
|
|
30
|
+
|
|
31
|
+
## Essential Knowledge
|
|
32
|
+
|
|
33
|
+
**A skill IS a prompt.** When activated, Claude reads SKILL.md. It must contain instructions, not documentation about the skill.
|
|
34
|
+
|
|
35
|
+
**Progressive disclosure.** SKILL.md should be lean (<150 lines). Heavy content goes in references/. This keeps context efficient.
|
|
36
|
+
|
|
37
|
+
**The test:** After reading SKILL.md, would Claude know what to DO? If it only knows what the skill is about, it's written wrong.
|
|
38
|
+
|
|
39
|
+
For complete principles, workflows load `references/principles.md` as needed.
|
|
40
|
+
|
|
41
|
+
## Quick Reference
|
|
42
|
+
|
|
43
|
+
**Skill locations:**
|
|
44
|
+
| Level | Path |
|
|
45
|
+
|-------|------|
|
|
46
|
+
| User | `~/.claude/skills/` |
|
|
47
|
+
| Project | `.claude/skills/` |
|
|
48
|
+
|
|
49
|
+
**Bundled scripts:**
|
|
50
|
+
- `scripts/find-skills.js` - Discover all installed skills
|
|
51
|
+
- `scripts/validate-skill.js` - Validate a skill's structure
|
|
@@ -0,0 +1,429 @@
|
|
|
1
|
+
# Audit Existing Skills
|
|
2
|
+
|
|
3
|
+
This workflow discovers and reviews all installed skills against best practices. The most important check is whether the SKILL.md is written as a proper prompt, not as documentation.
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
Systematically review skills to identify:
|
|
8
|
+
- **Fundamental prompt problems** - Is this written as instructions TO Claude or documentation ABOUT the skill?
|
|
9
|
+
- Content that belongs in references, not SKILL.md
|
|
10
|
+
- Structural issues (missing files, wrong format)
|
|
11
|
+
- Description problems (vague, wrong person, missing triggers)
|
|
12
|
+
- Writing style violations
|
|
13
|
+
|
|
14
|
+
**Success looks like:** Actually reading each skill and evaluating whether it would work as a prompt. Surface fundamental problems, not just superficial style issues.
|
|
15
|
+
|
|
16
|
+
## Before Starting
|
|
17
|
+
|
|
18
|
+
Read `references/principles.md` to understand what makes a good skill.
|
|
19
|
+
|
|
20
|
+
**Critical understanding:** A SKILL.md IS the prompt. When Claude activates a skill, it reads SKILL.md. If SKILL.md reads like documentation ("This skill does X", "Who this is for"), Claude won't know what to DO.
|
|
21
|
+
|
|
22
|
+
## Workflow
|
|
23
|
+
|
|
24
|
+
<steps>
|
|
25
|
+
|
|
26
|
+
<step name="Discover All Skills">
|
|
27
|
+
Find skills at both user and project levels.
|
|
28
|
+
|
|
29
|
+
**Locations to scan:**
|
|
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.
|
|
117
|
+
|
|
118
|
+
**Success looks like**: Running /implement-form progresses through all phases.
|
|
119
|
+
|
|
120
|
+
## Phase Overview
|
|
121
|
+
|
|
122
|
+
Phase 1 does X, Phase 2 does Y...
|
|
123
|
+
|
|
124
|
+
## YAML Schema
|
|
125
|
+
|
|
126
|
+
```yaml
|
|
127
|
+
# 50 lines of YAML schema inline
|
|
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?
|
|
136
|
+
|
|
137
|
+
**Record severity:**
|
|
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
|
|
141
|
+
|
|
142
|
+
```
|
|
143
|
+
PROMPT_QUALITY: [skill-name] - CRITICAL: Written as documentation, not instructions. Contains "Who this is for", "Success looks like" meta-descriptions.
|
|
144
|
+
PROMPT_QUALITY: [skill-name] - CRITICAL: ~200 lines of YAML schemas inline. Move to references/.
|
|
145
|
+
PROMPT_QUALITY: [skill-name] - CRITICAL: No "What To Do" section. Claude won't know what action to take.
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
### CHECK 1: Content That Should Be in References
|
|
151
|
+
|
|
152
|
+
**Read the SKILL.md and identify content that doesn't belong:**
|
|
153
|
+
|
|
154
|
+
| Content Type | Should Be In | Why |
|
|
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 |
|
|
161
|
+
|
|
162
|
+
**Count lines of inline content that should be moved:**
|
|
163
|
+
- Code blocks >20 lines
|
|
164
|
+
- Tables >10 rows
|
|
165
|
+
- Schema definitions
|
|
166
|
+
- Detailed explanations of internals
|
|
167
|
+
|
|
168
|
+
**Record issues:**
|
|
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
|
+
```
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
### CHECK 2: Router Pattern (for complex skills)
|
|
178
|
+
|
|
179
|
+
**If the skill has multiple workflows or phases:**
|
|
180
|
+
|
|
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
|
+
```markdown
|
|
198
|
+
## Phase 1: Scaffolding
|
|
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
|
+
```
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
### CHECK 5: Writing Style
|
|
249
|
+
|
|
250
|
+
**Scan for second person:**
|
|
251
|
+
- "you should", "you can", "you need", "you might", "your"
|
|
252
|
+
|
|
253
|
+
**Scan for negative framing:**
|
|
254
|
+
- "don't", "never", "avoid", "do not"
|
|
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
|
|
327
|
+
|
|
328
|
+
## 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
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
**Present the report to the user.**
|
|
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.
|
|
428
|
+
|
|
429
|
+
**Fix:** Move to `references/schemas.md`, reference when needed.
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# Create a New Skill
|
|
2
|
+
|
|
3
|
+
Guide the user through building a skill via interactive conversation. Extract their domain knowledge, then produce a properly structured skill.
|
|
4
|
+
|
|
5
|
+
## What To Do
|
|
6
|
+
|
|
7
|
+
<steps>
|
|
8
|
+
|
|
9
|
+
<step name="Have a Conversation">
|
|
10
|
+
Talk with the user to understand what they need. This is the most important step.
|
|
11
|
+
|
|
12
|
+
**Goals of the conversation:**
|
|
13
|
+
- Understand the task they want to standardize
|
|
14
|
+
- Extract domain knowledge Claude doesn't naturally have
|
|
15
|
+
- Learn terminology, patterns, edge cases, gotchas
|
|
16
|
+
- Get concrete examples of the task done well
|
|
17
|
+
|
|
18
|
+
**Good questions:**
|
|
19
|
+
- "Walk me through how you do this today."
|
|
20
|
+
- "What's the most important thing to get right?"
|
|
21
|
+
- "What mistakes do people commonly make?"
|
|
22
|
+
- "What would an expert know that a beginner wouldn't?"
|
|
23
|
+
|
|
24
|
+
**Take time here.** The skill's quality depends entirely on understanding the domain deeply. Ask follow-up questions. Request examples. Understand WHY certain approaches work.
|
|
25
|
+
|
|
26
|
+
This should feel like a conversation, not a form to fill out.
|
|
27
|
+
</step>
|
|
28
|
+
|
|
29
|
+
<step name="Determine Scope and Structure">
|
|
30
|
+
Based on the conversation, decide:
|
|
31
|
+
|
|
32
|
+
1. **Name**: What to call it (hyphen-case)
|
|
33
|
+
2. **Scope**: One focused task or multiple related workflows?
|
|
34
|
+
3. **Complexity**: Does it need references/? scripts/? Or just SKILL.md?
|
|
35
|
+
|
|
36
|
+
**Principles:**
|
|
37
|
+
- Focused is better than broad
|
|
38
|
+
- If it has distinct workflows, use router pattern with references/
|
|
39
|
+
- If it needs reliable code execution, add scripts/
|
|
40
|
+
|
|
41
|
+
Confirm with user: "I'm thinking this should be called `[name]` and cover [scope]. Sound right?"
|
|
42
|
+
</step>
|
|
43
|
+
|
|
44
|
+
<step name="Craft the Description">
|
|
45
|
+
The description determines when Claude activates the skill. This is critical.
|
|
46
|
+
|
|
47
|
+
**Collect trigger phrases from user:**
|
|
48
|
+
"When you need this skill, what would you say to Claude?"
|
|
49
|
+
|
|
50
|
+
List 5-10 phrases they might use, then combine into a description that:
|
|
51
|
+
- Uses third person ("This skill should be used when...")
|
|
52
|
+
- Includes the actual trigger phrases
|
|
53
|
+
- Stays under 1024 characters
|
|
54
|
+
</step>
|
|
55
|
+
|
|
56
|
+
<step name="Write the Skill">
|
|
57
|
+
Create the skill files. Apply these principles:
|
|
58
|
+
|
|
59
|
+
**The skill must be instructions, not documentation.**
|
|
60
|
+
If Claude reads it, it should know what to DO, not just understand what the skill is about.
|
|
61
|
+
|
|
62
|
+
**Use progressive disclosure.**
|
|
63
|
+
SKILL.md should be lean (<150 lines for routers, <300 for simple skills). Heavy content goes in references/.
|
|
64
|
+
|
|
65
|
+
**Apply prompting guidelines:**
|
|
66
|
+
- Explain WHY, not just WHAT
|
|
67
|
+
- Define what success looks like
|
|
68
|
+
- Be clear and direct
|
|
69
|
+
- Avoid micromanagement - give goals, not step-by-step unless truly needed
|
|
70
|
+
|
|
71
|
+
**Writing style:**
|
|
72
|
+
- Imperative form ("Parse the file", not "You should parse")
|
|
73
|
+
- Positive framing ("Use X approach", not "Don't use Y")
|
|
74
|
+
- No meta-descriptions ("Who this is for", "Success looks like" don't belong in SKILL.md)
|
|
75
|
+
|
|
76
|
+
Read `references/principles.md` for the full guide on what makes a good skill.
|
|
77
|
+
</step>
|
|
78
|
+
|
|
79
|
+
<step name="Choose Install Location">
|
|
80
|
+
Ask: "Should this be available everywhere (user level) or just this project (project level)?"
|
|
81
|
+
|
|
82
|
+
| Level | Path |
|
|
83
|
+
|-------|------|
|
|
84
|
+
| User | `~/.claude/skills/[name]/` |
|
|
85
|
+
| Project | `.claude/skills/[name]/` |
|
|
86
|
+
</step>
|
|
87
|
+
|
|
88
|
+
<step name="Create and Validate">
|
|
89
|
+
Write the files, then validate:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
node ~/.claude/skills/create-agent-skills/scripts/validate-skill.js [skill-path]
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Fix any issues found. The validator checks structure, but also manually verify:
|
|
96
|
+
- Is this written as instructions, not documentation?
|
|
97
|
+
- Would Claude know what to DO after reading this?
|
|
98
|
+
- Is heavy content in references/, not inline?
|
|
99
|
+
</step>
|
|
100
|
+
|
|
101
|
+
<step name="Test">
|
|
102
|
+
Guide the user:
|
|
103
|
+
1. Restart Claude Code
|
|
104
|
+
2. Say one of the trigger phrases
|
|
105
|
+
3. Verify the skill activates and behaves as expected
|
|
106
|
+
|
|
107
|
+
If it doesn't work, iterate. The conversation isn't over until the skill works.
|
|
108
|
+
</step>
|
|
109
|
+
|
|
110
|
+
</steps>
|
|
111
|
+
|
|
112
|
+
## Key Principles
|
|
113
|
+
|
|
114
|
+
**The conversation matters most.** A well-structured skill with shallow domain knowledge is worse than a rough skill with deep expertise captured.
|
|
115
|
+
|
|
116
|
+
**Skills are prompts.** Every SKILL.md will be read by Claude. Write it as instructions, not as a README.
|
|
117
|
+
|
|
118
|
+
**Trust Claude's intelligence.** Explain goals and principles. Don't micromanage with exact templates unless the task is genuinely complex or error-prone.
|
|
119
|
+
|
|
120
|
+
**Progressive disclosure.** Load details only when needed. SKILL.md routes to references/, which contain the heavy content.
|
|
121
|
+
|
|
122
|
+
## Quality Check
|
|
123
|
+
|
|
124
|
+
Before finishing, verify:
|
|
125
|
+
|
|
126
|
+
1. **Would Claude know what to DO?** Not just understand what the skill is about.
|
|
127
|
+
2. **Is domain knowledge captured?** The user's expertise should be in the skill.
|
|
128
|
+
3. **Is it lean?** Heavy content in references/, not SKILL.md.
|
|
129
|
+
4. **Does the description have triggers?** Specific phrases the user would say.
|