claude-skills-cli 0.0.6 → 0.0.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.
Files changed (42) hide show
  1. package/README.md +49 -9
  2. package/dist/commands/doctor.js +128 -0
  3. package/dist/commands/doctor.js.map +1 -0
  4. package/dist/commands/init.js +5 -3
  5. package/dist/commands/init.js.map +1 -1
  6. package/dist/commands/install.js +1 -1
  7. package/dist/commands/install.js.map +1 -1
  8. package/dist/commands/stats.js +1 -1
  9. package/dist/commands/stats.js.map +1 -1
  10. package/dist/commands/validate.js +24 -3
  11. package/dist/commands/validate.js.map +1 -1
  12. package/dist/commands/watch.js +82 -0
  13. package/dist/commands/watch.js.map +1 -0
  14. package/dist/core/templates.js +18 -0
  15. package/dist/core/templates.js.map +1 -1
  16. package/dist/core/validator.js +174 -321
  17. package/dist/core/validator.js.map +1 -1
  18. package/dist/index.js +38 -12
  19. package/dist/index.js.map +1 -1
  20. package/dist/skills/skill-creator/SKILL.md +28 -112
  21. package/dist/skills/skill-creator/references/cli-reference.md +152 -38
  22. package/dist/skills/skill-creator/references/development-process.md +208 -0
  23. package/dist/skills/skill-creator/references/skill-examples.md +1 -1
  24. package/dist/validators/alignment-validator.js +54 -0
  25. package/dist/validators/alignment-validator.js.map +1 -0
  26. package/dist/validators/content-validator.js +144 -0
  27. package/dist/validators/content-validator.js.map +1 -0
  28. package/dist/validators/description-validator.js +136 -0
  29. package/dist/validators/description-validator.js.map +1 -0
  30. package/dist/validators/file-structure-validator.js +125 -0
  31. package/dist/validators/file-structure-validator.js.map +1 -0
  32. package/dist/validators/frontmatter-validator.js +165 -0
  33. package/dist/validators/frontmatter-validator.js.map +1 -0
  34. package/dist/validators/references-validator.js +125 -0
  35. package/dist/validators/references-validator.js.map +1 -0
  36. package/dist/validators/text-analysis.js +71 -0
  37. package/dist/validators/text-analysis.js.map +1 -0
  38. package/docs/prompt-that-started-it-all.md +19 -0
  39. package/package.json +3 -3
  40. package/docs/SKILL-DEVELOPMENT.md +0 -460
  41. package/docs/SKILL-EXAMPLES.md +0 -528
  42. package/docs/SKILLS-ARCHITECTURE.md +0 -381
@@ -1,460 +0,0 @@
1
- # Skill Development Workflow
2
-
3
- ## Quick Start
4
-
5
- ```bash
6
- # Create a new skill
7
- claude-skills init --name my-skill --description "What it does"
8
-
9
- # Validate the skill
10
- claude-skills validate .claude/skills/my-skill
11
-
12
- # Package for distribution
13
- claude-skills package .claude/skills/my-skill
14
- ```
15
-
16
- ## The 6-Step Process
17
-
18
- Based on Anthropic's skill-creator methodology, adapted for
19
- devhub-crm.
20
-
21
- ### Step 1: Understanding with Concrete Examples
22
-
23
- **Goal**: Clearly understand how the skill will be used in practice.
24
-
25
- **Process**:
26
-
27
- 1. Identify specific scenarios where skill is needed
28
- 2. Collect real examples from your workflow
29
- 3. Note what Claude struggles with currently
30
- 4. Validate examples with actual usage
31
-
32
- **Example Questions**:
33
-
34
- - "What task am I repeating that needs this skill?"
35
- - "Can I give 3-5 concrete examples of using this?"
36
- - "What would trigger Claude to use this skill?"
37
- - "What information does Claude need that I keep providing?"
38
-
39
- **Output**: 3-5 concrete examples of skill usage
40
-
41
- ---
42
-
43
- ### Step 2: Planning Reusable Contents
44
-
45
- **Goal**: Analyze examples to determine what to include in skill.
46
-
47
- **For each example, ask**:
48
-
49
- 1. What would Claude need to execute this from scratch?
50
- 2. What code is being rewritten repeatedly? → `scripts/`
51
- 3. What context is repeated each time? → `SKILL.md` or `references/`
52
- 4. What templates or assets are reused? → `assets/`
53
-
54
- **Decision Matrix**:
55
-
56
- | Content Type | Goes In | Example |
57
- | ---------------------- | ----------- | -------------------------------- |
58
- | Core workflow patterns | SKILL.md | "Always use prepared statements" |
59
- | Detailed documentation | references/ | Complete API reference |
60
- | Repeated code | scripts/ | Validation logic |
61
- | Templates/resources | assets/ | Boilerplate HTML |
62
-
63
- **Output**: List of files to create with their purposes
64
-
65
- ---
66
-
67
- ### Step 3: Initializing the Skill
68
-
69
- **Command**:
70
-
71
- ```bash
72
- claude-skills init \
73
- --name database-patterns \
74
- --description "Guide for SQLite operations..."
75
- ```
76
-
77
- **What This Creates**:
78
-
79
- ```
80
- .claude/skills/database-patterns/
81
- ├── SKILL.md # With frontmatter template
82
- ├── README.md # Human documentation
83
- ├── references/
84
- │ └── detailed-guide.md # Example reference
85
- ├── scripts/
86
- │ └── example.js # Example script
87
- └── assets/ # Empty directory
88
- ```
89
-
90
- **Next**: Customize or delete example files as needed
91
-
92
- ---
93
-
94
- ### Step 4: Editing the Skill
95
-
96
- **Focus**: Write content for another instance of Claude to use
97
- effectively.
98
-
99
- #### Start with Reusable Contents
100
-
101
- 1. **Add scripts** (if identified in Step 2)
102
-
103
- ```bash
104
- cd .claude/skills/database-patterns/scripts/
105
- # Create validation, generation, or analysis scripts
106
- ```
107
-
108
- 2. **Add references** (if identified in Step 2)
109
-
110
- ```bash
111
- cd references/
112
- # Create detailed documentation files
113
- ```
114
-
115
- 3. **Add assets** (if identified in Step 2)
116
-
117
- ```bash
118
- cd assets/
119
- # Copy templates, images, or other resources
120
- ```
121
-
122
- 4. **Delete unused directories**
123
- ```bash
124
- # If you don't need scripts:
125
- rm -rf scripts/
126
- ```
127
-
128
- #### Update SKILL.md
129
-
130
- **Writing Guidelines**:
131
-
132
- - ✅ Use imperative/infinitive form: "Use prepared statements"
133
- - ❌ Not second person: "You should use prepared statements"
134
- - ✅ Be specific: "Generate IDs with nanoid()"
135
- - ❌ Not vague: "Use appropriate IDs"
136
-
137
- **Structure to Include**:
138
-
139
- ```markdown
140
- ---
141
- name: skill-name
142
- description: [What it does + When to use it]
143
- ---
144
-
145
- # Skill Title
146
-
147
- ## Overview
148
-
149
- [2-3 sentences on purpose]
150
-
151
- ## Quick Start
152
-
153
- [Minimal example showing basic usage]
154
-
155
- ## Core Patterns
156
-
157
- ### Pattern 1
158
-
159
- [Common workflow with code example]
160
-
161
- ### Pattern 2
162
-
163
- [Another common workflow]
164
-
165
- ## Advanced Usage
166
-
167
- For detailed information:
168
-
169
- - [references/file1.md](references/file1.md)
170
- - [references/file2.md](references/file2.md)
171
-
172
- ## Scripts
173
-
174
- - `scripts/validate.js`: Description
175
- - `scripts/generate.js`: Description
176
-
177
- ## Notes
178
-
179
- - Important consideration 1
180
- - Important consideration 2
181
- ```
182
-
183
- **Questions to Answer**:
184
-
185
- 1. What is the purpose? (2-3 sentences)
186
- 2. When should this be used? (triggers/contexts)
187
- 3. How should Claude use this? (step-by-step)
188
- 4. What bundled resources exist? (references, scripts, assets)
189
-
190
- ---
191
-
192
- ### Step 5: Packaging the Skill
193
-
194
- **Validation First**:
195
-
196
- ```bash
197
- claude-skills validate .claude/skills/database-patterns
198
-
199
- # Output shows:
200
- # ✅ All required fields present
201
- # ✅ SKILL.md structure correct
202
- # ⚠️ Warning: Reference file not mentioned in SKILL.md
203
- ```
204
-
205
- **Fix Validation Issues**, then package:
206
-
207
- ```bash
208
- claude-skills package .claude/skills/database-patterns
209
-
210
- # Creates:
211
- # dist/database-patterns.zip
212
- ```
213
-
214
- **The package includes**:
215
-
216
- - All files from skill directory
217
- - Maintains directory structure
218
- - Excludes hidden files and temp files
219
- - Ready to upload to Claude.ai or share
220
-
221
- ---
222
-
223
- ### Step 6: Iterate
224
-
225
- **Test the Skill**:
226
-
227
- 1. Use skill in real conversations
228
- 2. Notice where it struggles or excels
229
- 3. Collect feedback from actual usage
230
- 4. Update SKILL.md or references based on observations
231
-
232
- **Iteration Workflow**:
233
-
234
- ```bash
235
- # Edit skill content
236
- vim .claude/skills/database-patterns/SKILL.md
237
-
238
- # Validate changes
239
- claude-skills validate .claude/skills/database-patterns
240
-
241
- # Test in conversation
242
- # (Skills auto-reload in Claude Code)
243
-
244
- # Package new version if needed
245
- claude-skills package .claude/skills/database-patterns
246
- ```
247
-
248
- **Common Iterations**:
249
-
250
- - Add more examples to SKILL.md
251
- - Move detailed content to references
252
- - Create new scripts for repeated tasks
253
- - Clarify confusing instructions
254
- - Add "when to use" guidance
255
-
256
- ---
257
-
258
- ## Development Best Practices
259
-
260
- ### Start Small
261
-
262
- Begin with minimal SKILL.md, add complexity only as needed:
263
-
264
- ```markdown
265
- # Version 1: Just core patterns
266
-
267
- # Version 2: Add references
268
-
269
- # Version 3: Add scripts
270
-
271
- # Version 4: Add assets
272
- ```
273
-
274
- ### Test Early and Often
275
-
276
- Don't wait until skill is "complete":
277
-
278
- - Test after basic SKILL.md is written
279
- - Iterate based on actual usage
280
- - Skills are never truly "done"
281
-
282
- ### Use Real Examples
283
-
284
- Pull examples from actual code, not invented scenarios:
285
-
286
- ```typescript
287
- // ✅ Good: From your actual codebase
288
- const stmt = db.prepare('SELECT * FROM contacts WHERE user_id = ?');
289
- const contacts = stmt.all(user_id) as Contact[];
290
-
291
- // ❌ Bad: Generic example
292
- const result = database.query('SELECT * FROM table');
293
- ```
294
-
295
- ### Keep SKILL.md Lean
296
-
297
- When it grows beyond 5k words, split content:
298
-
299
- - Core workflows → stay in SKILL.md
300
- - Detailed docs → move to references/
301
- - API reference → definitely references/
302
-
303
- ### Write for Claude, Not Humans
304
-
305
- Claude needs different information than developers:
306
-
307
- - ✅ Procedural: "To do X, follow these steps..."
308
- - ✅ Specific: "Use nanoid() to generate IDs"
309
- - ✅ Concrete: "Store timestamps as Date.now()"
310
- - ❌ Conceptual: "Think about data integrity..."
311
- - ❌ Opinion: "We prefer approach X over Y..."
312
-
313
- ### Document Your Intent
314
-
315
- Add comments explaining WHY, not just WHAT:
316
-
317
- ```markdown
318
- ## ID Generation
319
-
320
- Generate IDs with nanoid() to ensure uniqueness without database
321
- overhead.
322
-
323
- <!-- Not just: "Use nanoid()" -->
324
- ```
325
-
326
- ### Validate Before Sharing
327
-
328
- Always run validation:
329
-
330
- ```bash
331
- claude-skills validate .claude/skills/my-skill --strict
332
- ```
333
-
334
- Strict mode treats warnings as errors - use before packaging for
335
- distribution.
336
-
337
- ---
338
-
339
- ## Troubleshooting
340
-
341
- ### Skill Not Triggering
342
-
343
- **Problem**: Claude doesn't use the skill when expected
344
-
345
- **Solutions**:
346
-
347
- 1. Check description includes "when to use" keywords
348
- 2. Make description more specific
349
- 3. Test with explicit request: "Use the database-patterns skill to..."
350
- 4. Verify SKILL.md frontmatter is valid YAML
351
-
352
- ### Token Limit Exceeded
353
-
354
- **Problem**: Skill uses too many tokens
355
-
356
- **Solutions**:
357
-
358
- 1. Move detailed content from SKILL.md to references/
359
- 2. Use scripts for code instead of inline examples
360
- 3. Split large references into focused files
361
- 4. Link to references instead of duplicating content
362
-
363
- ### Skill Conflicts
364
-
365
- **Problem**: Multiple skills trying to handle same task
366
-
367
- **Solutions**:
368
-
369
- 1. Make descriptions more specific
370
- 2. Define clear boundaries between skills
371
- 3. Use skill composition intentionally
372
- 4. Add "when NOT to use" guidance
373
-
374
- ### Invalid Package
375
-
376
- **Problem**: Packaged skill doesn't work
377
-
378
- **Solutions**:
379
-
380
- 1. Run validator before packaging
381
- 2. Check YAML frontmatter syntax
382
- 3. Ensure required fields present
383
- 4. Test skill locally before packaging
384
-
385
- ---
386
-
387
- ## File Templates
388
-
389
- ### Minimal SKILL.md
390
-
391
- ```markdown
392
- ---
393
- name: my-skill
394
- description: Brief description including when to use this skill
395
- ---
396
-
397
- # My Skill
398
-
399
- ## Quick Start
400
-
401
- [Minimal working example]
402
-
403
- ## Core Pattern
404
-
405
- [Most common usage]
406
- ```
407
-
408
- ### Reference File
409
-
410
- ```markdown
411
- # Topic Reference
412
-
413
- ## Overview
414
-
415
- [Brief intro]
416
-
417
- ## Section 1
418
-
419
- [Detailed content]
420
-
421
- ## Section 2
422
-
423
- [More detail]
424
-
425
- ## Examples
426
-
427
- [Concrete examples]
428
- ```
429
-
430
- ### Script File
431
-
432
- ```javascript
433
- #!/usr/bin/env node
434
-
435
- /**
436
- * Description of what this script does.
437
- *
438
- * Usage:
439
- * node script_name.js [arguments]
440
- *
441
- * Example:
442
- * node validate.js --check-all
443
- */
444
-
445
- function main() {
446
- // Script logic here
447
- }
448
-
449
- main();
450
- ```
451
-
452
- ---
453
-
454
- ## Next Steps
455
-
456
- 1. Read [SKILLS-ARCHITECTURE.md](SKILLS-ARCHITECTURE.md) for system
457
- overview
458
- 2. See [SKILL-EXAMPLES.md](SKILL-EXAMPLES.md) for real examples
459
- 3. Create your first skill with `claude-skills init`
460
- 4. Join skill development workflow for devhub-crm