claude-skills-cli 0.0.6 → 0.0.8

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 (42) hide show
  1. package/README.md +49 -9
  2. package/dist/commands/doctor.js +128 -0
  3. package/dist/commands/doctor.js.map +1 -0
  4. package/dist/commands/init.js +5 -3
  5. package/dist/commands/init.js.map +1 -1
  6. package/dist/commands/install.js +1 -1
  7. package/dist/commands/install.js.map +1 -1
  8. package/dist/commands/stats.js +1 -1
  9. package/dist/commands/stats.js.map +1 -1
  10. package/dist/commands/validate.js +24 -3
  11. package/dist/commands/validate.js.map +1 -1
  12. package/dist/commands/watch.js +82 -0
  13. package/dist/commands/watch.js.map +1 -0
  14. package/dist/core/templates.js +18 -0
  15. package/dist/core/templates.js.map +1 -1
  16. package/dist/core/validator.js +174 -321
  17. package/dist/core/validator.js.map +1 -1
  18. package/dist/index.js +38 -12
  19. package/dist/index.js.map +1 -1
  20. package/dist/skills/skill-creator/SKILL.md +28 -112
  21. package/dist/skills/skill-creator/references/cli-reference.md +152 -38
  22. package/dist/skills/skill-creator/references/development-process.md +208 -0
  23. package/dist/skills/skill-creator/references/skill-examples.md +1 -1
  24. package/dist/validators/alignment-validator.js +54 -0
  25. package/dist/validators/alignment-validator.js.map +1 -0
  26. package/dist/validators/content-validator.js +144 -0
  27. package/dist/validators/content-validator.js.map +1 -0
  28. package/dist/validators/description-validator.js +136 -0
  29. package/dist/validators/description-validator.js.map +1 -0
  30. package/dist/validators/file-structure-validator.js +125 -0
  31. package/dist/validators/file-structure-validator.js.map +1 -0
  32. package/dist/validators/frontmatter-validator.js +165 -0
  33. package/dist/validators/frontmatter-validator.js.map +1 -0
  34. package/dist/validators/references-validator.js +125 -0
  35. package/dist/validators/references-validator.js.map +1 -0
  36. package/dist/validators/text-analysis.js +71 -0
  37. package/dist/validators/text-analysis.js.map +1 -0
  38. package/docs/prompt-that-started-it-all.md +19 -0
  39. package/package.json +3 -3
  40. package/docs/SKILL-DEVELOPMENT.md +0 -460
  41. package/docs/SKILL-EXAMPLES.md +0 -528
  42. package/docs/SKILLS-ARCHITECTURE.md +0 -381
@@ -1,528 +0,0 @@
1
- # Skill Examples
2
-
3
- Real-world examples from Anthropic's Skills repository and Claude
4
- Cookbooks, with analysis of what makes them effective.
5
-
6
- ---
7
-
8
- ## Example 1: Brand Guidelines Skill
9
-
10
- ### Structure
11
-
12
- ```
13
- applying-brand-guidelines/
14
- ├── SKILL.md
15
- └── scripts/
16
- ├── apply_brand.js
17
- └── validate_brand.js
18
- ```
19
-
20
- ### SKILL.md Frontmatter
21
-
22
- ```yaml
23
- ---
24
- name: applying-brand-guidelines
25
- description:
26
- This skill applies consistent corporate branding and styling to all
27
- generated documents including colors, fonts, layouts, and messaging
28
- ---
29
- ```
30
-
31
- ### What Makes It Good
32
-
33
- **✅ Clear Scope**: Focuses on one thing - brand consistency across
34
- documents
35
-
36
- **✅ Actionable Content**: Specific hex codes, font sizes, spacing
37
- rules
38
-
39
- ```markdown
40
- ### Color Palette
41
-
42
- - **Primary Blue**: #0066CC (RGB: 0, 102, 204)
43
- - **Navy**: #003366 (RGB: 0, 51, 102)
44
- ```
45
-
46
- **✅ Executable Scripts**: Validation doesn't need manual checking
47
-
48
- ```javascript
49
- // scripts/validate_brand.js
50
- // Checks documents for brand compliance automatically
51
- ```
52
-
53
- **✅ "When to Use" in Description**: "applies consistent corporate
54
- branding...to all generated documents"
55
-
56
- ### Key Takeaway
57
-
58
- Brand guidelines are perfect for skills because they're:
59
-
60
- - Repeatedly needed across documents
61
- - Specific and rule-based
62
- - Easy to validate programmatically
63
-
64
- ---
65
-
66
- ## Example 2: PDF Processing Skill
67
-
68
- ### Structure
69
-
70
- ```
71
- pdf/
72
- ├── SKILL.md
73
- ├── references/
74
- │ ├── forms.md
75
- │ └── reference.md
76
- └── scripts/
77
- └── extract_fields.js
78
- ```
79
-
80
- ### SKILL.md Excerpt
81
-
82
- ````markdown
83
- ---
84
- name: pdf
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.
89
- ---
90
-
91
- # PDF Processing
92
-
93
- ## Quick Start
94
-
95
- Use pdf-parse to extract text from PDFs:
96
-
97
- ```javascript
98
- const fs = require('fs');
99
- const pdf = require('pdf-parse');
100
-
101
- const dataBuffer = fs.readFileSync('document.pdf');
102
- pdf(dataBuffer).then((data) => {
103
- console.log(data.text);
104
- });
105
- ```
106
- ````
107
-
108
- For advanced form filling, see [forms.md](forms.md).
109
-
110
- ```
111
-
112
- ### What Makes It Good
113
-
114
- **✅ Progressive Disclosure**: Core pattern in SKILL.md, details in forms.md
115
-
116
- **✅ Keyword-Rich Description**: "PDFs, forms, document extraction" helps Claude recognize when to use it
117
-
118
- **✅ Script for Efficiency**: Form field extraction is deterministic, runs without loading into context
119
-
120
- **✅ Separation of Concerns**:
121
- - SKILL.md: Common operations
122
- - forms.md: Specialized form-filling
123
- - reference.md: Complete API docs
124
-
125
- ### Key Takeaway
126
- Large domains benefit from splitting:
127
- - Quick reference in SKILL.md
128
- - Specialized topics in references/
129
- - Deterministic operations in scripts/
130
-
131
- ---
132
-
133
- ## Example 3: Financial Analyzer Skill
134
-
135
- ### Structure (from Claude Cookbooks)
136
- ```
137
-
138
- financial-analyzer/ ├── SKILL.md ├── references/ │ ├── formulas.md │
139
- └── ratios-reference.md └── scripts/ ├── calculate_ratios.js └──
140
- generate_dashboard.js
141
-
142
- ````
143
-
144
- ### SKILL.md Pattern
145
- ```markdown
146
- ---
147
- name: financial-analyzer
148
- description: Calculate financial ratios, analyze statements, and generate performance reports. Use when working with financial data, income statements, balance sheets, or cash flow analysis.
149
- ---
150
-
151
- # Financial Analyzer
152
-
153
- ## Core Ratios
154
-
155
- ### Liquidity Ratios
156
-
157
- **Current Ratio**:
158
- ```javascript
159
- const currentRatio = currentAssets / currentLiabilities;
160
- ````
161
-
162
- **Quick Ratio**:
163
-
164
- ```javascript
165
- const quickRatio = (currentAssets - inventory) / currentLiabilities;
166
- ```
167
-
168
- For complete ratio formulas, see
169
- [references/formulas.md](references/formulas.md).
170
-
171
- ````
172
-
173
- ### What Makes It Good
174
-
175
- **✅ Domain-Specific**: Tailored to financial analysis
176
-
177
- **✅ Executable Calculations**: Scripts provide exact formulas
178
- ```javascript
179
- // scripts/calculate_ratios.js
180
- // Runs calculations without Claude generating code each time
181
- ````
182
-
183
- **✅ References for Detail**: Full formula explanations in references/
184
-
185
- **✅ Real Use Case**: Based on actual business needs
186
-
187
- ### Key Takeaway
188
-
189
- Domain expertise skills should:
190
-
191
- - Provide quick formulas in SKILL.md
192
- - Include detailed theory in references/
193
- - Offer scripts for exact calculations
194
- - Use industry-standard terminology
195
-
196
- ---
197
-
198
- ## Example 4: Database Schema Skill
199
-
200
- ### Structure (hypothetical, based on patterns)
201
-
202
- ```
203
- database-schema/
204
- ├── SKILL.md
205
- └── references/
206
- ├── schema.md
207
- ├── relationships.md
208
- └── indexes.md
209
- ```
210
-
211
- ### SKILL.md Pattern
212
-
213
- ````markdown
214
- ---
215
- name: database-schema
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.
220
- ---
221
-
222
- # Database Schema
223
-
224
- ## Quick Reference
225
-
226
- **Core Tables**:
227
-
228
- - `users`: User accounts and authentication
229
- - `contacts`: Contact management
230
- - `companies`: Company records
231
- - `interactions`: Communication history
232
-
233
- ## Common Patterns
234
-
235
- ### User-scoped Queries
236
-
237
- ```sql
238
- -- Always include user_id for row-level security
239
- SELECT * FROM contacts WHERE user_id = ? AND id = ?
240
- ```
241
- ````
242
-
243
- For complete schema with all columns and relationships:
244
-
245
- - [references/schema.md](references/schema.md)
246
- - [references/relationships.md](references/relationships.md)
247
-
248
- ```
249
-
250
- ### What Makes It Good
251
-
252
- **✅ Quick Reference**: Common patterns immediately available
253
-
254
- **✅ Detailed Schema**: Complete table definitions in references
255
-
256
- **✅ Security Patterns**: Highlights important conventions (user_id checks)
257
-
258
- **✅ Navigable**: Links to specific reference files
259
-
260
- ### Key Takeaway
261
- Reference-heavy skills should:
262
- - Provide navigation in SKILL.md
263
- - Include most common patterns inline
264
- - Move exhaustive details to references/
265
- - Group related content logically
266
-
267
- ---
268
-
269
- ## Example 5: React Component Library Skill
270
-
271
- ### Structure (from Anthropic examples)
272
- ```
273
-
274
- component-library/ ├── SKILL.md ├── references/ │ ├──
275
- button-variants.md │ ├── form-patterns.md │ └── layout-components.md
276
- └── assets/ └── component-templates/ ├── button.tsx └── form.tsx
277
-
278
- ````
279
-
280
- ### SKILL.md Pattern
281
- ```markdown
282
- ---
283
- name: component-library
284
- description: Reusable React component patterns with TypeScript, proper props interfaces, and accessibility features. Use when creating new components, refactoring UI, or implementing consistent design patterns.
285
- ---
286
-
287
- # Component Library
288
-
289
- ## Basic Component Template
290
-
291
- ```tsx
292
- interface Props {
293
- title: string;
294
- onClick?: () => void;
295
- }
296
-
297
- export const Component = ({ title, onClick }: Props) => {
298
- return <button onClick={onClick}>{title}</button>;
299
- };
300
- ````
301
-
302
- ## Component Catalog
303
-
304
- For complete component examples:
305
-
306
- - [references/button-variants.md](references/button-variants.md)
307
- - [references/form-patterns.md](references/form-patterns.md)
308
-
309
- ```
310
-
311
- ### What Makes It Good
312
-
313
- **✅ Template Pattern**: Basic template in SKILL.md
314
-
315
- **✅ Assets for Boilerplate**: Complete components in assets/
316
-
317
- **✅ Categorized References**: Organized by component type
318
-
319
- **✅ Type Safety**: Shows proper TypeScript patterns
320
-
321
- ### Key Takeaway
322
- Component library skills should:
323
- - Provide basic template in SKILL.md
324
- - Organize components by category in references/
325
- - Include full examples in assets/
326
- - Show type definitions and best practices
327
-
328
- ---
329
-
330
- ## Example 6: API Integration Skill
331
-
332
- ### Structure
333
- ```
334
-
335
- github-api/ ├── SKILL.md ├── references/ │ ├── endpoints.md │ ├──
336
- authentication.md │ └── rate-limits.md └── scripts/ ├──
337
- test_connection.js └── check_rate_limit.js
338
-
339
- ````
340
-
341
- ### SKILL.md Pattern
342
- ```markdown
343
- ---
344
- name: github-api
345
- description: GitHub API integration patterns including authentication, rate limiting, and common endpoints. Use when fetching GitHub data, implementing OAuth, or working with GitHub profiles and repositories.
346
- ---
347
-
348
- # GitHub API Integration
349
-
350
- ## Authentication
351
-
352
- ```typescript
353
- const response = await fetch('https://api.github.com/user', {
354
- headers: {
355
- 'Authorization': `Bearer ${GITHUB_TOKEN}`,
356
- 'Accept': 'application/vnd.github.v3+json',
357
- },
358
- });
359
- ````
360
-
361
- ## Rate Limiting
362
-
363
- Check rate limits before making requests:
364
-
365
- ```bash
366
- node scripts/check_rate_limit.js
367
- ```
368
-
369
- For complete API reference, see
370
- [references/endpoints.md](references/endpoints.md).
371
-
372
- ````
373
-
374
- ### What Makes It Good
375
-
376
- **✅ Practical Examples**: Real auth code, not theory
377
-
378
- **✅ Operational Scripts**: Rate limit checking is utility
379
-
380
- **✅ Reference for Exhaustive**: Full endpoint docs in references/
381
-
382
- **✅ Common Pitfalls**: Highlights rate limiting upfront
383
-
384
- ### Key Takeaway
385
- API integration skills should:
386
- - Show authentication patterns immediately
387
- - Include operational utilities (rate checks, health checks)
388
- - Document endpoints in references/
389
- - Highlight common pitfalls (rate limits, errors)
390
-
391
- ---
392
-
393
- ## Anti-Patterns to Avoid
394
-
395
- ### ❌ Anti-Pattern 1: Generic Descriptions
396
- ```yaml
397
- ---
398
- name: database-helper
399
- description: Helps with database operations
400
- ---
401
- ````
402
-
403
- **Problem**: Too vague, Claude won't know when to use it
404
-
405
- **Fix**: Be specific
406
-
407
- ```yaml
408
- ---
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.
413
- ---
414
- ```
415
-
416
- ### ❌ Anti-Pattern 2: Everything in SKILL.md
417
-
418
- ```markdown
419
- # Database Skill
420
-
421
- ## Complete Schema (500 lines)
422
-
423
- ## All Query Examples (1000 lines)
424
-
425
- ## Migration History (300 lines)
426
- ```
427
-
428
- **Problem**: Bloated, uses excessive tokens
429
-
430
- **Fix**: Progressive disclosure
431
-
432
- ```markdown
433
- # Database Skill
434
-
435
- ## Quick Reference
436
-
437
- [10 common patterns]
438
-
439
- For complete schema: [references/schema.md](references/schema.md) For
440
- all examples: [references/queries.md](references/queries.md)
441
- ```
442
-
443
- ### ❌ Anti-Pattern 3: Using Second Person
444
-
445
- ```markdown
446
- You should use prepared statements when querying...
447
- ```
448
-
449
- **Problem**: Wrong voice for AI instructions
450
-
451
- **Fix**: Imperative
452
-
453
- ```markdown
454
- Use prepared statements for all queries:
455
- ```
456
-
457
- ### ❌ Anti-Pattern 4: Missing "When to Use"
458
-
459
- ```yaml
460
- ---
461
- name: forms
462
- description: Handle form submissions
463
- ---
464
- ```
465
-
466
- **Problem**: Claude won't know when this applies
467
-
468
- **Fix**: Include triggers
469
-
470
- ```yaml
471
- ---
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.
476
- ---
477
- ```
478
-
479
- ---
480
-
481
- ## Skill Composition Examples
482
-
483
- ### Example: Multi-Skill Workflow
484
-
485
- **User Request**: "Create a GitHub contact dashboard with database
486
- stats"
487
-
488
- **Skills Activated**:
489
-
490
- 1. `database-patterns` - Query contacts table
491
- 2. `github-integration` - Fetch GitHub profiles
492
- 3. `sveltekit-patterns` - Build component structure
493
- 4. `daisyui-conventions` - Apply styling
494
-
495
- **Why This Works**: Each skill handles its domain, Claude composes
496
- them naturally.
497
-
498
- ---
499
-
500
- ## Key Lessons
501
-
502
- ### From Anthropic Skills
503
-
504
- 1. **Metadata drives discovery** - Spend time on descriptions
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
509
- 4. **References for depth** - Keep SKILL.md navigable
510
- 5. **Real examples** - Pull from actual codebases
511
-
512
- ### From Community Skills
513
-
514
- 1. **Domain expertise shines** - General skills are less useful
515
- 2. **Composition is powerful** - Skills work together automatically
516
- 3. **Validation matters** - Scripts catch errors early
517
- 4. **Iteration is key** - Skills improve with real usage
518
- 5. **Specificity wins** - Vague descriptions don't trigger
519
-
520
- ---
521
-
522
- ## Next Steps
523
-
524
- - Apply these patterns to devhub-crm skills
525
- - Study Anthropic's skills repo for more examples
526
- - Test skills with real conversations
527
- - Iterate based on actual usage
528
- - Share successful patterns with team