claude-skills-cli 0.0.5 → 0.0.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.
Files changed (45) hide show
  1. package/README.md +34 -9
  2. package/dist/commands/init.js +5 -3
  3. package/dist/commands/init.js.map +1 -1
  4. package/dist/commands/install.js +1 -1
  5. package/dist/commands/install.js.map +1 -1
  6. package/dist/commands/stats.js +1 -1
  7. package/dist/commands/stats.js.map +1 -1
  8. package/dist/commands/validate.js +24 -3
  9. package/dist/commands/validate.js.map +1 -1
  10. package/dist/commands/watch.js +82 -0
  11. package/dist/commands/watch.js.map +1 -0
  12. package/dist/core/validator.js +169 -321
  13. package/dist/core/validator.js.map +1 -1
  14. package/dist/index.js +23 -12
  15. package/dist/index.js.map +1 -1
  16. package/dist/skills/skill-creator/SKILL.md +26 -108
  17. package/dist/skills/skill-creator/references/cli-reference.md +35 -35
  18. package/dist/skills/skill-creator/references/development-process.md +208 -0
  19. package/dist/skills/skill-creator/references/skill-examples.md +1 -1
  20. package/dist/validators/alignment-validator.js +54 -0
  21. package/dist/validators/alignment-validator.js.map +1 -0
  22. package/dist/validators/content-validator.js +144 -0
  23. package/dist/validators/content-validator.js.map +1 -0
  24. package/dist/validators/description-validator.js +136 -0
  25. package/dist/validators/description-validator.js.map +1 -0
  26. package/dist/validators/file-structure-validator.js +125 -0
  27. package/dist/validators/file-structure-validator.js.map +1 -0
  28. package/dist/validators/frontmatter-validator.js +114 -0
  29. package/dist/validators/frontmatter-validator.js.map +1 -0
  30. package/dist/validators/references-validator.js +125 -0
  31. package/dist/validators/references-validator.js.map +1 -0
  32. package/dist/validators/text-analysis.js +71 -0
  33. package/dist/validators/text-analysis.js.map +1 -0
  34. package/docs/CLI-IMPROVEMENTS.md +960 -0
  35. package/docs/SKILL-CREATOR-UPDATES.md +1071 -0
  36. package/docs/SKILL-DEVELOPMENT.md +10 -10
  37. package/docs/SKILLS-ARCHITECTURE.md +1 -1
  38. package/docs/SKILLS-ECOSYSTEM-ANALYSIS.md +509 -0
  39. package/docs/SKILLS-OPPORTUNITIES.md +652 -0
  40. package/package.json +4 -4
  41. package/dist/skills/skill-creator/skill-creator/SKILL.md +0 -143
  42. package/dist/skills/skill-creator/skill-creator/references/anthropic-resources.md +0 -504
  43. package/dist/skills/skill-creator/skill-creator/references/cli-reference.md +0 -507
  44. package/dist/skills/skill-creator/skill-creator/references/skill-examples.md +0 -413
  45. package/dist/skills/skill-creator/skill-creator/references/writing-guide.md +0 -619
@@ -0,0 +1,1071 @@
1
+ # skill-creator Skill: Recommended Updates
2
+
3
+ Based on ecosystem analysis of 30+ community skills, here are
4
+ recommended improvements to the bundled skill-creator skill.
5
+
6
+ ## Executive Summary
7
+
8
+ **Current state**: The skill-creator is solid with good structure, but
9
+ missing emerging best practices.
10
+
11
+ **Key gaps**:
12
+
13
+ 1. No mention of behavioral testing/validation
14
+ 2. Hook integration patterns not covered
15
+ 3. Quality metrics and scoring missing
16
+ 4. Community patterns not represented
17
+ 5. Testing strategies underdocumented
18
+
19
+ ## Recommended Changes
20
+
21
+ ### Priority 0: Critical Additions
22
+
23
+ #### 1. Add Behavioral Testing Section to SKILL.md
24
+
25
+ **Insert after "Development Process" section (line 85)**:
26
+
27
+ ````markdown
28
+ ## Testing and Validation
29
+
30
+ Skills are process documentation. Validate effectiveness through:
31
+
32
+ **Static validation** - Structure and content:
33
+
34
+ ```bash
35
+ npx claude-skills-cli validate .claude/skills/my-skill
36
+ ```
37
+ ````
38
+
39
+ **Behavioral testing** - Does it guide Claude effectively?
40
+
41
+ - Test with subagents in controlled scenarios
42
+ - Observe skill triggering and adherence
43
+ - Iterate based on real usage patterns
44
+
45
+ **Hook-based validation** - Automated checks:
46
+
47
+ - PostToolUse hooks validate skills after edits
48
+ - PreToolUse hooks prevent issues before execution
49
+ - See [testing-methodology.md](references/testing-methodology.md)
50
+
51
+ Key principle: If a subagent can't follow your skill under pressure,
52
+ it's ineffective.
53
+
54
+ ````
55
+
56
+ **Rationale**: Behavioral testing is the biggest innovation from community (obra/superpowers), but not mentioned in current skill-creator.
57
+
58
+ #### 2. Create New Reference: `references/testing-methodology.md`
59
+
60
+ ```markdown
61
+ # Skill Testing Methodology
62
+
63
+ ## Overview
64
+
65
+ Effective skills require validation beyond syntax checking. This guide covers testing approaches for skill effectiveness.
66
+
67
+ ## Testing Levels
68
+
69
+ ### Level 1: Static Validation
70
+
71
+ Validates structure, syntax, and progressive disclosure compliance.
72
+
73
+ **Tools**:
74
+ - `claude-skills-cli validate` - Built-in validation
75
+ - Pre-commit hooks for automated checks
76
+ - CI/CD integration for team consistency
77
+
78
+ **Checks**:
79
+ - YAML frontmatter syntax
80
+ - Description quality (length, keywords, triggers)
81
+ - Progressive disclosure compliance (line counts, word counts)
82
+ - Link integrity (no broken references)
83
+ - Script executability
84
+
85
+ **Example**:
86
+ ```bash
87
+ # Validate before commit
88
+ npx claude-skills-cli validate .claude/skills/my-skill --strict
89
+
90
+ # CI integration
91
+ pnpm test:skills # runs validation on all skills
92
+ ````
93
+
94
+ ### Level 2: Behavioral Testing
95
+
96
+ Validates that skills effectively guide Claude's behavior.
97
+
98
+ **Approach**: Test-Driven Development for skills
99
+
100
+ 1. Write test scenarios (pressure cases)
101
+ 2. Launch subagent without skill (baseline)
102
+ 3. Observe failure modes
103
+ 4. Write/refine skill
104
+ 5. Re-test with subagent
105
+ 6. Pass = skill effectively guides behavior
106
+
107
+ **Test Scenario Structure**:
108
+
109
+ ```json
110
+ {
111
+ "scenario": "Implement login feature",
112
+ "context": {
113
+ "framework": "React",
114
+ "auth_library": "none yet"
115
+ },
116
+ "expected_behavior": [
117
+ "Creates LoginForm component",
118
+ "Adds authentication logic",
119
+ "Includes form validation",
120
+ "Writes tests for component"
121
+ ],
122
+ "pressure_factors": [
123
+ "Unclear auth requirements",
124
+ "Time constraint",
125
+ "Multiple valid approaches"
126
+ ],
127
+ "success_criteria": "Completes task following skill patterns"
128
+ }
129
+ ```
130
+
131
+ **Implementation**:
132
+
133
+ ```bash
134
+ # Future CLI command (v0.2.0+)
135
+ claude-skills-cli test .claude/skills/my-skill --scenarios test-cases.json
136
+ ```
137
+
138
+ **Manual testing**:
139
+
140
+ - Use Task tool to launch subagents
141
+ - Provide scenario as prompt
142
+ - Observe if skill triggers and guides behavior
143
+ - Document failures and refine skill
144
+
145
+ ### Level 3: Usage-Based Validation
146
+
147
+ Validates skills through real-world usage and metrics.
148
+
149
+ **Metrics to track**:
150
+
151
+ - Trigger frequency (is skill being invoked?)
152
+ - Token usage (is it efficient?)
153
+ - User corrections (are instructions unclear?)
154
+ - Success rate (does it complete tasks correctly?)
155
+
156
+ **Hook-based tracking**:
157
+
158
+ ```json
159
+ {
160
+ "PostToolUse": {
161
+ "*": "python .claude/hooks/track-usage.py"
162
+ }
163
+ }
164
+ ```
165
+
166
+ **track-usage.py example**:
167
+
168
+ ```python
169
+ #!/usr/bin/env python3
170
+ import json
171
+ import time
172
+ from pathlib import Path
173
+
174
+ log_file = Path.home() / '.claude' / 'skill-usage.jsonl'
175
+
176
+ entry = {
177
+ 'timestamp': time.time(),
178
+ 'tool': os.environ.get('CLAUDE_TOOL'),
179
+ 'file_paths': os.environ.get('CLAUDE_FILE_PATHS', '').split(',')
180
+ }
181
+
182
+ with open(log_file, 'a') as f:
183
+ f.write(json.dumps(entry) + '\n')
184
+ ```
185
+
186
+ ## Testing Anti-patterns
187
+
188
+ ### ❌ Testing Only Syntax
189
+
190
+ **Problem**: Passes validation but doesn't guide Claude effectively
191
+
192
+ **Example**: Description is well-formed but lacks trigger keywords
193
+
194
+ ### ❌ No Pressure Testing
195
+
196
+ **Problem**: Works in ideal scenarios, fails under constraints
197
+
198
+ **Example**: Skill works with clear requirements, but crumbles with
199
+ ambiguity
200
+
201
+ ### ❌ One-Time Testing
202
+
203
+ **Problem**: Skills drift from reality as codebase evolves
204
+
205
+ **Example**: Skill written once, never updated as patterns change
206
+
207
+ ## Testing Best Practices
208
+
209
+ ### ✅ Test Early and Often
210
+
211
+ - Validate after each significant edit
212
+ - Test with real use cases immediately
213
+ - Iterate based on observed behavior
214
+
215
+ ### ✅ Use Pressure Scenarios
216
+
217
+ - Time constraints
218
+ - Unclear requirements
219
+ - Multiple valid approaches
220
+ - Edge cases and error conditions
221
+
222
+ ### ✅ Document Test Cases
223
+
224
+ - Keep test scenarios in version control
225
+ - Update scenarios as patterns evolve
226
+ - Share scenarios with team
227
+
228
+ ### ✅ Automate Where Possible
229
+
230
+ - Static validation in pre-commit hooks
231
+ - Behavioral tests in CI (when tooling available)
232
+ - Usage tracking via PostToolUse hooks
233
+
234
+ ## Testing Workflow
235
+
236
+ ```
237
+ 1. Write/update skill
238
+
239
+ 2. Static validation (claude-skills-cli validate)
240
+
241
+ 3. Behavioral testing (subagent scenarios)
242
+
243
+ 4. Real-world usage (actual tasks)
244
+
245
+ 5. Collect metrics (usage tracking)
246
+
247
+ 6. Iterate based on feedback
248
+
249
+ 7. Repeat
250
+ ```
251
+
252
+ ## Resources
253
+
254
+ - [obra/superpowers testing-skills-with-subagents](https://github.com/obra/superpowers/tree/main/skills/testing-skills-with-subagents) -
255
+ Pioneering behavioral testing approach
256
+ - [anthropics/skills validation scripts](https://github.com/anthropics/skills/tree/main/skill-creator/scripts) -
257
+ Static validation tools
258
+ - claude-skills-cli `test` command documentation (v0.2.0+)
259
+
260
+ ````
261
+
262
+ #### 3. Create New Reference: `references/hook-integration.md`
263
+
264
+ ```markdown
265
+ # Hook Integration Patterns
266
+
267
+ ## Overview
268
+
269
+ Hooks enable automation in skill development and usage. This guide covers common patterns.
270
+
271
+ ## Hook Types
272
+
273
+ ### PreToolUse Hooks
274
+ Execute **before** Claude uses a tool.
275
+
276
+ **Use cases**:
277
+ - Safety checks (prevent destructive operations)
278
+ - Input validation
279
+ - Permission verification
280
+ - Context preparation
281
+
282
+ **Example - Prevent destructive git operations**:
283
+ ```json
284
+ {
285
+ "PreToolUse": {
286
+ "Bash": "bash .claude/hooks/safety-check.sh"
287
+ }
288
+ }
289
+ ````
290
+
291
+ ```bash
292
+ #!/bin/bash
293
+ # safety-check.sh
294
+ set -euo pipefail
295
+
296
+ COMMAND="$CLAUDE_COMMAND"
297
+
298
+ # Block force push to main
299
+ if [[ "$COMMAND" =~ "git push".*"--force".*"main" ]]; then
300
+ echo "❌ Force push to main is not allowed"
301
+ exit 1
302
+ fi
303
+
304
+ exit 0 # Allow other operations
305
+ ```
306
+
307
+ ### PostToolUse Hooks
308
+
309
+ Execute **after** Claude uses a tool.
310
+
311
+ **Use cases**:
312
+
313
+ - Validation after edits
314
+ - Automatic testing
315
+ - Documentation updates
316
+ - Usage tracking
317
+
318
+ **Example - Validate skills after editing**:
319
+
320
+ ```json
321
+ {
322
+ "PostToolUse": {
323
+ "Edit": "bash .claude/hooks/post-edit-skill-validation.sh"
324
+ }
325
+ }
326
+ ```
327
+
328
+ ```bash
329
+ #!/bin/bash
330
+ # post-edit-skill-validation.sh
331
+ set -euo pipefail
332
+
333
+ FILE_PATH="$CLAUDE_FILE_PATH"
334
+
335
+ # Only validate if editing SKILL.md
336
+ if [[ "$FILE_PATH" =~ SKILL\.md$ ]]; then
337
+ SKILL_DIR=$(dirname "$FILE_PATH")
338
+
339
+ echo "Validating skill at $SKILL_DIR..."
340
+
341
+ if npx claude-skills-cli validate "$SKILL_DIR" --quiet; then
342
+ echo "✅ Skill validation passed"
343
+ exit 0
344
+ else
345
+ echo "❌ Skill validation failed - please fix errors"
346
+ exit 1
347
+ fi
348
+ fi
349
+
350
+ exit 0
351
+ ```
352
+
353
+ ## Common Hook Patterns
354
+
355
+ ### Pattern: Pre-commit Validation
356
+
357
+ ```json
358
+ {
359
+ "PreToolUse": {
360
+ "Bash": "bash .claude/hooks/pre-commit-checks.sh"
361
+ }
362
+ }
363
+ ```
364
+
365
+ ```bash
366
+ #!/bin/bash
367
+ set -euo pipefail
368
+
369
+ COMMAND="$CLAUDE_COMMAND"
370
+
371
+ # Only run on git commit
372
+ if [[ "$COMMAND" =~ ^git\ commit ]]; then
373
+ # Run linter
374
+ if ! npm run lint:check; then
375
+ echo "❌ Linting failed - fix errors before committing"
376
+ exit 1
377
+ fi
378
+
379
+ # Run tests
380
+ if ! npm test; then
381
+ echo "❌ Tests failed - fix failures before committing"
382
+ exit 1
383
+ fi
384
+
385
+ echo "✅ Pre-commit checks passed"
386
+ fi
387
+
388
+ exit 0
389
+ ```
390
+
391
+ ### Pattern: Resource Usage Tracking
392
+
393
+ ```json
394
+ {
395
+ "PostToolUse": {
396
+ "*": "python .claude/hooks/track-usage.py"
397
+ }
398
+ }
399
+ ```
400
+
401
+ ```python
402
+ #!/usr/bin/env python3
403
+ import json
404
+ import os
405
+ import time
406
+ from pathlib import Path
407
+
408
+ log_file = Path.home() / '.claude' / 'usage.jsonl'
409
+
410
+ entry = {
411
+ 'timestamp': time.time(),
412
+ 'tool': os.environ.get('CLAUDE_TOOL', 'unknown'),
413
+ 'file_paths': os.environ.get('CLAUDE_FILE_PATHS', '').split(',')
414
+ }
415
+
416
+ with open(log_file, 'a') as f:
417
+ f.write(json.dumps(entry) + '\\n')
418
+ ```
419
+
420
+ ### Pattern: Auto-documentation
421
+
422
+ ```json
423
+ {
424
+ "PostToolUse": {
425
+ "Write": "bash .claude/hooks/update-docs.sh"
426
+ }
427
+ }
428
+ ```
429
+
430
+ ```bash
431
+ #!/bin/bash
432
+ set -euo pipefail
433
+
434
+ FILE_PATH="$CLAUDE_FILE_PATH"
435
+
436
+ # Update docs if source files changed
437
+ if [[ "$FILE_PATH" =~ ^src/ ]]; then
438
+ npm run docs:generate
439
+ echo "✅ Documentation updated"
440
+ fi
441
+
442
+ exit 0
443
+ ```
444
+
445
+ ## Hook Best Practices
446
+
447
+ ### ✅ Keep Hooks Fast
448
+
449
+ - Target <1 second execution
450
+ - Avoid network calls in hooks
451
+ - Use caching when possible
452
+
453
+ ### ✅ Provide Clear Feedback
454
+
455
+ ```bash
456
+ # Good: Clear, actionable feedback
457
+ echo "❌ Linting failed: Found 3 errors in src/index.ts"
458
+ echo " Run 'npm run lint:fix' to auto-fix"
459
+
460
+ # Bad: Unclear what went wrong
461
+ echo "Error"
462
+ ```
463
+
464
+ ### ✅ Use Appropriate Exit Codes
465
+
466
+ ```bash
467
+ # Exit 0: Success or non-blocking warning
468
+ # Exit 1: Error that should block operation
469
+
470
+ if [[ $warnings -gt 0 ]]; then
471
+ echo "⚠️ Found $warnings warnings (non-blocking)"
472
+ exit 0 # Don't block
473
+ fi
474
+
475
+ if [[ $errors -gt 0 ]]; then
476
+ echo "❌ Found $errors errors (blocking)"
477
+ exit 1 # Block
478
+ fi
479
+ ```
480
+
481
+ ### ✅ Document Hook Requirements
482
+
483
+ In SKILL.md or README.md:
484
+
485
+ ````markdown
486
+ ## Hook Setup (Optional)
487
+
488
+ This skill works best with PostToolUse hooks for validation:
489
+
490
+ 1. Add to .claude/settings.json:
491
+ ```json
492
+ {
493
+ "PostToolUse": {
494
+ "Edit": "bash .claude/skills/my-skill/hooks/post-edit.sh"
495
+ }
496
+ }
497
+ ```
498
+ ````
499
+
500
+ 2. Hook validates changes automatically after edits
501
+
502
+ ````
503
+
504
+ ## Hook Anti-patterns
505
+
506
+ ### ❌ Blocking on Warnings
507
+ ```bash
508
+ # Don't do this - blocks workflow unnecessarily
509
+ if [[ $warnings -gt 0 ]]; then
510
+ exit 1 # Too strict
511
+ fi
512
+ ````
513
+
514
+ ### ❌ Silent Failures
515
+
516
+ ```bash
517
+ # Don't do this - fails silently
518
+ python script.py # If this fails, no one knows
519
+ exit 0
520
+ ```
521
+
522
+ ### ❌ Slow Operations
523
+
524
+ ```bash
525
+ # Don't do this - blocks for 30+ seconds
526
+ npm install # Too slow for a hook
527
+ docker build . # Way too slow
528
+ ```
529
+
530
+ ### ❌ Requiring User Input
531
+
532
+ ```bash
533
+ # Don't do this - hooks should be non-interactive
534
+ read -p "Proceed? (y/n) " answer
535
+ ```
536
+
537
+ ## Hook Management with CLI
538
+
539
+ Future CLI commands (v0.3.0+):
540
+
541
+ ```bash
542
+ # List available hook templates
543
+ claude-skills-cli hook list-templates
544
+
545
+ # Add hook from template
546
+ claude-skills-cli hook add --template pre-commit-validation
547
+
548
+ # Add custom hook
549
+ claude-skills-cli hook add --tool Edit --script ./my-hook.sh
550
+
551
+ # List installed hooks
552
+ claude-skills-cli hook list
553
+
554
+ # Remove hook
555
+ claude-skills-cli hook remove --tool Edit
556
+
557
+ # Test hook
558
+ claude-skills-cli hook test pre-commit-validation
559
+ ```
560
+
561
+ ## Resources
562
+
563
+ - [Claude Code Settings documentation](https://docs.claude.com/en/docs/claude-code/settings)
564
+ - Community hook examples (GitHub search: `.claude/settings.json`)
565
+ - claude-skills-cli hook command (v0.3.0+)
566
+
567
+ ````
568
+
569
+ #### 4. Update SKILL.md: Add Hook Integration Mention
570
+
571
+ **Insert after "Implementation" section (line 113)**:
572
+
573
+ ```markdown
574
+ ## Hook Integration (Optional)
575
+
576
+ Automate skill validation and workflows with settings.json hooks:
577
+
578
+ **PostToolUse hooks** - Validate after edits:
579
+ ```json
580
+ {
581
+ "PostToolUse": {
582
+ "Edit": "claude-skills-cli validate $CLAUDE_FILE_PATH"
583
+ }
584
+ }
585
+ ````
586
+
587
+ **PreToolUse hooks** - Safety checks before operations:
588
+
589
+ ```json
590
+ {
591
+ "PreToolUse": {
592
+ "Bash": "bash .claude/hooks/safety-check.sh"
593
+ }
594
+ }
595
+ ```
596
+
597
+ For detailed patterns:
598
+ [hook-integration.md](references/hook-integration.md)
599
+
600
+ ````
601
+
602
+ ### Priority 1: Important Additions
603
+
604
+ #### 5. Create New Reference: `references/quality-metrics.md`
605
+
606
+ ```markdown
607
+ # Skill Quality Metrics
608
+
609
+ ## Overview
610
+
611
+ Measuring skill quality helps identify improvement opportunities and track progress over time.
612
+
613
+ ## Quality Dimensions
614
+
615
+ ### 1. Structure Quality (0-1.0)
616
+ **Measures**: Adherence to progressive disclosure and organizational best practices
617
+
618
+ **Factors**:
619
+ - Valid YAML frontmatter (0.2)
620
+ - Proper sections (Quick Start, Core Patterns, References) (0.3)
621
+ - Appropriate use of code blocks (1-2 optimal) (0.2)
622
+ - Clear heading hierarchy (0.2)
623
+ - Link integrity (no broken links) (0.1)
624
+
625
+ **Target**: >0.9
626
+
627
+ ### 2. Clarity Quality (0-1.0)
628
+ **Measures**: How clearly the skill communicates instructions
629
+
630
+ **Factors**:
631
+ - Description length (50-200 chars optimal) (0.2)
632
+ - Trigger keywords present ("Use when...") (0.2)
633
+ - Concrete examples (not abstract) (0.2)
634
+ - Imperative voice (not second person) (0.2)
635
+ - No vague language ("might", "should", "try") (0.2)
636
+
637
+ **Target**: >0.8
638
+
639
+ ### 3. Completeness Quality (0-1.0)
640
+ **Measures**: Extent of documentation and resources
641
+
642
+ **Factors**:
643
+ - Has Quick Start example (0.2)
644
+ - Has 3-5 core patterns (0.3)
645
+ - Has references/ directory with content (0.2)
646
+ - Scripts are documented (0.2)
647
+ - Examples are real, not invented (0.1)
648
+
649
+ **Target**: >0.7
650
+
651
+ ### 4. Maintainability Quality (0-1.0)
652
+ **Measures**: Ease of maintaining and updating skill
653
+
654
+ **Factors**:
655
+ - Last updated within 30 days (0.3)
656
+ - No TODO placeholders (0.2)
657
+ - Version tracked (CHANGELOG or git) (0.2)
658
+ - Scripts have documentation (0.2)
659
+ - Follows naming conventions (0.1)
660
+
661
+ **Target**: >0.7
662
+
663
+ ### 5. Effectiveness Quality (0-1.0)
664
+ **Measures**: How well skill achieves its purpose
665
+
666
+ **Factors**:
667
+ - Has test scenarios (0.3)
668
+ - Test pass rate (0.3)
669
+ - Usage metrics available (0.2)
670
+ - User feedback positive (0.2)
671
+
672
+ **Target**: >0.6
673
+
674
+ ## Overall Quality Score
675
+
676
+ ````
677
+
678
+ Overall = (Structure × 0.25) + (Clarity × 0.25) + (Completeness ×
679
+ 0.2) + (Maintainability × 0.15) + (Effectiveness × 0.15)
680
+
681
+ ````
682
+
683
+ **Ratings**:
684
+ - 0.9-1.0: Excellent
685
+ - 0.7-0.9: Good
686
+ - 0.5-0.7: Fair
687
+ - <0.5: Needs improvement
688
+
689
+ ## Measuring Quality
690
+
691
+ ### Using claude-skills-cli
692
+
693
+ ```bash
694
+ # Get quality score (v0.2.0+)
695
+ claude-skills-cli validate .claude/skills/my-skill --score
696
+
697
+ # Output:
698
+ # Quality Score: 0.82 / 1.00 (Good)
699
+ #
700
+ # Dimensions:
701
+ # Structure: 0.95 ✅ Excellent
702
+ # Clarity: 0.78 ⚠️ Could improve
703
+ # Completeness: 0.72 ⚠️ Could improve
704
+ # Maintainability: 0.88 ✅ Excellent
705
+ # Effectiveness: 0.65 ⚠️ Could improve
706
+ #
707
+ # Recommendations:
708
+ # - Add trigger keywords to description ("Use when...")
709
+ # - Create test scenarios for behavioral validation
710
+ # - Add 2-3 more reference documents for completeness
711
+ ````
712
+
713
+ ### Tracking Over Time
714
+
715
+ ```bash
716
+ # Generate quality report for all skills
717
+ claude-skills-cli stats .claude/skills --detailed
718
+
719
+ # Track trends (v0.3.0+)
720
+ claude-skills-cli stats .claude/skills --history
721
+
722
+ # Export for analysis
723
+ claude-skills-cli stats .claude/skills --json > stats.json
724
+ ```
725
+
726
+ ## Quality Improvement Workflow
727
+
728
+ ```
729
+ 1. Measure baseline
730
+ → claude-skills-cli validate --score
731
+
732
+ 2. Identify lowest dimension
733
+ → Focus on weakest area first
734
+
735
+ 3. Apply improvements
736
+ → Use specific recommendations
737
+
738
+ 4. Re-measure
739
+ → Verify improvements
740
+
741
+ 5. Track over time
742
+ → Ensure sustained quality
743
+
744
+ 6. Repeat
745
+ → Continuous improvement
746
+ ```
747
+
748
+ ## Benchmarking
749
+
750
+ ### Against Official Skills
751
+
752
+ Compare your skills against Anthropic's official skills:
753
+
754
+ ```bash
755
+ # Compare (v0.2.0+)
756
+ claude-skills-cli validate .claude/skills/my-skill --benchmark
757
+
758
+ # Output:
759
+ # Your skill: 0.78
760
+ # Benchmark (anthropics/skills avg): 0.87
761
+ # Gap: -0.09 (10% below benchmark)
762
+ #
763
+ # Areas to improve:
764
+ # - Add behavioral tests (benchmark avg: 0.82, yours: 0.60)
765
+ # - Improve description keywords (benchmark avg: 0.91, yours: 0.75)
766
+ ```
767
+
768
+ ### Against Community
769
+
770
+ Compare against high-quality community skills:
771
+
772
+ - obra/superpowers: 0.91 avg
773
+ - anthropics/skills: 0.87 avg
774
+ - spences10/claude-skills-cli: 0.85 avg
775
+
776
+ ## Quality Anti-patterns
777
+
778
+ ### ❌ Optimizing Wrong Dimension
779
+
780
+ Focusing on structure (which is already 0.95) instead of effectiveness
781
+ (which is 0.50)
782
+
783
+ ### ❌ No Baseline Measurement
784
+
785
+ Making changes without knowing starting quality or impact
786
+
787
+ ### ❌ Gaming Metrics
788
+
789
+ Meeting letter of metrics (e.g., 50 lines) but missing spirit (unclear
790
+ instructions)
791
+
792
+ ### ❌ One-Time Measurement
793
+
794
+ Measuring quality once at creation, never tracking degradation
795
+
796
+ ## Resources
797
+
798
+ - SKILLS-ECOSYSTEM-ANALYSIS.md - Quality benchmarks from analysis
799
+ - claude-skills-cli validation output - Automatic scoring
800
+ - Community skill quality reports - Public benchmarks
801
+
802
+ ````
803
+
804
+ #### 6. Update `references/cli-reference.md`: Add Future Commands
805
+
806
+ **Append to end of file**:
807
+
808
+ ```markdown
809
+ ---
810
+
811
+ ## Future Commands (Roadmap)
812
+
813
+ The following commands are planned for future releases:
814
+
815
+ ### `test` Command (v0.2.0)
816
+ ```bash
817
+ claude-skills-cli test .claude/skills/my-skill [--scenarios tests.json]
818
+ ````
819
+
820
+ Behavioral validation using subagent testing. Validates that skills
821
+ effectively guide Claude's behavior.
822
+
823
+ ### `search` and `install` Commands (v0.2.0)
824
+
825
+ ```bash
826
+ claude-skills-cli search testing
827
+ claude-skills-cli install test-runner [--global]
828
+ ```
829
+
830
+ Discover and install community skills from registry.
831
+
832
+ ### `hook` Command (v0.3.0)
833
+
834
+ ```bash
835
+ claude-skills-cli hook add --template pre-commit-validation
836
+ claude-skills-cli hook list
837
+ ```
838
+
839
+ Manage hooks for automated validation and workflows.
840
+
841
+ ### Enhanced `validate` with Quality Scoring (v0.2.0)
842
+
843
+ ```bash
844
+ claude-skills-cli validate .claude/skills/my-skill --score --benchmark
845
+ ```
846
+
847
+ Quality metrics and benchmarking against community standards.
848
+
849
+ See [CLI-IMPROVEMENTS.md](../../../docs/CLI-IMPROVEMENTS.md) for
850
+ detailed roadmap.
851
+
852
+ ````
853
+
854
+ ### Priority 2: Content Improvements
855
+
856
+ #### 7. Update `skill-examples.md`: Add Community Examples
857
+
858
+ **Add section before "Resources" at end**:
859
+
860
+ ```markdown
861
+ ---
862
+
863
+ ## Community Skill Patterns
864
+
865
+ Effective patterns from high-quality community skills:
866
+
867
+ ### Pattern: Subagent Testing (obra/superpowers)
868
+
869
+ ```markdown
870
+ ---
871
+ name: writing-skills
872
+ description: Test-Driven Development for process documentation. Use when creating skills that need validation.
873
+ ---
874
+
875
+ # Writing Skills
876
+
877
+ **Writing skills IS Test-Driven Development applied to process documentation.**
878
+
879
+ 1. Write test cases (pressure scenarios)
880
+ 2. Launch subagent with baseline
881
+ 3. Observe failure modes
882
+ 4. Write/refine skill
883
+ 5. Re-test with subagent
884
+ 6. Pass = skill effectively guides behavior
885
+
886
+ See [references/testing-approach.md](references/testing-approach.md)
887
+ ````
888
+
889
+ **Why it works**: Validates effectiveness, not just syntax.
890
+
891
+ ### Pattern: Hook-Based Validation (masharratt/claude-flow-novice)
892
+
893
+ Automatic validation after skill edits:
894
+
895
+ ```json
896
+ {
897
+ "PostToolUse": {
898
+ "Edit": "bash .claude/skills/hook-pipeline/post-edit-handler.sh"
899
+ }
900
+ }
901
+ ```
902
+
903
+ **Why it works**: Catches errors immediately, enforces quality.
904
+
905
+ ### Pattern: Script-Heavy Skills (sorryhyun/DiPeO)
906
+
907
+ Multiple utility scripts for common operations:
908
+
909
+ ```
910
+ doc-lookup/
911
+ ├── SKILL.md
912
+ └── scripts/
913
+ ├── section_search.py
914
+ ├── validate_doc_anchors.py
915
+ └── generate_index.py
916
+ ```
917
+
918
+ **Why it works**: Deterministic operations don't need generation,
919
+ saves tokens.
920
+
921
+ ### Pattern: Framework Integration (modu-ai/moai-adk)
922
+
923
+ Deep framework knowledge:
924
+
925
+ ````markdown
926
+ ---
927
+ name: google-adk
928
+ description:
929
+ Google ADK Python SDK patterns for agent development. Use when
930
+ working with ADK agents, tools, or prompt engineering.
931
+ ---
932
+
933
+ # Google ADK Integration
934
+
935
+ ## Quick Start
936
+
937
+ ```python
938
+ from google import genai
939
+ from google.genai import types
940
+
941
+ client = genai.Client(api_key=os.environ['GOOGLE_API_KEY'])
942
+ ```
943
+ ````
944
+
945
+ See [references/adk-patterns.md](references/adk-patterns.md) for
946
+ complete SDK reference.
947
+
948
+ ```
949
+
950
+ **Why it works**: Framework-specific, immediately useful, concrete examples.
951
+ ```
952
+
953
+ #### 8. Update SKILL.md: Improve "When to Create a Skill" Section
954
+
955
+ **Replace lines 22-33 with**:
956
+
957
+ ```markdown
958
+ ## When to Create a Skill
959
+
960
+ Create a skill when you notice:
961
+
962
+ - **Repeating context** across conversations (same schema, patterns,
963
+ rules)
964
+ - **Domain expertise** needed repeatedly (API integration, framework
965
+ conventions)
966
+ - **Project-specific knowledge** that Claude should know automatically
967
+ - **Code quality** patterns you enforce manually
968
+ - **Testing workflows** that follow specific steps
969
+ - **Documentation** generation with consistent format
970
+
971
+ **Examples**:
972
+
973
+ - "I keep explaining this database schema" → Create database-schema
974
+ skill
975
+ - "I always check these security patterns" → Create security-review
976
+ skill
977
+ - "I follow these test steps each time" → Create test-workflow skill
978
+ - "I generate docs in this format" → Create doc-generator skill
979
+
980
+ **Don't create a skill for**:
981
+
982
+ - One-time tasks
983
+ - Knowledge Claude already has (e.g., "JavaScript syntax")
984
+ - Tasks that change frequently (use CLAUDE.md instead)
985
+ ```
986
+
987
+ ## Implementation Priority
988
+
989
+ ### Ship Immediately (No CLI changes required)
990
+
991
+ 1. ✅ Add Behavioral Testing section to SKILL.md
992
+ 2. ✅ Create testing-methodology.md reference
993
+ 3. ✅ Create hook-integration.md reference
994
+ 4. ✅ Add hook integration mention to SKILL.md
995
+ 5. ✅ Update skill-examples.md with community patterns
996
+ 6. ✅ Improve "When to Create a Skill" section
997
+
998
+ **Effort**: 2-3 hours writing **Impact**: High - Fills knowledge gaps
999
+ immediately
1000
+
1001
+ ### Ship with v0.2.0 (Requires CLI features)
1002
+
1003
+ 7. ⏳ Create quality-metrics.md (after quality scoring implemented)
1004
+ 8. ⏳ Update cli-reference.md with future commands (after design
1005
+ finalized)
1006
+
1007
+ **Effort**: 1 hour writing (after CLI features done) **Impact**:
1008
+ Medium - Complements new CLI features
1009
+
1010
+ ## Content Quality Improvements
1011
+
1012
+ ### Existing Content to Enhance
1013
+
1014
+ #### `writing-guide.md`
1015
+
1016
+ **Current**: 620 lines, comprehensive **Improvement**: Already
1017
+ excellent, no changes needed
1018
+
1019
+ #### `anthropic-resources.md`
1020
+
1021
+ **Status**: Not reviewed, assumed to be links to official docs
1022
+ **Recommendation**: Verify links are current, add any new docs
1023
+
1024
+ #### `skill-examples.md`
1025
+
1026
+ **Current**: Good examples, but all from single codebase
1027
+ **Improvement**: ✅ Add community examples (see #7 above)
1028
+
1029
+ #### `cli-reference.md`
1030
+
1031
+ **Current**: Complete for current commands **Improvement**: ✅ Add
1032
+ roadmap section (see #6 above)
1033
+
1034
+ ## Validation
1035
+
1036
+ After implementing changes, validate with:
1037
+
1038
+ ```bash
1039
+ # Validate structure
1040
+ npx claude-skills-cli validate .claude/skills/skill-creator
1041
+
1042
+ # Check metrics
1043
+ npx claude-skills-cli stats .claude/skills/skill-creator
1044
+
1045
+ # Test in real conversation
1046
+ # Ask Claude Code: "Help me create a new skill for API testing"
1047
+ # Observe if new content (testing, hooks) is used
1048
+ ```
1049
+
1050
+ ## Success Criteria
1051
+
1052
+ Changes are successful if:
1053
+
1054
+ 1. ✅ Validation passes
1055
+ 2. ✅ New references are linked from SKILL.md
1056
+ 3. ✅ Word count stays reasonable (<6k words total)
1057
+ 4. ✅ Claude mentions behavioral testing when creating skills
1058
+ 5. ✅ Claude suggests hook integration appropriately
1059
+ 6. ✅ Community patterns appear in skill-examples.md
1060
+
1061
+ ## Conclusion
1062
+
1063
+ The skill-creator skill is already strong. These updates:
1064
+
1065
+ - **Fill knowledge gaps**: Testing and hooks weren't covered
1066
+ - **Incorporate community wisdom**: Best practices from 30+ skills
1067
+ - **Future-proof**: References new CLI features in development
1068
+ - **Maintain quality**: Additions follow progressive disclosure
1069
+
1070
+ **Recommended action**: Implement Priority 0 items immediately (2-3
1071
+ hours), defer Priority 1 until v0.2.0 CLI features ship.