claude-skills-cli 0.0.3 → 0.0.4
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 +2 -2
- package/dist/commands/init.js +28 -19
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/package.js +2 -5
- package/dist/commands/package.js.map +1 -1
- package/dist/commands/stats.js +154 -0
- package/dist/commands/stats.js.map +1 -0
- package/dist/core/templates.js +63 -12
- package/dist/core/templates.js.map +1 -1
- package/dist/core/validator.js +16 -4
- package/dist/core/validator.js.map +1 -1
- package/dist/index.js +16 -3
- package/dist/index.js.map +1 -1
- package/docs/SKILL-DEVELOPMENT.md +28 -30
- package/docs/SKILL-EXAMPLES.md +27 -23
- package/docs/SKILLS-ARCHITECTURE.md +14 -14
- package/package.json +1 -1
- package/skills/skill-creator/SKILL.md +62 -301
- package/skills/skill-creator/references/anthropic-resources.md +458 -0
- package/skills/skill-creator/references/cli-feedback.md +431 -0
- package/skills/skill-creator/references/cli-reference.md +499 -0
- package/skills/skill-creator/references/skill-examples.md +77 -69
- package/skills/skill-creator/references/writing-guide.md +134 -119
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
6
|
# Create a new skill
|
|
7
|
-
|
|
7
|
+
claude-skills init --name my-skill --description "What it does"
|
|
8
8
|
|
|
9
9
|
# Validate the skill
|
|
10
|
-
|
|
10
|
+
claude-skills validate .claude/skills/my-skill
|
|
11
11
|
|
|
12
12
|
# Package for distribution
|
|
13
|
-
|
|
13
|
+
claude-skills package .claude/skills/my-skill
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
## The 6-Step Process
|
|
@@ -68,7 +68,7 @@ Based on Anthropic's skill-creator methodology, adapted for devhub-crm.
|
|
|
68
68
|
**Command**:
|
|
69
69
|
|
|
70
70
|
```bash
|
|
71
|
-
|
|
71
|
+
claude-skills init \
|
|
72
72
|
--name database-patterns \
|
|
73
73
|
--description "Guide for SQLite operations..."
|
|
74
74
|
```
|
|
@@ -82,7 +82,7 @@ python .claude/scripts/init_skill.py \
|
|
|
82
82
|
├── references/
|
|
83
83
|
│ └── detailed-guide.md # Example reference
|
|
84
84
|
├── scripts/
|
|
85
|
-
│ └── example.
|
|
85
|
+
│ └── example.js # Example script
|
|
86
86
|
└── assets/ # Empty directory
|
|
87
87
|
```
|
|
88
88
|
|
|
@@ -169,8 +169,8 @@ For detailed information:
|
|
|
169
169
|
|
|
170
170
|
## Scripts
|
|
171
171
|
|
|
172
|
-
- `scripts/validate.
|
|
173
|
-
- `scripts/generate.
|
|
172
|
+
- `scripts/validate.js`: Description
|
|
173
|
+
- `scripts/generate.js`: Description
|
|
174
174
|
|
|
175
175
|
## Notes
|
|
176
176
|
|
|
@@ -192,7 +192,7 @@ For detailed information:
|
|
|
192
192
|
**Validation First**:
|
|
193
193
|
|
|
194
194
|
```bash
|
|
195
|
-
|
|
195
|
+
claude-skills validate .claude/skills/database-patterns
|
|
196
196
|
|
|
197
197
|
# Output shows:
|
|
198
198
|
# ✅ All required fields present
|
|
@@ -203,7 +203,7 @@ python .claude/scripts/validate_skill.py .claude/skills/database-patterns
|
|
|
203
203
|
**Fix Validation Issues**, then package:
|
|
204
204
|
|
|
205
205
|
```bash
|
|
206
|
-
|
|
206
|
+
claude-skills package .claude/skills/database-patterns
|
|
207
207
|
|
|
208
208
|
# Creates:
|
|
209
209
|
# dist/database-patterns.zip
|
|
@@ -234,13 +234,13 @@ python .claude/scripts/package_skill.py .claude/skills/database-patterns
|
|
|
234
234
|
vim .claude/skills/database-patterns/SKILL.md
|
|
235
235
|
|
|
236
236
|
# Validate changes
|
|
237
|
-
|
|
237
|
+
claude-skills validate .claude/skills/database-patterns
|
|
238
238
|
|
|
239
239
|
# Test in conversation
|
|
240
240
|
# (Skills auto-reload in Claude Code)
|
|
241
241
|
|
|
242
242
|
# Package new version if needed
|
|
243
|
-
|
|
243
|
+
claude-skills package .claude/skills/database-patterns
|
|
244
244
|
```
|
|
245
245
|
|
|
246
246
|
**Common Iterations**:
|
|
@@ -325,7 +325,7 @@ Generate IDs with nanoid() to ensure uniqueness without database overhead.
|
|
|
325
325
|
Always run validation:
|
|
326
326
|
|
|
327
327
|
```bash
|
|
328
|
-
|
|
328
|
+
claude-skills validate .claude/skills/my-skill --strict
|
|
329
329
|
```
|
|
330
330
|
|
|
331
331
|
Strict mode treats warnings as errors - use before packaging for distribution.
|
|
@@ -425,26 +425,24 @@ description: Brief description including when to use this skill
|
|
|
425
425
|
|
|
426
426
|
### Script File
|
|
427
427
|
|
|
428
|
-
```
|
|
429
|
-
#!/usr/bin/env
|
|
430
|
-
"""
|
|
431
|
-
Description of what this script does.
|
|
428
|
+
```javascript
|
|
429
|
+
#!/usr/bin/env node
|
|
432
430
|
|
|
433
|
-
|
|
434
|
-
|
|
431
|
+
/**
|
|
432
|
+
* Description of what this script does.
|
|
433
|
+
*
|
|
434
|
+
* Usage:
|
|
435
|
+
* node script_name.js [arguments]
|
|
436
|
+
*
|
|
437
|
+
* Example:
|
|
438
|
+
* node validate.js --check-all
|
|
439
|
+
*/
|
|
435
440
|
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
441
|
+
function main() {
|
|
442
|
+
// Script logic here
|
|
443
|
+
}
|
|
439
444
|
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
def main():
|
|
443
|
-
# Script logic here
|
|
444
|
-
pass
|
|
445
|
-
|
|
446
|
-
if __name__ == "__main__":
|
|
447
|
-
main()
|
|
445
|
+
main();
|
|
448
446
|
```
|
|
449
447
|
|
|
450
448
|
---
|
|
@@ -453,5 +451,5 @@ if __name__ == "__main__":
|
|
|
453
451
|
|
|
454
452
|
1. Read [SKILLS-ARCHITECTURE.md](SKILLS-ARCHITECTURE.md) for system overview
|
|
455
453
|
2. See [SKILL-EXAMPLES.md](SKILL-EXAMPLES.md) for real examples
|
|
456
|
-
3. Create your first skill with `
|
|
454
|
+
3. Create your first skill with `claude-skills init`
|
|
457
455
|
4. Join skill development workflow for devhub-crm
|
package/docs/SKILL-EXAMPLES.md
CHANGED
|
@@ -12,8 +12,8 @@ Real-world examples from Anthropic's Skills repository and Claude Cookbooks, wit
|
|
|
12
12
|
applying-brand-guidelines/
|
|
13
13
|
├── SKILL.md
|
|
14
14
|
└── scripts/
|
|
15
|
-
├── apply_brand.
|
|
16
|
-
└── validate_brand.
|
|
15
|
+
├── apply_brand.js
|
|
16
|
+
└── validate_brand.js
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
### SKILL.md Frontmatter
|
|
@@ -40,9 +40,9 @@ description: This skill applies consistent corporate branding and styling to all
|
|
|
40
40
|
|
|
41
41
|
**✅ Executable Scripts**: Validation doesn't need manual checking
|
|
42
42
|
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
```javascript
|
|
44
|
+
// scripts/validate_brand.js
|
|
45
|
+
// Checks documents for brand compliance automatically
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
**✅ "When to Use" in Description**: "applies consistent corporate branding...to all generated documents"
|
|
@@ -68,7 +68,7 @@ pdf/
|
|
|
68
68
|
│ ├── forms.md
|
|
69
69
|
│ └── reference.md
|
|
70
70
|
└── scripts/
|
|
71
|
-
└── extract_fields.
|
|
71
|
+
└── extract_fields.js
|
|
72
72
|
```
|
|
73
73
|
|
|
74
74
|
### SKILL.md Excerpt
|
|
@@ -83,12 +83,16 @@ description: Extract text and tables from PDF files, fill forms, merge documents
|
|
|
83
83
|
|
|
84
84
|
## Quick Start
|
|
85
85
|
|
|
86
|
-
Use
|
|
86
|
+
Use pdf-parse to extract text from PDFs:
|
|
87
87
|
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
88
|
+
```javascript
|
|
89
|
+
const fs = require('fs');
|
|
90
|
+
const pdf = require('pdf-parse');
|
|
91
|
+
|
|
92
|
+
const dataBuffer = fs.readFileSync('document.pdf');
|
|
93
|
+
pdf(dataBuffer).then((data) => {
|
|
94
|
+
console.log(data.text);
|
|
95
|
+
});
|
|
92
96
|
```
|
|
93
97
|
````
|
|
94
98
|
|
|
@@ -128,8 +132,8 @@ financial-analyzer/
|
|
|
128
132
|
│ ├── formulas.md
|
|
129
133
|
│ └── ratios-reference.md
|
|
130
134
|
└── scripts/
|
|
131
|
-
├── calculate_ratios.
|
|
132
|
-
└── generate_dashboard.
|
|
135
|
+
├── calculate_ratios.js
|
|
136
|
+
└── generate_dashboard.js
|
|
133
137
|
|
|
134
138
|
````
|
|
135
139
|
|
|
@@ -147,14 +151,14 @@ description: Calculate financial ratios, analyze statements, and generate perfor
|
|
|
147
151
|
### Liquidity Ratios
|
|
148
152
|
|
|
149
153
|
**Current Ratio**:
|
|
150
|
-
```
|
|
151
|
-
|
|
154
|
+
```javascript
|
|
155
|
+
const currentRatio = currentAssets / currentLiabilities;
|
|
152
156
|
````
|
|
153
157
|
|
|
154
158
|
**Quick Ratio**:
|
|
155
159
|
|
|
156
|
-
```
|
|
157
|
-
|
|
160
|
+
```javascript
|
|
161
|
+
const quickRatio = (currentAssets - inventory) / currentLiabilities;
|
|
158
162
|
```
|
|
159
163
|
|
|
160
164
|
For complete ratio formulas, see [references/formulas.md](references/formulas.md).
|
|
@@ -166,9 +170,9 @@ For complete ratio formulas, see [references/formulas.md](references/formulas.md
|
|
|
166
170
|
**✅ Domain-Specific**: Tailored to financial analysis
|
|
167
171
|
|
|
168
172
|
**✅ Executable Calculations**: Scripts provide exact formulas
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
|
|
173
|
+
```javascript
|
|
174
|
+
// scripts/calculate_ratios.js
|
|
175
|
+
// Runs calculations without Claude generating code each time
|
|
172
176
|
````
|
|
173
177
|
|
|
174
178
|
**✅ References for Detail**: Full formula explanations in references/
|
|
@@ -334,8 +338,8 @@ github-api/
|
|
|
334
338
|
│ ├── authentication.md
|
|
335
339
|
│ └── rate-limits.md
|
|
336
340
|
└── scripts/
|
|
337
|
-
├── test_connection.
|
|
338
|
-
└── check_rate_limit.
|
|
341
|
+
├── test_connection.js
|
|
342
|
+
└── check_rate_limit.js
|
|
339
343
|
|
|
340
344
|
````
|
|
341
345
|
|
|
@@ -364,7 +368,7 @@ const response = await fetch('https://api.github.com/user', {
|
|
|
364
368
|
Check rate limits before making requests:
|
|
365
369
|
|
|
366
370
|
```bash
|
|
367
|
-
|
|
371
|
+
node scripts/check_rate_limit.js
|
|
368
372
|
```
|
|
369
373
|
|
|
370
374
|
For complete API reference, see [references/endpoints.md](references/endpoints.md).
|
|
@@ -90,7 +90,7 @@ For complete schema, see [references/schema.md](references/schema.md)
|
|
|
90
90
|
|
|
91
91
|
```bash
|
|
92
92
|
# Claude can execute scripts without reading them
|
|
93
|
-
|
|
93
|
+
node scripts/validate_schema.js
|
|
94
94
|
|
|
95
95
|
# Or read references when needed
|
|
96
96
|
cat references/detailed-schema.md
|
|
@@ -147,8 +147,8 @@ my-skill/
|
|
|
147
147
|
│ ├── examples.md
|
|
148
148
|
│ └── troubleshooting.md
|
|
149
149
|
├── scripts/ # Executable code
|
|
150
|
-
│ ├── validate.
|
|
151
|
-
│ ├── generate.
|
|
150
|
+
│ ├── validate.js
|
|
151
|
+
│ ├── generate.js
|
|
152
152
|
│ └── test.sh
|
|
153
153
|
└── assets/ # Templates & resources
|
|
154
154
|
├── template.sql
|
|
@@ -248,21 +248,21 @@ Executable code for deterministic operations that don't need token generation.
|
|
|
248
248
|
|
|
249
249
|
### Why Scripts Are Efficient
|
|
250
250
|
|
|
251
|
-
```
|
|
252
|
-
|
|
253
|
-
"Claude, write
|
|
254
|
-
|
|
251
|
+
```javascript
|
|
252
|
+
// Option 1: Claude generates code every time (expensive)
|
|
253
|
+
"Claude, write JavaScript to validate these timestamps..."
|
|
254
|
+
// Result: ~500 tokens each time
|
|
255
255
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
256
|
+
// Option 2: Claude runs existing script (cheap)
|
|
257
|
+
node scripts/validate_timestamps.js
|
|
258
|
+
// Result: ~50 tokens (just the output)
|
|
259
259
|
```
|
|
260
260
|
|
|
261
261
|
### Best Practices
|
|
262
262
|
|
|
263
|
-
- Include shebang (`#!/usr/bin/env
|
|
263
|
+
- Include shebang (`#!/usr/bin/env node`)
|
|
264
264
|
- Make executable (`chmod +x`)
|
|
265
|
-
- Add
|
|
265
|
+
- Add JSDoc comments with usage
|
|
266
266
|
- Handle errors gracefully
|
|
267
267
|
- Return meaningful output
|
|
268
268
|
|
|
@@ -281,7 +281,7 @@ Files used in output, not loaded into context.
|
|
|
281
281
|
|
|
282
282
|
### Usage Pattern
|
|
283
283
|
|
|
284
|
-
```
|
|
284
|
+
```bash
|
|
285
285
|
# Claude copies/modifies assets without reading into context
|
|
286
286
|
cp assets/template.html output/index.html
|
|
287
287
|
# Modify the template as needed
|
|
@@ -377,4 +377,4 @@ Each skill loads independently, shares context naturally.
|
|
|
377
377
|
|
|
378
378
|
- Read [SKILL-DEVELOPMENT.md](SKILL-DEVELOPMENT.md) for creation workflow
|
|
379
379
|
- See [SKILL-EXAMPLES.md](SKILL-EXAMPLES.md) for real-world examples
|
|
380
|
-
- Use `
|
|
380
|
+
- Use `claude-skills init` to create your first skill
|