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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-dev-template",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "description": "Structured AI-assisted development framework for Claude Code",
5
5
  "bin": {
6
6
  "cc-dev-template": "./bin/install.js"
@@ -5,91 +5,47 @@ description: Expert guidance for creating, modifying, and auditing Claude Code s
5
5
 
6
6
  # Create Agent Skills
7
7
 
8
- Expert guidance for building Claude Code skills correctly. Skills are prompts with progressive disclosure—they teach Claude how to perform specific tasks repeatedly and reliably.
9
-
10
- ## Why Skills Exist
11
-
12
- Skills solve one problem: **context window efficiency through progressive disclosure**.
13
-
14
- Without skills, complex workflows require loading thousands of lines of instructions upfront. With skills:
15
- - **Level 1**: Metadata (~100 words) loads at startup for all skills
16
- - **Level 2**: SKILL.md body (1,500-2,000 words) loads only when triggered
17
- - **Level 3**: references/, scripts/, assets/ load only when needed
18
-
19
- This means Claude can have access to unlimited specialized knowledge without paying the context cost until actually needed.
20
-
21
8
  ## What To Do Now
22
9
 
23
- Determine what the user wants to accomplish with skills.
24
-
25
10
  <step name="Understand Intent">
26
- Ask the user what they want to do:
11
+ Ask what the user wants to do with skills.
27
12
 
28
- Use `AskUserQuestion` with these options:
29
- - **Create a new skill** - Build a skill from scratch through guided conversation
30
- - **Audit existing skills** - Review all skills for best practices compliance
13
+ Use `AskUserQuestion`:
14
+ - **Create a new skill** - Build a skill through guided conversation
15
+ - **Audit existing skills** - Review skills for best practices compliance
31
16
  - **Modify a skill** - Update or improve an existing skill
32
- - **Something else** - Free-form request for other needs
17
+ - **Something else** - Free-form request
33
18
  </step>
34
19
 
35
20
  <step name="Route to Workflow">
36
- Based on the user's choice:
21
+ Based on choice, read the appropriate workflow:
37
22
 
38
23
  | Choice | Action |
39
24
  |--------|--------|
40
- | Create a new skill | Read `references/create.md` |
41
- | Audit existing skills | Read `references/audit.md` |
42
- | Modify a skill | Read `references/modify.md` |
43
- | Something else | Help them find the right workflow |
44
-
45
- Reading the workflow file is mandatory—it contains the detailed instructions for that workflow.
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 |
46
29
  </step>
47
30
 
48
- ## Core Skill Principles (Quick Reference)
49
-
50
- Before routing, understand these fundamentals that apply to ALL skill work:
51
-
52
- ### A Skill IS a Prompt
53
- SKILL.md is not documentation about the skill—it IS what Claude reads when the skill activates. Write it as instructions TO Claude, using imperative form.
54
-
55
- ### Description = Discovery
56
- The frontmatter `description` field determines when Claude triggers the skill. Include:
57
- - Third-person phrasing: "This skill should be used when..."
58
- - Specific trigger phrases users would say
59
- - Max 1024 characters
60
-
61
- ### Structure Matters
62
- ```
63
- skill-name/
64
- ├── SKILL.md # Required: lean router (1,500-2,000 words max)
65
- ├── references/ # Detailed docs loaded as needed
66
- ├── scripts/ # Executable utilities (token-efficient)
67
- └── assets/ # Files used in output, never read into context
68
- ```
69
-
70
- ### Writing Style
71
- - **Imperative form**: "Parse the file", "Validate the input"
72
- - **Never second person**: Avoid phrases like "should parse" or "can validate" with pronouns
73
- - **Objective instructional tone**: Facts and directives, not suggestions
74
-
75
- For complete principles, each workflow will load `references/principles.md` as needed.
76
-
77
- ## Skill Locations
31
+ ## Essential Knowledge
78
32
 
79
- Skills can exist at two levels:
33
+ **A skill IS a prompt.** When activated, Claude reads SKILL.md. It must contain instructions, not documentation about the skill.
80
34
 
81
- | Level | Path | Scope |
82
- |-------|------|-------|
83
- | User | `~/.claude/skills/` | Available in all projects |
84
- | Project | `.claude/skills/` | Shared with team via git |
35
+ **Progressive disclosure.** SKILL.md should be lean (<150 lines). Heavy content goes in references/. This keeps context efficient.
85
36
 
86
- The audit workflow discovers skills at both levels automatically.
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.
87
38
 
88
- ## Bundled Scripts
39
+ For complete principles, workflows load `references/principles.md` as needed.
89
40
 
90
- This skill includes utility scripts for validation and discovery:
41
+ ## Quick Reference
91
42
 
92
- - **`scripts/find-skills.js`** - Discovers all skills at user/project levels
93
- - **`scripts/validate-skill.js`** - Validates a skill against best practices
43
+ **Skill locations:**
44
+ | Level | Path |
45
+ |-------|------|
46
+ | User | `~/.claude/skills/` |
47
+ | Project | `.claude/skills/` |
94
48
 
95
- Run scripts via: `node ~/.claude/skills/create-agent-skills/scripts/[script-name].js`
49
+ **Bundled scripts:**
50
+ - `scripts/find-skills.js` - Discover all installed skills
51
+ - `scripts/validate-skill.js` - Validate a skill's structure
@@ -1,334 +1,93 @@
1
1
  # Audit Existing Skills
2
2
 
3
- This workflow discovers and reviews all installed skills against best practices. Use it to identify skills that need improvement and ensure consistency across skill libraries.
3
+ Read `references/principles.md` first.
4
4
 
5
- ## Purpose
5
+ ## What To Do
6
6
 
7
- Systematically review skills to identify:
8
- - Structural issues (missing files, wrong format)
9
- - Description problems (vague, wrong person, missing triggers)
10
- - Writing style violations (second person, negative framing)
11
- - Progressive disclosure failures (oversized SKILL.md, unreferenced resources)
12
- - Missing or broken references
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
- **Success looks like:** A comprehensive report of all skills with specific, actionable findings for any that need improvement.
13
+ ## What Makes a Good Skill
15
14
 
16
- ## Before Starting
15
+ **Actionability**: Every file tells Claude what to DO, not what the skill is ABOUT.
17
16
 
18
- Read `references/principles.md` if not already familiar with skill standards.
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
- ## Workflow
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
- <steps>
21
+ **No dead ends**: At every point, Claude knows what to do next.
23
22
 
24
- <step name="Discover All Skills">
25
- Find skills at both user and project levels.
23
+ ## How to Audit
26
24
 
27
- **Locations to scan:**
28
- ```
29
- ~/.claude/skills/ # User-level skills
30
- .claude/skills/ # Project-level skills (current project)
31
- src/skills/ # Source skills (if in dev-template)
32
- ```
33
-
34
- **Run the discovery script:**
35
- ```bash
36
- node ~/.claude/skills/create-agent-skills/scripts/find-skills.js
37
- ```
38
-
39
- Or manually scan:
40
- ```bash
41
- # User-level
42
- ls -la ~/.claude/skills/*/SKILL.md 2>/dev/null
43
-
44
- # Project-level
45
- ls -la .claude/skills/*/SKILL.md 2>/dev/null
46
-
47
- # Source (dev-template)
48
- ls -la src/skills/*/SKILL.md 2>/dev/null
49
- ```
50
-
51
- **For each skill found, record:**
52
- - Full path to SKILL.md
53
- - Skill name (directory name)
54
- - Location type (user/project/source)
55
- </step>
56
-
57
- <step name="Ask Audit Scope">
58
- Determine what to audit.
59
-
60
- Use `AskUserQuestion`:
61
- - **All skills** - Review everything discovered
62
- - **User-level only** - Just ~/.claude/skills/
63
- - **Project-level only** - Just .claude/skills/
64
- - **Specific skill** - Name the skill to audit
65
-
66
- If user selects "Specific skill," ask which one from the discovered list.
67
- </step>
68
-
69
- <step name="Audit Each Skill">
70
- For each skill in scope, perform these checks:
71
-
72
- ### Check 1: Structure Validation
73
-
74
- **Verify:**
75
- - [ ] SKILL.md exists
76
- - [ ] SKILL.md has YAML frontmatter (starts with `---`)
77
- - [ ] Frontmatter has `name` field
78
- - [ ] Frontmatter has `description` field
79
- - [ ] `name` matches directory name
80
- - [ ] `name` is hyphen-case (lowercase, hyphens only)
81
-
82
- **Record issues:**
83
- ```
84
- STRUCTURAL: [skill-name] - [specific issue]
85
- ```
25
+ ### 1. Discover and Read Everything
86
26
 
87
- ### Check 2: Description Quality
27
+ Use `scripts/find-skills.js` to list available skills. After selecting a skill to audit:
88
28
 
89
- **Read the description and verify:**
90
- - [ ] Under 1024 characters
91
- - [ ] Uses third person ("This skill should be used when...")
92
- - [ ] Contains specific trigger phrases (quoted examples of what users say)
93
- - [ ] Explains WHEN to use, not just WHAT it does
94
- - [ ] Not overly detailed about implementation
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
95
32
 
96
- **Red flags:**
97
- - Starts with "Use this skill" (wrong person)
98
- - No quoted trigger phrases
99
- - Only describes functionality, not activation scenarios
100
- - Over 1024 characters
33
+ **You cannot audit a skill without reading all its files.**
101
34
 
102
- **Record issues:**
103
- ```
104
- DESCRIPTION: [skill-name] - [specific issue]
105
- ```
106
-
107
- ### Check 3: Writing Style
108
-
109
- **Scan SKILL.md body for:**
110
-
111
- **Second person violations:**
112
- - "you should"
113
- - "you can"
114
- - "you need"
115
- - "you might"
116
- - "you will"
117
- - "your"
118
-
119
- **Passive voice (less critical but note):**
120
- - "should be"
121
- - "can be"
122
- - "is done"
123
-
124
- **Negative framing:**
125
- - "don't"
126
- - "never"
127
- - "avoid"
128
- - "do not"
129
-
130
- **Record issues:**
131
- ```
132
- STYLE: [skill-name] - Found [count] instances of second person ("you should", etc.)
133
- STYLE: [skill-name] - Found negative framing: "[example]"
134
- ```
35
+ ### 2. Evaluate Each File
135
36
 
136
- ### Check 4: Size Analysis
37
+ For each file, ask:
137
38
 
138
- **Measure:**
139
- - Word count of SKILL.md body (excluding frontmatter)
140
- - Line count of SKILL.md
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?
141
43
 
142
- **Thresholds:**
143
- | Metric | Good | Warning | Problem |
144
- |--------|------|---------|---------|
145
- | Words | <2,000 | 2,000-3,500 | >3,500 |
146
- | Lines | <300 | 300-500 | >500 |
44
+ ### 3. Note External Dependencies
147
45
 
148
- **If oversized:**
149
- - Check if references/ directory exists
150
- - If no references/, skill needs restructuring
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
151
50
 
152
- **Record issues:**
153
- ```
154
- SIZE: [skill-name] - SKILL.md is [X] words ([Y] lines) - consider moving content to references/
155
- ```
51
+ Flag these with their expected locations. They aren't audited here, but the user should know they exist.
156
52
 
157
- ### Check 5: Progressive Disclosure
53
+ ### 4. Check Structural Basics
158
54
 
159
- **Check structure:**
160
- - Does skill have references/ directory?
161
- - Does skill have scripts/ directory?
162
- - Does SKILL.md reference these resources?
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
163
59
 
164
- **Verify references are used:**
165
- - For each file in references/, check if SKILL.md mentions it
166
- - For each file in scripts/, check if SKILL.md mentions it
167
- - Flag unreferenced resources
60
+ ## Red Flags
168
61
 
169
- **Record issues:**
170
- ```
171
- DISCLOSURE: [skill-name] - references/patterns.md exists but is never referenced in SKILL.md
172
- DISCLOSURE: [skill-name] - Large SKILL.md with no references/ directory
173
- ```
62
+ **Documentation language**: "This skill orchestrates...", "Who this is for:", "Success looks like:" - these describe, they don't instruct.
174
63
 
175
- ### Check 6: Reference Integrity
64
+ **Inline heavy content**: Large YAML schemas, detailed examples, extensive phase explanations - these belong in references/.
176
65
 
177
- **For every path mentioned in SKILL.md:**
178
- - `references/*.md` files exist
179
- - `scripts/*.js` or `scripts/*.py` files exist
180
- - `assets/*` files exist
66
+ **No clear action**: After reading a file, Claude doesn't know what to do next.
181
67
 
182
- **Record issues:**
183
- ```
184
- BROKEN: [skill-name] - References `references/workflow.md` but file doesn't exist
185
- ```
186
- </step>
68
+ **Missing routing**: Multi-phase skill but all content inline instead of routing to reference files.
187
69
 
188
- <step name="Generate Report">
189
- Compile findings into a structured report.
190
-
191
- **Report format:**
70
+ ## Report Format
192
71
 
193
72
  ```markdown
194
- # Skill Audit Report
195
-
196
- Generated: [timestamp]
197
- Skills audited: [count]
198
- Location(s): [user/project/source]
73
+ # Audit Report: [skill-name]
199
74
 
200
75
  ## Summary
76
+ - Files audited: [list all files read]
77
+ - External dependencies: [list any sub-agents, commands, scripts referenced]
201
78
 
202
- | Status | Count |
203
- |--------|-------|
204
- | Passing | [X] |
205
- | Warnings | [Y] |
206
- | Failing | [Z] |
79
+ ## Findings
207
80
 
208
- ## Skills Passing All Checks
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]
209
86
 
210
- - skill-name-1
211
- - skill-name-2
212
-
213
- ## Skills with Warnings
214
-
215
- ### [skill-name]
216
- - SIZE: SKILL.md is 2,500 words - consider refactoring
217
-
218
- ## Skills with Failures
219
-
220
- ### [skill-name]
221
- - STRUCTURAL: Missing `description` in frontmatter
222
- - STYLE: Found 15 instances of second person
223
- - BROKEN: References `scripts/validate.py` but file missing
224
-
225
- ## Recommendations
226
-
227
- [Prioritized list of what to fix first]
87
+ ## Passing
88
+ [What works well about this skill]
228
89
  ```
229
90
 
230
- **Present the report to the user.**
231
- </step>
232
-
233
- <step name="Offer Fixes">
234
- After presenting the report, offer to fix issues.
235
-
236
- Use `AskUserQuestion`:
237
- - **Fix all auto-fixable issues** - Apply safe fixes automatically
238
- - **Fix specific skill** - Work on one skill at a time
239
- - **Just the report** - No fixes, user will handle manually
240
- - **Create modification tasks** - Add to todo list for later
241
-
242
- **Auto-fixable issues:**
243
- - Second person → imperative form conversion
244
- - Negative framing → positive framing conversion
245
- - Missing frontmatter fields (can prompt for values)
246
-
247
- **Manual-fix-required issues:**
248
- - Oversized SKILL.md (needs content decisions)
249
- - Missing referenced files (needs content creation)
250
- - Vague descriptions (needs user input on triggers)
251
-
252
- If user wants fixes, transition to `references/modify.md` for each skill that needs work.
253
- </step>
254
-
255
- </steps>
256
-
257
- ## Audit Checklist (Quick Reference)
258
-
259
- For quick manual audits, use this checklist:
260
-
261
- ### Must Pass
262
- - [ ] SKILL.md exists with valid YAML frontmatter
263
- - [ ] `name` and `description` fields present
264
- - [ ] `name` matches directory name (hyphen-case)
265
- - [ ] `description` under 1024 characters
266
- - [ ] `description` uses third person
267
- - [ ] `description` has trigger phrases
268
- - [ ] No second person in body
269
- - [ ] All referenced files exist
270
-
271
- ### Should Pass
272
- - [ ] SKILL.md under 2,000 words
273
- - [ ] Uses imperative form throughout
274
- - [ ] Positive framing (no "don't", "never")
275
- - [ ] references/ used for heavy content
276
- - [ ] All resources in skill directory are referenced
277
-
278
- ### Nice to Have
279
- - [ ] Examples included
280
- - [ ] Clear section structure
281
- - [ ] Scripts for deterministic operations
282
-
283
- ## Common Audit Findings
284
-
285
- ### Finding: Many Skills Use Second Person
286
-
287
- **Pattern:** "You should...", "You can...", "You need..."
288
-
289
- **Fix approach:**
290
- ```
291
- Before: "You should parse the config file first."
292
- After: "Parse the config file first."
293
-
294
- Before: "You can use grep to search."
295
- After: "Use grep to search."
296
-
297
- Before: "If you need to validate, you should run the tests."
298
- After: "To validate, run the tests."
299
- ```
300
-
301
- ### Finding: Descriptions Are Vague
302
-
303
- **Pattern:** "Helps with X" or "Provides Y guidance"
304
-
305
- **Fix approach:**
306
- 1. Ask user what they say when they need this skill
307
- 2. Collect 5-10 trigger phrases
308
- 3. Rewrite in third person with phrases
309
-
310
- ### Finding: SKILL.md Is Too Large
311
-
312
- **Pattern:** >3,000 words with no references/
313
-
314
- **Fix approach:**
315
- 1. Identify logical sections
316
- 2. Move detailed content to references/
317
- 3. Keep routing and essential knowledge in SKILL.md
318
- 4. Add explicit references: "For detailed patterns, read `references/patterns.md`"
319
-
320
- ### Finding: Unreferenced Resources
321
-
322
- **Pattern:** Files exist in references/ or scripts/ but SKILL.md doesn't mention them
323
-
324
- **Fix approach:**
325
- 1. Determine if resource is needed
326
- 2. If needed, add reference in SKILL.md
327
- 3. If not needed, consider removing
328
-
329
- ## Output
91
+ ## After the Audit
330
92
 
331
- The audit produces:
332
- 1. **Report** - Comprehensive findings for all audited skills
333
- 2. **Recommendations** - Prioritized list of improvements
334
- 3. **Optional fixes** - Automated corrections for simple issues
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`.