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
@@ -6,7 +6,8 @@ Real examples showing effective skill patterns using TypeScript/Node.
6
6
 
7
7
  ### Use Case
8
8
 
9
- Repeatedly making authenticated API requests with TypeScript types and error handling.
9
+ Repeatedly making authenticated API requests with TypeScript types and
10
+ error handling.
10
11
 
11
12
  ### Structure
12
13
 
@@ -27,7 +28,10 @@ api-client/
27
28
  ````markdown
28
29
  ---
29
30
  name: api-client
30
- description: REST API client with TypeScript types for user and data endpoints. Use when making HTTP requests, handling authentication, managing API errors, or working with async operations.
31
+ description:
32
+ REST API client with TypeScript types for user and data endpoints.
33
+ Use when making HTTP requests, handling authentication, managing API
34
+ errors, or working with async operations.
31
35
  ---
32
36
 
33
37
  # API Client
@@ -42,7 +46,8 @@ const user = await apiClient.get<User>(`/users/${id}`);
42
46
  ```
43
47
  ````
44
48
 
45
- For complete endpoint docs: [references/endpoints.md](references/endpoints.md)
49
+ For complete endpoint docs:
50
+ [references/endpoints.md](references/endpoints.md)
46
51
 
47
52
  ```
48
53
 
@@ -63,16 +68,11 @@ Creating type-safe React components with hooks and TypeScript interfaces.
63
68
  ### Structure
64
69
  ```
65
70
 
66
- react-patterns/
67
- ├── SKILL.md # Core patterns and conventions
68
- ├── references/
69
- ├── component-library.md # Catalog of existing components
70
- ├── hooks-patterns.md # Custom hooks and state management
71
- │ └── routing-patterns.md # React Router conventions
72
- └── assets/
73
- └── component-templates/
74
- ├── basic-component.tsx
75
- ├── form-component.tsx
71
+ react-patterns/ ├── SKILL.md # Core patterns and conventions ├──
72
+ references/ │ ├── component-library.md # Catalog of existing
73
+ components │ ├── hooks-patterns.md # Custom hooks and state management
74
+ └── routing-patterns.md # React Router conventions └── assets/ └──
75
+ component-templates/ ├── basic-component.tsx ├── form-component.tsx
76
76
  └── list-component.tsx
77
77
 
78
78
  ````
@@ -108,7 +108,8 @@ export function Card({ title, items }: CardProps) {
108
108
  }
109
109
  ````
110
110
 
111
- For complete component library: [references/component-library.md](references/component-library.md)
111
+ For complete component library:
112
+ [references/component-library.md](references/component-library.md)
112
113
 
113
114
  ```
114
115
 
@@ -129,14 +130,11 @@ Implementing GitHub OAuth, fetching profiles, managing connections.
129
130
  ### Structure
130
131
  ```
131
132
 
132
- github-integration/
133
- ├── SKILL.md # Auth patterns, common operations
134
- ├── references/
135
- │ ├── api-endpoints.md # GitHub API reference
136
- │ └── oauth-flow.md # Complete OAuth implementation
137
- └── scripts/
138
- ├── test_connection.js # Validate GitHub credentials
139
- └── check_rate_limit.js # Monitor API usage
133
+ github-integration/ ├── SKILL.md # Auth patterns, common operations
134
+ ├── references/ │ ├── api-endpoints.md # GitHub API reference │ └──
135
+ oauth-flow.md # Complete OAuth implementation └── scripts/ ├──
136
+ test_connection.js # Validate GitHub credentials └──
137
+ check_rate_limit.js # Monitor API usage
140
138
 
141
139
  ````
142
140
 
@@ -183,13 +181,10 @@ Consistent component styling, theme usage, form patterns.
183
181
  ### Structure
184
182
  ```
185
183
 
186
- daisyui-conventions/
187
- ├── SKILL.md # Core components and patterns
188
- ├── references/
189
- │ ├── component-reference.md # All DaisyUI components
190
- │ └── theme-tokens.md # Color system and usage
191
- └── assets/
192
- └── theme-preview.html # Visual reference
184
+ daisyui-conventions/ ├── SKILL.md # Core components and patterns ├──
185
+ references/ │ ├── component-reference.md # All DaisyUI components
186
+ └── theme-tokens.md # Color system and usage └── assets/ └──
187
+ theme-preview.html # Visual reference
193
188
 
194
189
  ````
195
190
 
@@ -213,7 +208,8 @@ description: DaisyUI v5 component styling for cards, forms, buttons, and layouts
213
208
  </div>
214
209
  ````
215
210
 
216
- For all components: [references/component-reference.md](references/component-reference.md)
211
+ For all components:
212
+ [references/component-reference.md](references/component-reference.md)
217
213
 
218
214
  ````
219
215
 
@@ -242,7 +238,10 @@ description: Helps with API stuff
242
238
  ### After (Specific)
243
239
 
244
240
  ```yaml
245
- description: REST API client with TypeScript types for user and data endpoints. Use when making HTTP requests, handling authentication, managing API errors, or working with async operations.
241
+ description:
242
+ REST API client with TypeScript types for user and data endpoints.
243
+ Use when making HTTP requests, handling authentication, managing API
244
+ errors, or working with async operations.
246
245
  ```
247
246
 
248
247
  ---
@@ -282,9 +281,8 @@ description: [50-100 words with keywords]
282
281
  ### Without Script
283
282
 
284
283
  ```markdown
285
- Claude generates validation code every time:
286
- "Check that all timestamps are valid..."
287
- [Claude writes 50 lines of JavaScript]
284
+ Claude generates validation code every time: "Check that all
285
+ timestamps are valid..." [Claude writes 50 lines of JavaScript]
288
286
  ```
289
287
 
290
288
  **Cost**: ~500 tokens each time
@@ -311,8 +309,8 @@ node scripts/validate_timestamps.js
311
309
  ### Without Assets
312
310
 
313
311
  ```markdown
314
- "Create a basic Svelte component..."
315
- [Claude writes boilerplate each time]
312
+ "Create a basic Svelte component..." [Claude writes boilerplate each
313
+ time]
316
314
  ```
317
315
 
318
316
  ### With Assets
@@ -374,7 +372,8 @@ description: Helps with frontend stuff
374
372
 
375
373
  ## Skill Composition Example
376
374
 
377
- **User Request**: "Create a user profile card with API data and styling"
375
+ **User Request**: "Create a user profile card with API data and
376
+ styling"
378
377
 
379
378
  **Skills Activated**:
380
379
 
@@ -406,6 +405,9 @@ Before considering a skill "done":
406
405
 
407
406
  ## Resources
408
407
 
409
- - See main [SKILLS-ARCHITECTURE.md](../../../docs/SKILLS-ARCHITECTURE.md) for system design
410
- - See [SKILL-EXAMPLES.md](../../../docs/SKILL-EXAMPLES.md) for Anthropic examples
408
+ - See main
409
+ [SKILLS-ARCHITECTURE.md](../../../docs/SKILLS-ARCHITECTURE.md) for
410
+ system design
411
+ - See [SKILL-EXAMPLES.md](../../../docs/SKILL-EXAMPLES.md) for
412
+ Anthropic examples
411
413
  - See skill-creator SKILL.md for 6-step process
@@ -11,19 +11,17 @@ Claude responds best to direct instructions.
11
11
  #### ✅ Good Examples
12
12
 
13
13
  ```markdown
14
- Use prepared statements for all database queries.
15
- Generate IDs with nanoid() before inserting records.
16
- Store timestamps as Unix epoch milliseconds.
17
- Validate input before saving to database.
14
+ Use prepared statements for all database queries. Generate IDs with
15
+ nanoid() before inserting records. Store timestamps as Unix epoch
16
+ milliseconds. Validate input before saving to database.
18
17
  ```
19
18
 
20
19
  #### ❌ Bad Examples
21
20
 
22
21
  ```markdown
23
- You should use prepared statements for database queries.
24
- You'll want to generate IDs with nanoid().
25
- It's best if you store timestamps as Unix epoch.
26
- Try to validate input before saving.
22
+ You should use prepared statements for database queries. You'll want
23
+ to generate IDs with nanoid(). It's best if you store timestamps as
24
+ Unix epoch. Try to validate input before saving.
27
25
  ```
28
26
 
29
27
  ### Be Specific, Not Vague
@@ -42,9 +40,9 @@ const timestamp = new Date().toISOString();
42
40
 
43
41
  // Use type-safe interfaces
44
42
  interface User {
45
- id: string;
46
- name: string;
47
- email: string;
43
+ id: string;
44
+ name: string;
45
+ email: string;
48
46
  }
49
47
  ```
50
48
 
@@ -79,15 +77,16 @@ To fetch user data:
79
77
  #### ❌ Bad (Conceptual)
80
78
 
81
79
  ```markdown
82
- When thinking about API design, consider REST principles
83
- and how architectural patterns affect your implementation...
80
+ When thinking about API design, consider REST principles and how
81
+ architectural patterns affect your implementation...
84
82
  ```
85
83
 
86
84
  ---
87
85
 
88
86
  ## Description Writing
89
87
 
90
- The description determines when Claude triggers your skill. Make it count.
88
+ The description determines when Claude triggers your skill. Make it
89
+ count.
91
90
 
92
91
  ### Description Formula
93
92
 
@@ -100,7 +99,10 @@ The description determines when Claude triggers your skill. Make it count.
100
99
  #### API Client Skill
101
100
 
102
101
  ```yaml
103
- description: REST API client for user data endpoints with TypeScript types. Use when making HTTP requests, handling authentication, or working with API responses and error handling.
102
+ description:
103
+ REST API client for user data endpoints with TypeScript types. Use
104
+ when making HTTP requests, handling authentication, or working with
105
+ API responses and error handling.
104
106
  ```
105
107
 
106
108
  **Breakdown**:
@@ -113,7 +115,10 @@ description: REST API client for user data endpoints with TypeScript types. Use
113
115
  #### Component Skill
114
116
 
115
117
  ```yaml
116
- description: Create type-safe React components with hooks and TypeScript interfaces. Use when building UI components, implementing forms, or managing component state and props.
118
+ description:
119
+ Create type-safe React components with hooks and TypeScript
120
+ interfaces. Use when building UI components, implementing forms, or
121
+ managing component state and props.
117
122
  ```
118
123
 
119
124
  **Breakdown**:
@@ -182,10 +187,10 @@ const users = await apiClient.get<User[]>('/users');
182
187
 
183
188
  ```typescript
184
189
  const newUser = await apiClient.post<User>('/users', {
185
- id: nanoid(),
186
- name: 'John Doe',
187
- email: 'john@example.com',
188
- createdAt: new Date().toISOString(),
190
+ id: nanoid(),
191
+ name: 'John Doe',
192
+ email: 'john@example.com',
193
+ createdAt: new Date().toISOString(),
189
194
  });
190
195
  ```
191
196
 
@@ -231,10 +236,10 @@ Pull examples from actual codebase, not invented scenarios.
231
236
  ```typescript
232
237
  // From src/lib/api/users.ts
233
238
  const response = await fetch(`${API_BASE}/users/${userId}/stats`, {
234
- headers: {
235
- Authorization: `Bearer ${token}`,
236
- 'Content-Type': 'application/json',
237
- },
239
+ headers: {
240
+ Authorization: `Bearer ${token}`,
241
+ 'Content-Type': 'application/json',
242
+ },
238
243
  });
239
244
  const stats = (await response.json()) as UserStats;
240
245
  ```
@@ -256,15 +261,17 @@ import { nanoid } from 'nanoid';
256
261
  import type { User, CreateUserRequest } from './types';
257
262
  import { apiClient } from './client';
258
263
 
259
- const createUser = async (request: CreateUserRequest): Promise<User> => {
260
- const user: User = {
261
- id: nanoid(),
262
- ...request,
263
- createdAt: new Date().toISOString(),
264
- };
265
-
266
- const response = await apiClient.post<User>('/users', user);
267
- return response.data;
264
+ const createUser = async (
265
+ request: CreateUserRequest,
266
+ ): Promise<User> => {
267
+ const user: User = {
268
+ id: nanoid(),
269
+ ...request,
270
+ createdAt: new Date().toISOString(),
271
+ };
272
+
273
+ const response = await apiClient.post<User>('/users', user);
274
+ return response.data;
268
275
  };
269
276
  ```
270
277
 
@@ -364,7 +371,8 @@ For 20+ common query patterns including joins and aggregations:
364
371
  Not just:
365
372
 
366
373
  ```markdown
367
- See [schema.md](references/schema.md) and [examples](references/query-examples.md).
374
+ See [schema.md](references/schema.md) and
375
+ [examples](references/query-examples.md).
368
376
  ```
369
377
 
370
378
  ---
@@ -405,27 +413,27 @@ Create scripts for:
405
413
  import { parseArgs } from 'node:util';
406
414
 
407
415
  async function main() {
408
- const { values } = parseArgs({
409
- options: {
410
- verbose: { type: 'boolean', default: false },
411
- file: { type: 'string' },
412
- 'check-all': { type: 'boolean', default: false },
413
- },
414
- });
415
-
416
- try {
417
- const result = await performOperation(values);
418
- console.log(`✅ Success: ${result}`);
419
- process.exit(0);
420
- } catch (error) {
421
- console.error(`❌ Error: ${error.message}`);
422
- process.exit(1);
423
- }
416
+ const { values } = parseArgs({
417
+ options: {
418
+ verbose: { type: 'boolean', default: false },
419
+ file: { type: 'string' },
420
+ 'check-all': { type: 'boolean', default: false },
421
+ },
422
+ });
423
+
424
+ try {
425
+ const result = await performOperation(values);
426
+ console.log(`✅ Success: ${result}`);
427
+ process.exit(0);
428
+ } catch (error) {
429
+ console.error(`❌ Error: ${error.message}`);
430
+ process.exit(1);
431
+ }
424
432
  }
425
433
 
426
434
  async function performOperation(options) {
427
- // Main logic here
428
- return 'Operation completed';
435
+ // Main logic here
436
+ return 'Operation completed';
429
437
  }
430
438
 
431
439
  main();
@@ -545,7 +553,7 @@ Include authentication tokens in all API requests:
545
553
 
546
554
  ```typescript
547
555
  const response = await fetch(url, {
548
- headers: { Authorization: `Bearer ${token}` },
556
+ headers: { Authorization: `Bearer ${token}` },
549
557
  });
550
558
  ```
551
559
  ````
@@ -604,6 +612,8 @@ Before finalizing a skill:
604
612
 
605
613
  ## Resources
606
614
 
607
- - [SKILLS-ARCHITECTURE.md](../../../docs/SKILLS-ARCHITECTURE.md) - System overview
608
- - [SKILL-DEVELOPMENT.md](../../../docs/SKILL-DEVELOPMENT.md) - Development workflow
615
+ - [SKILLS-ARCHITECTURE.md](../../../docs/SKILLS-ARCHITECTURE.md) -
616
+ System overview
617
+ - [SKILL-DEVELOPMENT.md](../../../docs/SKILL-DEVELOPMENT.md) -
618
+ Development workflow
609
619
  - [SKILL-EXAMPLES.md](../../../docs/SKILL-EXAMPLES.md) - Real examples
@@ -0,0 +1,143 @@
1
+ ---
2
+ name: skill-creator
3
+ description:
4
+ Design and create Claude Skills using progressive disclosure
5
+ principles. Use when building new skills, planning skill
6
+ architecture, or writing skill content.
7
+ ---
8
+
9
+ # Skill Creator
10
+
11
+ Principles and patterns for designing effective Claude Skills.
12
+
13
+ ## Quick Start
14
+
15
+ Creating a minimal skill:
16
+
17
+ 1. Create directory: `.claude/skills/my-skill/`
18
+ 2. Create `SKILL.md` with frontmatter (name, description) and body
19
+ 3. Test in conversation
20
+ 4. Add references/ as content grows
21
+
22
+ ## When to Create a Skill
23
+
24
+ Create a skill when you notice:
25
+
26
+ - **Repeating context** across conversations (same schema, patterns,
27
+ rules)
28
+ - **Domain expertise** needed repeatedly (API integration, framework
29
+ conventions)
30
+ - **Project-specific knowledge** that Claude should know automatically
31
+
32
+ Example: "I keep explaining this database schema" → Create a
33
+ database-schema skill.
34
+
35
+ ## Skill Architecture
36
+
37
+ Skills are directories with this structure:
38
+
39
+ ```
40
+ my-skill/
41
+ ├── SKILL.md # Required: Instructions + metadata
42
+ ├── references/ # Optional: Detailed documentation
43
+ ├── scripts/ # Optional: Executable operations
44
+ └── assets/ # Optional: Templates, images, files
45
+ ```
46
+
47
+ **SKILL.md** - Core instructions with YAML frontmatter (name,
48
+ description) + markdown body
49
+
50
+ **references/** - Detailed docs loaded only when Claude needs them
51
+ (schemas, API docs, guides)
52
+
53
+ **scripts/** - Deterministic operations Claude can execute without
54
+ generating code (validation, generation)
55
+
56
+ **assets/** - Files used directly in output without loading into
57
+ context (templates, images)
58
+
59
+ ## Progressive Disclosure
60
+
61
+ Skills load in 3 levels:
62
+
63
+ **Level 1: Metadata** (~100 tokens, always loaded) - YAML frontmatter
64
+ determines skill triggering
65
+
66
+ **Level 2: Instructions** (<5k tokens, when triggered) - SKILL.md body
67
+ with core patterns and links
68
+
69
+ **Level 3: Resources** (unlimited, as needed) - references/ scripts/
70
+ assets/ loaded only when used
71
+
72
+ **Key principle**: Keep Levels 1 & 2 lean. Move details to Level 3.
73
+
74
+ ## Development Process
75
+
76
+ 1. **Recognize** - Notice repeated context or domain needs
77
+ 2. **Gather** - Collect 3-5 concrete examples of skill usage
78
+ 3. **Plan** - Decide what goes in SKILL.md vs references/ vs scripts/
79
+ 4. **Structure** - Create directory with SKILL.md and needed
80
+ subdirectories
81
+ 5. **Write** - Craft description, then SKILL.md body following
82
+ patterns
83
+ 6. **Enhance** - Add references, scripts, assets as needed
84
+ 7. **Iterate** - Test in conversations, refine based on actual usage
85
+
86
+ ## Writing Effective Content
87
+
88
+ **Descriptions**: Include "Use when..." triggers, <200 chars optimal.
89
+ Format: [Domain] + [Operations] + [Trigger keywords]
90
+
91
+ **SKILL.md Body**: Target ~50 lines, max ~150. Structure: Quick
92
+ Start + Core Patterns (3-5) + Links. Use imperative voice, concrete
93
+ examples.
94
+
95
+ **References**: Detailed docs with no size limit. Use descriptive
96
+ filenames.
97
+
98
+ ## Common Patterns
99
+
100
+ **Succeeds**: Domain expertise, concrete examples, keyword-rich
101
+ descriptions, clear triggers, scripts for deterministic tasks
102
+
103
+ **Fails**: Generic descriptions, bloated SKILL.md, second person
104
+ voice, missing triggers, vague content
105
+
106
+ See [skill-examples.md](references/skill-examples.md) for detailed
107
+ patterns.
108
+
109
+ ## Implementation
110
+
111
+ Skills can be created manually (mkdir, touch SKILL.md) or using tools
112
+ like `claude-skills-cli`.
113
+
114
+ For tool usage, see [cli-reference.md](references/cli-reference.md).
115
+
116
+ ## Reference Documentation
117
+
118
+ For detailed guidance:
119
+
120
+ - [anthropic-resources.md](references/anthropic-resources.md) -
121
+ Official Anthropic best practices
122
+ - [writing-guide.md](references/writing-guide.md) - Voice, structure,
123
+ and code examples
124
+ - [skill-examples.md](references/skill-examples.md) - Real-world
125
+ patterns and anti-patterns
126
+ - [cli-reference.md](references/cli-reference.md) - Tool commands
127
+ (claude-skills-cli)
128
+ - [cli-feedback.md](references/cli-feedback.md) - Real-world CLI usage
129
+ patterns
130
+
131
+ ## Notes
132
+
133
+ - Skills are iterative - start minimal, refine through real usage
134
+ - Description drives discovery - invest time in crafting it
135
+ - Test in actual conversations to validate effectiveness
136
+ - Progressive disclosure is key - resist urge to front-load everything
137
+
138
+ <!--
139
+ PROGRESSIVE DISCLOSURE:
140
+ - This is Level 2 - principles and architecture only
141
+ - Tool-specific details are in references/
142
+ - Target: ~75 lines for optimal scannability
143
+ -->