claude-skills-cli 0.0.4 → 0.0.5

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 (36) hide show
  1. package/README.md +59 -226
  2. package/dist/commands/init.js +1 -1
  3. package/dist/commands/init.js.map +1 -1
  4. package/dist/commands/install.js +69 -0
  5. package/dist/commands/install.js.map +1 -0
  6. package/dist/commands/package.js +3 -4
  7. package/dist/commands/package.js.map +1 -1
  8. package/dist/commands/stats.js +2 -2
  9. package/dist/commands/stats.js.map +1 -1
  10. package/dist/commands/validate.js +1 -1
  11. package/dist/commands/validate.js.map +1 -1
  12. package/dist/core/templates.js.map +1 -1
  13. package/dist/core/validator.js +16 -7
  14. package/dist/core/validator.js.map +1 -1
  15. package/dist/index.js +12 -1
  16. package/dist/index.js.map +1 -1
  17. package/dist/skills/skill-creator/SKILL.md +143 -0
  18. package/{skills → dist/skills}/skill-creator/references/anthropic-resources.md +80 -34
  19. package/{skills → dist/skills}/skill-creator/references/cli-reference.md +24 -16
  20. package/{skills → dist/skills}/skill-creator/references/skill-examples.md +41 -39
  21. package/{skills → dist/skills}/skill-creator/references/writing-guide.md +65 -55
  22. package/dist/skills/skill-creator/skill-creator/SKILL.md +143 -0
  23. package/dist/skills/skill-creator/skill-creator/references/anthropic-resources.md +504 -0
  24. package/dist/skills/skill-creator/skill-creator/references/cli-reference.md +507 -0
  25. package/dist/skills/skill-creator/skill-creator/references/skill-examples.md +413 -0
  26. package/dist/skills/skill-creator/skill-creator/references/writing-guide.md +619 -0
  27. package/dist/utils/fs.js +2 -2
  28. package/dist/utils/fs.js.map +1 -1
  29. package/dist/utils/output.js +2 -1
  30. package/dist/utils/output.js.map +1 -1
  31. package/docs/SKILL-DEVELOPMENT.md +11 -6
  32. package/docs/SKILL-EXAMPLES.md +51 -45
  33. package/docs/SKILLS-ARCHITECTURE.md +28 -27
  34. package/package.json +2 -2
  35. package/skills/skill-creator/SKILL.md +0 -106
  36. package/skills/skill-creator/references/cli-feedback.md +0 -431
@@ -15,7 +15,8 @@ claude-skills package .claude/skills/my-skill
15
15
 
16
16
  ## The 6-Step Process
17
17
 
18
- Based on Anthropic's skill-creator methodology, adapted for devhub-crm.
18
+ Based on Anthropic's skill-creator methodology, adapted for
19
+ devhub-crm.
19
20
 
20
21
  ### Step 1: Understanding with Concrete Examples
21
22
 
@@ -92,7 +93,8 @@ claude-skills init \
92
93
 
93
94
  ### Step 4: Editing the Skill
94
95
 
95
- **Focus**: Write content for another instance of Claude to use effectively.
96
+ **Focus**: Write content for another instance of Claude to use
97
+ effectively.
96
98
 
97
99
  #### Start with Reusable Contents
98
100
 
@@ -315,7 +317,8 @@ Add comments explaining WHY, not just WHAT:
315
317
  ```markdown
316
318
  ## ID Generation
317
319
 
318
- Generate IDs with nanoid() to ensure uniqueness without database overhead.
320
+ Generate IDs with nanoid() to ensure uniqueness without database
321
+ overhead.
319
322
 
320
323
  <!-- Not just: "Use nanoid()" -->
321
324
  ```
@@ -328,7 +331,8 @@ Always run validation:
328
331
  claude-skills validate .claude/skills/my-skill --strict
329
332
  ```
330
333
 
331
- Strict mode treats warnings as errors - use before packaging for distribution.
334
+ Strict mode treats warnings as errors - use before packaging for
335
+ distribution.
332
336
 
333
337
  ---
334
338
 
@@ -439,7 +443,7 @@ description: Brief description including when to use this skill
439
443
  */
440
444
 
441
445
  function main() {
442
- // Script logic here
446
+ // Script logic here
443
447
  }
444
448
 
445
449
  main();
@@ -449,7 +453,8 @@ main();
449
453
 
450
454
  ## Next Steps
451
455
 
452
- 1. Read [SKILLS-ARCHITECTURE.md](SKILLS-ARCHITECTURE.md) for system overview
456
+ 1. Read [SKILLS-ARCHITECTURE.md](SKILLS-ARCHITECTURE.md) for system
457
+ overview
453
458
  2. See [SKILL-EXAMPLES.md](SKILL-EXAMPLES.md) for real examples
454
459
  3. Create your first skill with `claude-skills init`
455
460
  4. Join skill development workflow for devhub-crm
@@ -1,6 +1,7 @@
1
1
  # Skill Examples
2
2
 
3
- Real-world examples from Anthropic's Skills repository and Claude Cookbooks, with analysis of what makes them effective.
3
+ Real-world examples from Anthropic's Skills repository and Claude
4
+ Cookbooks, with analysis of what makes them effective.
4
5
 
5
6
  ---
6
7
 
@@ -21,15 +22,19 @@ applying-brand-guidelines/
21
22
  ```yaml
22
23
  ---
23
24
  name: applying-brand-guidelines
24
- description: This skill applies consistent corporate branding and styling to all generated documents including colors, fonts, layouts, and messaging
25
+ description:
26
+ This skill applies consistent corporate branding and styling to all
27
+ generated documents including colors, fonts, layouts, and messaging
25
28
  ---
26
29
  ```
27
30
 
28
31
  ### What Makes It Good
29
32
 
30
- **✅ Clear Scope**: Focuses on one thing - brand consistency across documents
33
+ **✅ Clear Scope**: Focuses on one thing - brand consistency across
34
+ documents
31
35
 
32
- **✅ Actionable Content**: Specific hex codes, font sizes, spacing rules
36
+ **✅ Actionable Content**: Specific hex codes, font sizes, spacing
37
+ rules
33
38
 
34
39
  ```markdown
35
40
  ### Color Palette
@@ -45,7 +50,8 @@ description: This skill applies consistent corporate branding and styling to all
45
50
  // Checks documents for brand compliance automatically
46
51
  ```
47
52
 
48
- **✅ "When to Use" in Description**: "applies consistent corporate branding...to all generated documents"
53
+ **✅ "When to Use" in Description**: "applies consistent corporate
54
+ branding...to all generated documents"
49
55
 
50
56
  ### Key Takeaway
51
57
 
@@ -76,7 +82,10 @@ pdf/
76
82
  ````markdown
77
83
  ---
78
84
  name: pdf
79
- description: Extract text and tables from PDF files, fill forms, merge documents. Use when working with PDF files or when the user mentions PDFs, forms, or document extraction.
85
+ description:
86
+ Extract text and tables from PDF files, fill forms, merge documents.
87
+ Use when working with PDF files or when the user mentions PDFs,
88
+ forms, or document extraction.
80
89
  ---
81
90
 
82
91
  # PDF Processing
@@ -91,7 +100,7 @@ const pdf = require('pdf-parse');
91
100
 
92
101
  const dataBuffer = fs.readFileSync('document.pdf');
93
102
  pdf(dataBuffer).then((data) => {
94
- console.log(data.text);
103
+ console.log(data.text);
95
104
  });
96
105
  ```
97
106
  ````
@@ -126,14 +135,9 @@ Large domains benefit from splitting:
126
135
  ### Structure (from Claude Cookbooks)
127
136
  ```
128
137
 
129
- financial-analyzer/
130
- ├── SKILL.md
131
- ├── references/
132
- │ ├── formulas.md
133
- │ └── ratios-reference.md
134
- └── scripts/
135
- ├── calculate_ratios.js
136
- └── generate_dashboard.js
138
+ financial-analyzer/ ├── SKILL.md ├── references/ │ ├── formulas.md │
139
+ └── ratios-reference.md └── scripts/ ├── calculate_ratios.js └──
140
+ generate_dashboard.js
137
141
 
138
142
  ````
139
143
 
@@ -161,7 +165,8 @@ const currentRatio = currentAssets / currentLiabilities;
161
165
  const quickRatio = (currentAssets - inventory) / currentLiabilities;
162
166
  ```
163
167
 
164
- For complete ratio formulas, see [references/formulas.md](references/formulas.md).
168
+ For complete ratio formulas, see
169
+ [references/formulas.md](references/formulas.md).
165
170
 
166
171
  ````
167
172
 
@@ -208,7 +213,10 @@ database-schema/
208
213
  ````markdown
209
214
  ---
210
215
  name: database-schema
211
- description: Complete database schema with table structures, relationships, and indexes for the project. Use when writing SQL queries, understanding data models, or working with database operations.
216
+ description:
217
+ Complete database schema with table structures, relationships, and
218
+ indexes for the project. Use when writing SQL queries, understanding
219
+ data models, or working with database operations.
212
220
  ---
213
221
 
214
222
  # Database Schema
@@ -263,16 +271,9 @@ Reference-heavy skills should:
263
271
  ### Structure (from Anthropic examples)
264
272
  ```
265
273
 
266
- component-library/
267
- ├── SKILL.md
268
- ├── references/
269
- │ ├── button-variants.md
270
- │ ├── form-patterns.md
271
- │ └── layout-components.md
272
- └── assets/
273
- └── component-templates/
274
- ├── button.tsx
275
- └── form.tsx
274
+ component-library/ ├── SKILL.md ├── references/ │ ├──
275
+ button-variants.md │ ├── form-patterns.md │ └── layout-components.md
276
+ └── assets/ └── component-templates/ ├── button.tsx └── form.tsx
276
277
 
277
278
  ````
278
279
 
@@ -331,15 +332,9 @@ Component library skills should:
331
332
  ### Structure
332
333
  ```
333
334
 
334
- github-api/
335
- ├── SKILL.md
336
- ├── references/
337
- │ ├── endpoints.md
338
- │ ├── authentication.md
339
- │ └── rate-limits.md
340
- └── scripts/
341
- ├── test_connection.js
342
- └── check_rate_limit.js
335
+ github-api/ ├── SKILL.md ├── references/ │ ├── endpoints.md │ ├──
336
+ authentication.md │ └── rate-limits.md └── scripts/ ├──
337
+ test_connection.js └── check_rate_limit.js
343
338
 
344
339
  ````
345
340
 
@@ -371,7 +366,8 @@ Check rate limits before making requests:
371
366
  node scripts/check_rate_limit.js
372
367
  ```
373
368
 
374
- For complete API reference, see [references/endpoints.md](references/endpoints.md).
369
+ For complete API reference, see
370
+ [references/endpoints.md](references/endpoints.md).
375
371
 
376
372
  ````
377
373
 
@@ -410,7 +406,10 @@ description: Helps with database operations
410
406
 
411
407
  ```yaml
412
408
  ---
413
- description: SQLite query patterns using better-sqlite3 for contacts, companies, and interactions tables. Use when writing SELECT, INSERT, UPDATE, or DELETE operations with prepared statements.
409
+ description:
410
+ SQLite query patterns using better-sqlite3 for contacts, companies,
411
+ and interactions tables. Use when writing SELECT, INSERT, UPDATE, or
412
+ DELETE operations with prepared statements.
414
413
  ---
415
414
  ```
416
415
 
@@ -437,8 +436,8 @@ description: SQLite query patterns using better-sqlite3 for contacts, companies,
437
436
 
438
437
  [10 common patterns]
439
438
 
440
- For complete schema: [references/schema.md](references/schema.md)
441
- For all examples: [references/queries.md](references/queries.md)
439
+ For complete schema: [references/schema.md](references/schema.md) For
440
+ all examples: [references/queries.md](references/queries.md)
442
441
  ```
443
442
 
444
443
  ### ❌ Anti-Pattern 3: Using Second Person
@@ -470,7 +469,10 @@ description: Handle form submissions
470
469
 
471
470
  ```yaml
472
471
  ---
473
- description: Handle form submissions with validation, error handling, and reactive updates. Use when implementing forms, processing user input, or validating data before database operations.
472
+ description:
473
+ Handle form submissions with validation, error handling, and
474
+ reactive updates. Use when implementing forms, processing user
475
+ input, or validating data before database operations.
474
476
  ---
475
477
  ```
476
478
 
@@ -480,7 +482,8 @@ description: Handle form submissions with validation, error handling, and reacti
480
482
 
481
483
  ### Example: Multi-Skill Workflow
482
484
 
483
- **User Request**: "Create a GitHub contact dashboard with database stats"
485
+ **User Request**: "Create a GitHub contact dashboard with database
486
+ stats"
484
487
 
485
488
  **Skills Activated**:
486
489
 
@@ -489,7 +492,8 @@ description: Handle form submissions with validation, error handling, and reacti
489
492
  3. `sveltekit-patterns` - Build component structure
490
493
  4. `daisyui-conventions` - Apply styling
491
494
 
492
- **Why This Works**: Each skill handles its domain, Claude composes them naturally.
495
+ **Why This Works**: Each skill handles its domain, Claude composes
496
+ them naturally.
493
497
 
494
498
  ---
495
499
 
@@ -498,8 +502,10 @@ description: Handle form submissions with validation, error handling, and reacti
498
502
  ### From Anthropic Skills
499
503
 
500
504
  1. **Metadata drives discovery** - Spend time on descriptions
501
- 2. **Progressive disclosure saves tokens** - Don't front-load everything
502
- 3. **Scripts for determinism** - Code that doesn't change shouldn't be generated
505
+ 2. **Progressive disclosure saves tokens** - Don't front-load
506
+ everything
507
+ 3. **Scripts for determinism** - Code that doesn't change shouldn't be
508
+ generated
503
509
  4. **References for depth** - Keep SKILL.md navigable
504
510
  5. **Real examples** - Pull from actual codebases
505
511
 
@@ -2,7 +2,10 @@
2
2
 
3
3
  ## Overview
4
4
 
5
- Claude Skills are modular capabilities that extend Claude's functionality through a filesystem-based architecture. They provide specialized domain expertise, workflows, and tools that transform Claude from a general-purpose agent into a specialist.
5
+ Claude Skills are modular capabilities that extend Claude's
6
+ functionality through a filesystem-based architecture. They provide
7
+ specialized domain expertise, workflows, and tools that transform
8
+ Claude from a general-purpose agent into a specialist.
6
9
 
7
10
  ## Core Concepts
8
11
 
@@ -52,8 +55,8 @@ Claude sees this at startup and knows:
52
55
  - When to use it
53
56
  - How to trigger it
54
57
 
55
- **Token cost**: ~100 tokens per skill (metadata only)
56
- **When**: At agent startup, every conversation
58
+ **Token cost**: ~100 tokens per skill (metadata only) **When**: At
59
+ agent startup, every conversation
57
60
 
58
61
  ### Level 2: Instructions (<5k tokens)
59
62
 
@@ -71,21 +74,21 @@ The markdown body of SKILL.md contains:
71
74
  ## Core Principles
72
75
 
73
76
  - Use prepared statements for all queries
74
- - Generate IDs with nanoid()
75
- ...
77
+ - Generate IDs with nanoid() ...
76
78
 
77
79
  For complete schema, see [references/schema.md](references/schema.md)
78
80
  ```
79
81
 
80
- **Token cost**: ~3-5k tokens typically
81
- **When**: Only when Claude determines skill is relevant
82
+ **Token cost**: ~3-5k tokens typically **When**: Only when Claude
83
+ determines skill is relevant
82
84
 
83
85
  ### Level 3: Resources (unlimited)
84
86
 
85
87
  **Loaded as needed**
86
88
 
87
89
  - **references/**: Documentation Claude reads into context as needed
88
- - **scripts/**: Executable code Claude runs without loading into context
90
+ - **scripts/**: Executable code Claude runs without loading into
91
+ context
89
92
  - **assets/**: Files used in output (templates, images, fonts)
90
93
 
91
94
  ```bash
@@ -226,7 +229,8 @@ Detailed documentation loaded only when needed by Claude.
226
229
  ```markdown
227
230
  # In SKILL.md
228
231
 
229
- For complete database schema with all relationships, see [references/schema.md](references/schema.md).
232
+ For complete database schema with all relationships, see
233
+ [references/schema.md](references/schema.md).
230
234
 
231
235
  # Claude can then:
232
236
 
@@ -237,7 +241,8 @@ cat references/schema.md # Load when needed
237
241
 
238
242
  ### Purpose
239
243
 
240
- Executable code for deterministic operations that don't need token generation.
244
+ Executable code for deterministic operations that don't need token
245
+ generation.
241
246
 
242
247
  ### When to Use Scripts
243
248
 
@@ -309,7 +314,8 @@ Schema reference (if needed): ~2000 tokens
309
314
  Total: 100 tokens normally, 3100-5100 when used
310
315
  ```
311
316
 
312
- **Savings**: Skill metadata is loaded once. Without skill, you pay ~3500 tokens every conversation even if not needed.
317
+ **Savings**: Skill metadata is loaded once. Without skill, you pay
318
+ ~3500 tokens every conversation even if not needed.
313
319
 
314
320
  ## Skill Composition
315
321
 
@@ -354,27 +360,22 @@ Each skill loads independently, shares context naturally.
354
360
 
355
361
  ### Do:
356
362
 
357
- ✅ Keep SKILL.md concise and actionable
358
- Use imperative voice for instructions
359
- Provide concrete examples
360
- Link to references for details
361
- Include "when to use" in description
362
- ✅ Use scripts for deterministic operations
363
- ✅ Group related content in references
364
- ✅ Test skills on real tasks
363
+ ✅ Keep SKILL.md concise and actionable ✅ Use imperative voice for
364
+ instructions Provide concrete examples ✅ Link to references for
365
+ details Include "when to use" in description ✅ Use scripts for
366
+ deterministic operations Group related content in references
367
+ Test skills on real tasks
365
368
 
366
369
  ### Don't:
367
370
 
368
- ❌ Duplicate content between SKILL.md and references
369
- ❌ Use second person ("you")
370
- Include entire documentation inline
371
- Forget to specify when to use skill
372
- ❌ Make descriptions too generic
373
- ❌ Leave TODO placeholders
374
- ❌ Skip validation before packaging
371
+ ❌ Duplicate content between SKILL.md and references ❌ Use second
372
+ person ("you") ❌ Include entire documentation inline ❌ Forget to
373
+ specify when to use skill Make descriptions too generic ❌ Leave
374
+ TODO placeholders Skip validation before packaging
375
375
 
376
376
  ## Next Steps
377
377
 
378
- - Read [SKILL-DEVELOPMENT.md](SKILL-DEVELOPMENT.md) for creation workflow
378
+ - Read [SKILL-DEVELOPMENT.md](SKILL-DEVELOPMENT.md) for creation
379
+ workflow
379
380
  - See [SKILL-EXAMPLES.md](SKILL-EXAMPLES.md) for real-world examples
380
381
  - Use `claude-skills init` to create your first skill
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-skills-cli",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "CLI toolkit for creating and managing Claude Agent Skills",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -10,7 +10,6 @@
10
10
  "files": [
11
11
  "dist",
12
12
  "docs",
13
- "skills",
14
13
  "README.md"
15
14
  ],
16
15
  "engines": {
@@ -47,6 +46,7 @@
47
46
  },
48
47
  "scripts": {
49
48
  "build": "tsc",
49
+ "postbuild": "mkdir -p dist/skills && cp -r .claude/skills/skill-creator dist/skills/skill-creator",
50
50
  "dev": "tsc --watch",
51
51
  "start": "node ./dist/index.js",
52
52
  "format": "prettier --write .",
@@ -1,106 +0,0 @@
1
- ---
2
- name: skill-creator
3
- description: Create Claude Skills using claude-skills-cli. Use when building new skills, running validation, or packaging skills for distribution with TypeScript/Node.
4
- ---
5
-
6
- # Skill Creator
7
-
8
- Create effective Claude Skills using the `claude-skills-cli` tool (TypeScript/Node).
9
-
10
- ## Quick Start
11
-
12
- ```bash
13
- # Create skill
14
- npx claude-skills init --name my-skill \
15
- --description "What it does. Use when [trigger keywords]"
16
-
17
- # Validate
18
- npx claude-skills validate .claude/skills/my-skill
19
-
20
- # Package
21
- npx claude-skills package .claude/skills/my-skill
22
- ```
23
-
24
- ## Progressive Disclosure System
25
-
26
- Skills load in 3 levels:
27
-
28
- | Level | When Loaded | Token Budget |
29
- | --------------------------- | -------------- | ------------ |
30
- | **Level 1** - Metadata | Always | ~100 tokens |
31
- | **Level 2** - SKILL.md body | When triggered | <5k tokens |
32
- | **Level 3** - Bundled files | As needed | Unlimited |
33
-
34
- **Key principle**: Keep Level 1 & 2 lean. Move details to Level 3.
35
-
36
- ## CLI Commands
37
-
38
- ### init - Create Skill
39
-
40
- ```bash
41
- npx claude-skills init --name skill-name \
42
- --description "Brief description with trigger keywords"
43
- ```
44
-
45
- Creates: `SKILL.md`, `README.md`, `references/`
46
-
47
- ### validate - Check Quality
48
-
49
- ```bash
50
- npx claude-skills validate .claude/skills/skill-name
51
- npx claude-skills validate .claude/skills/skill-name --strict
52
- ```
53
-
54
- Checks progressive disclosure compliance.
55
-
56
- ### package - Create Zip
57
-
58
- ```bash
59
- npx claude-skills package .claude/skills/skill-name
60
- ```
61
-
62
- Creates uploadable zip for Claude.ai or API.
63
-
64
- ## Writing Tips
65
-
66
- **Level 1 (Description)**:
67
-
68
- - Format: `[Tech] + [Operations] + [Trigger]`
69
- - Target: <200 chars
70
- - Include: "Use when...", "Use for...", "Use to..."
71
-
72
- **Level 2 (SKILL.md Body)**:
73
-
74
- - Target: ~50 lines
75
- - Structure: Quick Start, Core Patterns (3-5), Links to references
76
- - Voice: Imperative ("Use X"), not second person ("You should use X")
77
-
78
- **Level 3 (References)**:
79
-
80
- - Move detailed docs to `references/`
81
- - Link from SKILL.md
82
- - Unlimited size
83
-
84
- ## Reference Documentation
85
-
86
- For detailed guidance:
87
-
88
- - [cli-reference.md](references/cli-reference.md) - Complete CLI commands and options
89
- - [cli-feedback.md](references/cli-feedback.md) - Real-world usage patterns and tips
90
- - [anthropic-resources.md](references/anthropic-resources.md) - Official Anthropic best practices
91
- - [writing-guide.md](references/writing-guide.md) - Voice, structure, and code examples
92
- - [skill-examples.md](references/skill-examples.md) - Example skills and patterns
93
-
94
- ## Notes
95
-
96
- - Skills are iterative - start minimal, refine based on usage
97
- - Description drives discovery - make it keyword-rich
98
- - Validate frequently during development
99
- - Test in real conversations
100
-
101
- <!--
102
- PROGRESSIVE DISCLOSURE:
103
- - This is Level 2 - keep lean and scannable
104
- - Move detailed content to references/
105
- - Target: ~50 lines for optimal scannability
106
- -->