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.
- package/README.md +34 -9
- package/dist/commands/init.js +5 -3
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/install.js +1 -1
- package/dist/commands/install.js.map +1 -1
- package/dist/commands/stats.js +1 -1
- package/dist/commands/stats.js.map +1 -1
- package/dist/commands/validate.js +24 -3
- package/dist/commands/validate.js.map +1 -1
- package/dist/commands/watch.js +82 -0
- package/dist/commands/watch.js.map +1 -0
- package/dist/core/validator.js +169 -321
- package/dist/core/validator.js.map +1 -1
- package/dist/index.js +23 -12
- package/dist/index.js.map +1 -1
- package/dist/skills/skill-creator/SKILL.md +26 -108
- package/dist/skills/skill-creator/references/cli-reference.md +35 -35
- package/dist/skills/skill-creator/references/development-process.md +208 -0
- package/dist/skills/skill-creator/references/skill-examples.md +1 -1
- package/dist/validators/alignment-validator.js +54 -0
- package/dist/validators/alignment-validator.js.map +1 -0
- package/dist/validators/content-validator.js +144 -0
- package/dist/validators/content-validator.js.map +1 -0
- package/dist/validators/description-validator.js +136 -0
- package/dist/validators/description-validator.js.map +1 -0
- package/dist/validators/file-structure-validator.js +125 -0
- package/dist/validators/file-structure-validator.js.map +1 -0
- package/dist/validators/frontmatter-validator.js +114 -0
- package/dist/validators/frontmatter-validator.js.map +1 -0
- package/dist/validators/references-validator.js +125 -0
- package/dist/validators/references-validator.js.map +1 -0
- package/dist/validators/text-analysis.js +71 -0
- package/dist/validators/text-analysis.js.map +1 -0
- package/docs/CLI-IMPROVEMENTS.md +960 -0
- package/docs/SKILL-CREATOR-UPDATES.md +1071 -0
- package/docs/SKILL-DEVELOPMENT.md +10 -10
- package/docs/SKILLS-ARCHITECTURE.md +1 -1
- package/docs/SKILLS-ECOSYSTEM-ANALYSIS.md +509 -0
- package/docs/SKILLS-OPPORTUNITIES.md +652 -0
- package/package.json +4 -4
- package/dist/skills/skill-creator/skill-creator/SKILL.md +0 -143
- package/dist/skills/skill-creator/skill-creator/references/anthropic-resources.md +0 -504
- package/dist/skills/skill-creator/skill-creator/references/cli-reference.md +0 -507
- package/dist/skills/skill-creator/skill-creator/references/skill-examples.md +0 -413
- package/dist/skills/skill-creator/skill-creator/references/writing-guide.md +0 -619
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
6
|
# Create a new skill
|
|
7
|
-
claude-skills init --name my-skill --description "What it does"
|
|
7
|
+
claude-skills-cli init --name my-skill --description "What it does"
|
|
8
8
|
|
|
9
9
|
# Validate the skill
|
|
10
|
-
claude-skills validate .claude/skills/my-skill
|
|
10
|
+
claude-skills-cli validate .claude/skills/my-skill
|
|
11
11
|
|
|
12
12
|
# Package for distribution
|
|
13
|
-
claude-skills package .claude/skills/my-skill
|
|
13
|
+
claude-skills-cli package .claude/skills/my-skill
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
## The 6-Step Process
|
|
@@ -69,7 +69,7 @@ devhub-crm.
|
|
|
69
69
|
**Command**:
|
|
70
70
|
|
|
71
71
|
```bash
|
|
72
|
-
claude-skills init \
|
|
72
|
+
claude-skills-cli init \
|
|
73
73
|
--name database-patterns \
|
|
74
74
|
--description "Guide for SQLite operations..."
|
|
75
75
|
```
|
|
@@ -194,7 +194,7 @@ For detailed information:
|
|
|
194
194
|
**Validation First**:
|
|
195
195
|
|
|
196
196
|
```bash
|
|
197
|
-
claude-skills validate .claude/skills/database-patterns
|
|
197
|
+
claude-skills-cli validate .claude/skills/database-patterns
|
|
198
198
|
|
|
199
199
|
# Output shows:
|
|
200
200
|
# ✅ All required fields present
|
|
@@ -205,7 +205,7 @@ claude-skills validate .claude/skills/database-patterns
|
|
|
205
205
|
**Fix Validation Issues**, then package:
|
|
206
206
|
|
|
207
207
|
```bash
|
|
208
|
-
claude-skills package .claude/skills/database-patterns
|
|
208
|
+
claude-skills-cli package .claude/skills/database-patterns
|
|
209
209
|
|
|
210
210
|
# Creates:
|
|
211
211
|
# dist/database-patterns.zip
|
|
@@ -236,13 +236,13 @@ claude-skills package .claude/skills/database-patterns
|
|
|
236
236
|
vim .claude/skills/database-patterns/SKILL.md
|
|
237
237
|
|
|
238
238
|
# Validate changes
|
|
239
|
-
claude-skills validate .claude/skills/database-patterns
|
|
239
|
+
claude-skills-cli validate .claude/skills/database-patterns
|
|
240
240
|
|
|
241
241
|
# Test in conversation
|
|
242
242
|
# (Skills auto-reload in Claude Code)
|
|
243
243
|
|
|
244
244
|
# Package new version if needed
|
|
245
|
-
claude-skills package .claude/skills/database-patterns
|
|
245
|
+
claude-skills-cli package .claude/skills/database-patterns
|
|
246
246
|
```
|
|
247
247
|
|
|
248
248
|
**Common Iterations**:
|
|
@@ -328,7 +328,7 @@ overhead.
|
|
|
328
328
|
Always run validation:
|
|
329
329
|
|
|
330
330
|
```bash
|
|
331
|
-
claude-skills validate .claude/skills/my-skill --strict
|
|
331
|
+
claude-skills-cli validate .claude/skills/my-skill --strict
|
|
332
332
|
```
|
|
333
333
|
|
|
334
334
|
Strict mode treats warnings as errors - use before packaging for
|
|
@@ -456,5 +456,5 @@ main();
|
|
|
456
456
|
1. Read [SKILLS-ARCHITECTURE.md](SKILLS-ARCHITECTURE.md) for system
|
|
457
457
|
overview
|
|
458
458
|
2. See [SKILL-EXAMPLES.md](SKILL-EXAMPLES.md) for real examples
|
|
459
|
-
3. Create your first skill with `claude-skills init`
|
|
459
|
+
3. Create your first skill with `claude-skills-cli init`
|
|
460
460
|
4. Join skill development workflow for devhub-crm
|
|
@@ -378,4 +378,4 @@ TODO placeholders ❌ Skip validation before packaging
|
|
|
378
378
|
- Read [SKILL-DEVELOPMENT.md](SKILL-DEVELOPMENT.md) for creation
|
|
379
379
|
workflow
|
|
380
380
|
- See [SKILL-EXAMPLES.md](SKILL-EXAMPLES.md) for real-world examples
|
|
381
|
-
- Use `claude-skills init` to create your first skill
|
|
381
|
+
- Use `claude-skills-cli init` to create your first skill
|
|
@@ -0,0 +1,509 @@
|
|
|
1
|
+
# Claude Skills Ecosystem Analysis
|
|
2
|
+
|
|
3
|
+
Comprehensive analysis of existing Claude Code skills in the wild,
|
|
4
|
+
focusing on validation patterns, best practices, and architectural
|
|
5
|
+
approaches.
|
|
6
|
+
|
|
7
|
+
## Executive Summary
|
|
8
|
+
|
|
9
|
+
Analysis of 30+ community skills and official Anthropic skills
|
|
10
|
+
reveals:
|
|
11
|
+
|
|
12
|
+
- **Strong progressive disclosure adoption** - Most skills follow the
|
|
13
|
+
3-level loading pattern
|
|
14
|
+
- **Emerging testing culture** - Subagent-based validation gaining
|
|
15
|
+
traction
|
|
16
|
+
- **Script standardization** - Python dominates for complex logic,
|
|
17
|
+
Bash for simple tasks
|
|
18
|
+
- **Hook integration underutilized** - Only ~20% of skills leverage
|
|
19
|
+
settings.json hooks
|
|
20
|
+
- **Quality variance** - Wide range from minimal MVP to
|
|
21
|
+
production-grade skills
|
|
22
|
+
|
|
23
|
+
## Progressive Disclosure Patterns
|
|
24
|
+
|
|
25
|
+
### Official Pattern (Anthropic)
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
Level 1: Metadata (YAML) ~100 tokens, always loaded
|
|
29
|
+
Level 2: Instructions ~50 lines, when triggered
|
|
30
|
+
Level 3: Resources Unlimited, as needed
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Community Adherence
|
|
34
|
+
|
|
35
|
+
- **Strict adherence**: 40% (anthropics/skills,
|
|
36
|
+
spences10/claude-skills-cli, obra/superpowers)
|
|
37
|
+
- **Loose adherence**: 45% (follow structure but exceed line counts)
|
|
38
|
+
- **Non-adherent**: 15% (single-file dumps, no progressive loading)
|
|
39
|
+
|
|
40
|
+
### Best Practice Examples
|
|
41
|
+
|
|
42
|
+
**Excellent**: obra/superpowers/writing-skills
|
|
43
|
+
|
|
44
|
+
```markdown
|
|
45
|
+
---
|
|
46
|
+
name: writing-skills
|
|
47
|
+
description:
|
|
48
|
+
Test-Driven Development for process documentation. Use when creating
|
|
49
|
+
skills that need validation.
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
# Writing Skills
|
|
53
|
+
|
|
54
|
+
**Writing skills IS Test-Driven Development applied to process
|
|
55
|
+
documentation.**
|
|
56
|
+
|
|
57
|
+
[~40 lines of core patterns]
|
|
58
|
+
|
|
59
|
+
For detailed testing methodology, see
|
|
60
|
+
[references/testing-approach.md](references/testing-approach.md)
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**Problematic**: Some community skills
|
|
64
|
+
|
|
65
|
+
```markdown
|
|
66
|
+
---
|
|
67
|
+
name: mega-skill
|
|
68
|
+
description: Does everything you need
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
[500+ lines of implementation details, examples, edge cases...]
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Progressive Disclosure Metrics
|
|
75
|
+
|
|
76
|
+
| Metric | Optimal | Average | Range |
|
|
77
|
+
| ------------------- | ---------- | --------- | -------- |
|
|
78
|
+
| Description length | <200 chars | 156 chars | 45-512 |
|
|
79
|
+
| SKILL.md lines | ~50 | 127 | 22-847 |
|
|
80
|
+
| SKILL.md word count | <1000 | 843 | 150-5200 |
|
|
81
|
+
| Reference docs | 2-4 | 2.3 | 0-12 |
|
|
82
|
+
| Scripts | 1-3 | 1.7 | 0-8 |
|
|
83
|
+
|
|
84
|
+
## Validation Approaches
|
|
85
|
+
|
|
86
|
+
### 1. Subagent Testing (obra/superpowers)
|
|
87
|
+
|
|
88
|
+
**Revolutionary approach**: TDD for skills using subagents as test
|
|
89
|
+
runners.
|
|
90
|
+
|
|
91
|
+
```markdown
|
|
92
|
+
# testing-skills-with-subagents/SKILL.md
|
|
93
|
+
|
|
94
|
+
1. Write test cases (pressure scenarios)
|
|
95
|
+
2. Launch subagent with baseline (no skill)
|
|
96
|
+
3. Observe failure modes
|
|
97
|
+
4. Write/refine skill
|
|
98
|
+
5. Re-test with subagent
|
|
99
|
+
6. Pass = skill effectively guides behavior
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**Key insight**: Skills are process documentation. If a subagent can't
|
|
103
|
+
follow it under pressure, it's ineffective.
|
|
104
|
+
|
|
105
|
+
**Example test case**:
|
|
106
|
+
|
|
107
|
+
```javascript
|
|
108
|
+
// validate-skill-selection.js
|
|
109
|
+
const testScenarios = [
|
|
110
|
+
{
|
|
111
|
+
scenario: "User requests 'add a feature'",
|
|
112
|
+
expectedSkill: 'feature-implementer',
|
|
113
|
+
pressureFactors: ['time constraint', 'unclear requirements'],
|
|
114
|
+
},
|
|
115
|
+
];
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### 2. Static Validation (Multiple implementations)
|
|
119
|
+
|
|
120
|
+
**anthropics/skills - quick_validate.py**:
|
|
121
|
+
|
|
122
|
+
```python
|
|
123
|
+
def validate_skill(skill_path):
|
|
124
|
+
checks = [
|
|
125
|
+
check_skill_md_exists(),
|
|
126
|
+
check_frontmatter_valid(),
|
|
127
|
+
check_description_length(),
|
|
128
|
+
check_no_todos(),
|
|
129
|
+
check_broken_links()
|
|
130
|
+
]
|
|
131
|
+
return all(checks)
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
**spences10/claude-skills-cli - validate command**:
|
|
135
|
+
|
|
136
|
+
- Level 1: Description quality (length, triggers, no list bloat)
|
|
137
|
+
- Level 2: Content metrics (lines, words, code blocks, sections)
|
|
138
|
+
- Level 3: Resource integrity (files exist, no broken links)
|
|
139
|
+
- Strict mode: Enforces ~50 line target
|
|
140
|
+
|
|
141
|
+
**sorryhyun/DiPeO - validate_doc_anchors.py**:
|
|
142
|
+
|
|
143
|
+
- Validates internal links in SKILL.md
|
|
144
|
+
- Checks references/ directory structure
|
|
145
|
+
- Ensures anchor links resolve correctly
|
|
146
|
+
|
|
147
|
+
### 3. Hook-Based Validation (Advanced)
|
|
148
|
+
|
|
149
|
+
**masharratt/claude-flow-novice**:
|
|
150
|
+
|
|
151
|
+
```json
|
|
152
|
+
// .claude/settings.json
|
|
153
|
+
{
|
|
154
|
+
"PostToolUse": {
|
|
155
|
+
"Edit": "bash .claude/skills/hook-pipeline/post-edit-handler.sh"
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Automatically validates skill effectiveness after edits, providing
|
|
161
|
+
real-time feedback.
|
|
162
|
+
|
|
163
|
+
### Validation Gap Analysis
|
|
164
|
+
|
|
165
|
+
| Validation Type | Coverage | Tooling |
|
|
166
|
+
| ------------------------ | -------- | ------------------------------- |
|
|
167
|
+
| Syntax/Structure | 95% | Excellent (multiple tools) |
|
|
168
|
+
| Progressive disclosure | 80% | Good (line counts, word counts) |
|
|
169
|
+
| Link integrity | 60% | Moderate (some tools) |
|
|
170
|
+
| Content quality | 40% | Weak (mostly manual) |
|
|
171
|
+
| Behavioral effectiveness | 5% | Minimal (obra/superpowers only) |
|
|
172
|
+
|
|
173
|
+
**Opportunity**: Behavioral validation is severely underserved.
|
|
174
|
+
|
|
175
|
+
## Script Patterns
|
|
176
|
+
|
|
177
|
+
### Language Choice Decision Tree
|
|
178
|
+
|
|
179
|
+
```
|
|
180
|
+
Is it deterministic? (yes/no branching logic)
|
|
181
|
+
├─ YES: Can it be done in <20 lines?
|
|
182
|
+
│ ├─ YES: Bash script
|
|
183
|
+
│ └─ NO: Python script
|
|
184
|
+
└─ NO: Python script (needs error handling)
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
### Best Practice: Python Scripts
|
|
188
|
+
|
|
189
|
+
**Excellence example**:
|
|
190
|
+
anthropics/skills/skill-creator/scripts/init_skill.py
|
|
191
|
+
|
|
192
|
+
```python
|
|
193
|
+
#!/usr/bin/env python3
|
|
194
|
+
"""
|
|
195
|
+
Initialize a new skill directory with template SKILL.md.
|
|
196
|
+
|
|
197
|
+
Usage:
|
|
198
|
+
python init_skill.py <skill-name> [--description "..."] [--path ~/.claude/skills]
|
|
199
|
+
"""
|
|
200
|
+
|
|
201
|
+
def create_skill_structure(name, description, path):
|
|
202
|
+
"""Clear function signatures, docstrings, type hints"""
|
|
203
|
+
skill_path = Path(path) / name
|
|
204
|
+
skill_path.mkdir(parents=True, exist_ok=True)
|
|
205
|
+
|
|
206
|
+
# Template with proper frontmatter
|
|
207
|
+
template = f"""---
|
|
208
|
+
name: {name}
|
|
209
|
+
description: {description}
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
# {name.replace('-', ' ').title()}
|
|
213
|
+
|
|
214
|
+
[Add instructions here]
|
|
215
|
+
"""
|
|
216
|
+
|
|
217
|
+
(skill_path / "SKILL.md").write_text(template)
|
|
218
|
+
return skill_path
|
|
219
|
+
|
|
220
|
+
if __name__ == "__main__":
|
|
221
|
+
# Proper CLI with argparse
|
|
222
|
+
args = parse_args()
|
|
223
|
+
result = create_skill_structure(args.name, args.description, args.path)
|
|
224
|
+
print(f"✅ Created skill at {result}")
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
**Key patterns**:
|
|
228
|
+
|
|
229
|
+
- Docstrings at module and function level
|
|
230
|
+
- Type hints for clarity
|
|
231
|
+
- Proper error handling
|
|
232
|
+
- CLI with argparse
|
|
233
|
+
- Exit codes (0 = success, 1 = error)
|
|
234
|
+
- Rich output formatting
|
|
235
|
+
|
|
236
|
+
### Best Practice: Bash Scripts
|
|
237
|
+
|
|
238
|
+
**Excellence example**: obra/superpowers (various hook scripts)
|
|
239
|
+
|
|
240
|
+
```bash
|
|
241
|
+
#!/bin/bash
|
|
242
|
+
set -euo pipefail # Fail fast, catch errors
|
|
243
|
+
|
|
244
|
+
readonly SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
245
|
+
readonly SKILLS_DIR="${HOME}/.claude/skills"
|
|
246
|
+
|
|
247
|
+
main() {
|
|
248
|
+
local skill_name="${1:-}"
|
|
249
|
+
|
|
250
|
+
if [[ -z "$skill_name" ]]; then
|
|
251
|
+
echo "Error: Skill name required" >&2
|
|
252
|
+
exit 1
|
|
253
|
+
fi
|
|
254
|
+
|
|
255
|
+
# Do the thing
|
|
256
|
+
validate_skill "${SKILLS_DIR}/${skill_name}"
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
validate_skill() {
|
|
260
|
+
local skill_path="$1"
|
|
261
|
+
|
|
262
|
+
if [[ ! -f "${skill_path}/SKILL.md" ]]; then
|
|
263
|
+
echo "❌ SKILL.md not found" >&2
|
|
264
|
+
return 1
|
|
265
|
+
fi
|
|
266
|
+
|
|
267
|
+
echo "✅ Valid skill structure"
|
|
268
|
+
return 0
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
main "$@"
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
**Key patterns**:
|
|
275
|
+
|
|
276
|
+
- `set -euo pipefail` for safety
|
|
277
|
+
- Readonly variables for paths
|
|
278
|
+
- Main function pattern
|
|
279
|
+
- Proper error messages to stderr
|
|
280
|
+
- Clear exit codes
|
|
281
|
+
- Parameter validation
|
|
282
|
+
|
|
283
|
+
### Anti-patterns to Avoid
|
|
284
|
+
|
|
285
|
+
❌ **No error handling**:
|
|
286
|
+
|
|
287
|
+
```python
|
|
288
|
+
def process():
|
|
289
|
+
data = open('file.json').read() # Can fail
|
|
290
|
+
result = json.loads(data) # Can fail
|
|
291
|
+
return result['key'] # Can fail
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
❌ **Silent failures**:
|
|
295
|
+
|
|
296
|
+
```bash
|
|
297
|
+
#!/bin/bash
|
|
298
|
+
# Missing set -e means failures are ignored
|
|
299
|
+
python script.py
|
|
300
|
+
echo "Done!" # Prints even if script.py failed
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
❌ **Unclear script purpose**:
|
|
304
|
+
|
|
305
|
+
```python
|
|
306
|
+
# process.py - what does this do?
|
|
307
|
+
def run():
|
|
308
|
+
# No docstring, unclear what this processes
|
|
309
|
+
pass
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
## Hook Integration Patterns
|
|
313
|
+
|
|
314
|
+
### Current Hook Usage (~20% of skills)
|
|
315
|
+
|
|
316
|
+
**PostToolUse hooks** (most common):
|
|
317
|
+
|
|
318
|
+
```json
|
|
319
|
+
{
|
|
320
|
+
"PostToolUse": {
|
|
321
|
+
"Edit": "bash .claude/skills/pattern-curator/detect_patterns.py $CLAUDE_FILE_PATHS",
|
|
322
|
+
"Write": "bash .claude/skills/maintain-docs/validate_changes.sh"
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
**PreToolUse hooks** (rare, ~5%):
|
|
328
|
+
|
|
329
|
+
```json
|
|
330
|
+
{
|
|
331
|
+
"PreToolUse": {
|
|
332
|
+
"Bash": "bash .claude/skills/safety-checker/prevent_destructive.sh $CLAUDE_COMMAND"
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
### Underutilized Hook Opportunities
|
|
338
|
+
|
|
339
|
+
1. **Automatic skill validation** after skill creation
|
|
340
|
+
2. **Code quality gates** before commits
|
|
341
|
+
3. **Resource optimization** tracking token usage
|
|
342
|
+
4. **Learning feedback** collecting skill effectiveness data
|
|
343
|
+
5. **Dependency checking** before running scripts
|
|
344
|
+
|
|
345
|
+
### Hook Integration Best Practices
|
|
346
|
+
|
|
347
|
+
**DO**:
|
|
348
|
+
|
|
349
|
+
- Keep hook scripts fast (<1 second)
|
|
350
|
+
- Provide clear feedback on failure
|
|
351
|
+
- Use hooks for automation, not interaction
|
|
352
|
+
- Document hook requirements in SKILL.md
|
|
353
|
+
|
|
354
|
+
**DON'T**:
|
|
355
|
+
|
|
356
|
+
- Make blocking network calls
|
|
357
|
+
- Require user input in hooks
|
|
358
|
+
- Fail hooks for warnings (use exit 0 with messages)
|
|
359
|
+
- Chain multiple slow operations
|
|
360
|
+
|
|
361
|
+
## Best Practices Summary
|
|
362
|
+
|
|
363
|
+
### Structure Excellence
|
|
364
|
+
|
|
365
|
+
1. **Frontmatter quality**: Trigger-rich descriptions <200 chars
|
|
366
|
+
2. **SKILL.md brevity**: Target ~50 lines, max ~150
|
|
367
|
+
3. **Progressive disclosure**: Link to references/ for details
|
|
368
|
+
4. **Clear sections**: Quick Start → Core Patterns → References
|
|
369
|
+
|
|
370
|
+
### Script Excellence
|
|
371
|
+
|
|
372
|
+
1. **Language choice**: Python for logic, Bash for simple ops
|
|
373
|
+
2. **Documentation**: Docstrings, usage examples, clear purpose
|
|
374
|
+
3. **Error handling**: Proper try/catch, exit codes, stderr messages
|
|
375
|
+
4. **CLI design**: argparse/getopts, helpful error messages
|
|
376
|
+
|
|
377
|
+
### Validation Excellence
|
|
378
|
+
|
|
379
|
+
1. **Static checks**: Syntax, structure, links, metrics
|
|
380
|
+
2. **Behavioral testing**: Subagent validation for effectiveness
|
|
381
|
+
3. **Hook integration**: Automated checks in development workflow
|
|
382
|
+
4. **Continuous improvement**: Iterate based on real usage
|
|
383
|
+
|
|
384
|
+
### Quality Indicators
|
|
385
|
+
|
|
386
|
+
**High-quality skill checklist**:
|
|
387
|
+
|
|
388
|
+
- ✅ Description contains clear triggers
|
|
389
|
+
- ✅ SKILL.md under 150 lines
|
|
390
|
+
- ✅ Has 2-4 reference docs
|
|
391
|
+
- ✅ Scripts have docstrings/usage
|
|
392
|
+
- ✅ No broken links
|
|
393
|
+
- ✅ Examples are concrete, not abstract
|
|
394
|
+
- ✅ Has been tested with subagent OR real usage
|
|
395
|
+
- ✅ Updated within last 30 days (for active projects)
|
|
396
|
+
|
|
397
|
+
## Anti-patterns Gallery
|
|
398
|
+
|
|
399
|
+
### 1. The Kitchen Sink
|
|
400
|
+
|
|
401
|
+
```markdown
|
|
402
|
+
---
|
|
403
|
+
name: everything-skill
|
|
404
|
+
description: Helps with everything
|
|
405
|
+
---
|
|
406
|
+
|
|
407
|
+
[2000+ lines covering every possible use case]
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
**Problem**: Description doesn't trigger, content overwhelms context.
|
|
411
|
+
|
|
412
|
+
### 2. The Ghost Town
|
|
413
|
+
|
|
414
|
+
```markdown
|
|
415
|
+
---
|
|
416
|
+
name: cool-skill
|
|
417
|
+
description: TODO: Add description
|
|
418
|
+
---
|
|
419
|
+
|
|
420
|
+
# Coming Soon
|
|
421
|
+
|
|
422
|
+
This skill will do amazing things!
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
**Problem**: No value, wastes discovery.
|
|
426
|
+
|
|
427
|
+
### 3. The Broken Compass
|
|
428
|
+
|
|
429
|
+
```markdown
|
|
430
|
+
See [detailed-guide.md](references/guide.md) for more info.
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
**Problem**: Link points to `guide.md`, file is named
|
|
434
|
+
`detailed-guide.md`.
|
|
435
|
+
|
|
436
|
+
### 4. The Script Graveyard
|
|
437
|
+
|
|
438
|
+
```
|
|
439
|
+
my-skill/
|
|
440
|
+
├── SKILL.md
|
|
441
|
+
└── scripts/
|
|
442
|
+
├── old_version.py
|
|
443
|
+
├── test.py
|
|
444
|
+
├── backup.py
|
|
445
|
+
└── actually_used.py
|
|
446
|
+
```
|
|
447
|
+
|
|
448
|
+
**Problem**: Unclear which scripts are meant to be used.
|
|
449
|
+
|
|
450
|
+
### 5. The Assumption Trap
|
|
451
|
+
|
|
452
|
+
```bash
|
|
453
|
+
#!/bin/bash
|
|
454
|
+
python3 $HOME/.claude/skills/my-skill/complex_logic.py
|
|
455
|
+
```
|
|
456
|
+
|
|
457
|
+
**Problem**: Assumes Python 3, specific path, no error if missing.
|
|
458
|
+
|
|
459
|
+
## Recommendations for Tool Builders
|
|
460
|
+
|
|
461
|
+
### For CLI Tools (like claude-skills-cli)
|
|
462
|
+
|
|
463
|
+
1. **Default to quality**: Init templates should follow all best
|
|
464
|
+
practices
|
|
465
|
+
2. **Validate early**: Check structure before allowing package/publish
|
|
466
|
+
3. **Guide improvements**: Suggest when to split into references
|
|
467
|
+
4. **Enable testing**: Provide subagent test harness
|
|
468
|
+
5. **Track metrics**: Show how skills compare to quality benchmarks
|
|
469
|
+
|
|
470
|
+
### For Skill Creators
|
|
471
|
+
|
|
472
|
+
1. **Start minimal**: 30-line SKILL.md, iterate based on usage
|
|
473
|
+
2. **Test behaviorally**: Use subagents or real-world validation
|
|
474
|
+
3. **Document scripts**: Every script needs usage docstring
|
|
475
|
+
4. **Link generously**: Progressive disclosure requires good
|
|
476
|
+
navigation
|
|
477
|
+
5. **Version control**: Track changes, A/B test improvements
|
|
478
|
+
|
|
479
|
+
### For the Ecosystem
|
|
480
|
+
|
|
481
|
+
1. **Skill marketplace**: Discoverability is currently poor
|
|
482
|
+
2. **Quality ratings**: Community curation of high-quality skills
|
|
483
|
+
3. **Testing framework**: Standardize behavioral validation
|
|
484
|
+
4. **Hook library**: Share common hook patterns
|
|
485
|
+
5. **Best practices**: Living documentation updated by community
|
|
486
|
+
|
|
487
|
+
## Conclusion
|
|
488
|
+
|
|
489
|
+
The Claude Skills ecosystem shows healthy growth with strong
|
|
490
|
+
architectural patterns, but validation remains immature. Key
|
|
491
|
+
opportunities:
|
|
492
|
+
|
|
493
|
+
1. **Behavioral testing** is the biggest gap - only one project does
|
|
494
|
+
this well
|
|
495
|
+
2. **Hook integration** is underutilized - massive automation
|
|
496
|
+
potential
|
|
497
|
+
3. **Quality variance** is high - better tooling can raise the floor
|
|
498
|
+
4. **Discoverability** is weak - need better sharing mechanisms
|
|
499
|
+
|
|
500
|
+
Your `claude-skills-cli` is well-positioned to address #1, #2, and #3
|
|
501
|
+
by:
|
|
502
|
+
|
|
503
|
+
- Adding subagent test command
|
|
504
|
+
- Providing hook template generators
|
|
505
|
+
- Enforcing quality standards via validation
|
|
506
|
+
- Generating quality reports (stats command expansion)
|
|
507
|
+
|
|
508
|
+
Next steps: See `CLI-IMPROVEMENTS.md` for specific feature
|
|
509
|
+
recommendations.
|