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