claude-skills-cli 0.0.3 → 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.
- package/README.md +59 -226
- package/dist/commands/init.js +29 -20
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/install.js +69 -0
- package/dist/commands/install.js.map +1 -0
- package/dist/commands/package.js +5 -9
- 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/commands/validate.js +1 -1
- package/dist/commands/validate.js.map +1 -1
- package/dist/core/templates.js +63 -12
- package/dist/core/templates.js.map +1 -1
- package/dist/core/validator.js +31 -10
- package/dist/core/validator.js.map +1 -1
- package/dist/index.js +28 -4
- package/dist/index.js.map +1 -1
- package/dist/skills/skill-creator/SKILL.md +143 -0
- package/dist/skills/skill-creator/references/anthropic-resources.md +504 -0
- package/dist/skills/skill-creator/references/cli-reference.md +507 -0
- package/dist/skills/skill-creator/references/skill-examples.md +413 -0
- package/{skills → dist/skills}/skill-creator/references/writing-guide.md +156 -131
- package/dist/skills/skill-creator/skill-creator/SKILL.md +143 -0
- package/dist/skills/skill-creator/skill-creator/references/anthropic-resources.md +504 -0
- package/dist/skills/skill-creator/skill-creator/references/cli-reference.md +507 -0
- package/dist/skills/skill-creator/skill-creator/references/skill-examples.md +413 -0
- package/dist/skills/skill-creator/skill-creator/references/writing-guide.md +619 -0
- package/dist/utils/fs.js +2 -2
- package/dist/utils/fs.js.map +1 -1
- package/dist/utils/output.js +2 -1
- package/dist/utils/output.js.map +1 -1
- package/docs/SKILL-DEVELOPMENT.md +38 -35
- package/docs/SKILL-EXAMPLES.md +73 -63
- package/docs/SKILLS-ARCHITECTURE.md +42 -41
- package/package.json +2 -2
- package/skills/skill-creator/SKILL.md +0 -345
- package/skills/skill-creator/references/skill-examples.md +0 -403
|
@@ -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
|
-
|
|
16
|
-
|
|
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
|
-
|
|
25
|
-
|
|
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
|
|
@@ -37,8 +35,15 @@ Provide concrete instructions, not general advice.
|
|
|
37
35
|
import { nanoid } from 'nanoid';
|
|
38
36
|
const id = nanoid();
|
|
39
37
|
|
|
40
|
-
// Store timestamps
|
|
41
|
-
const
|
|
38
|
+
// Store timestamps as ISO strings
|
|
39
|
+
const timestamp = new Date().toISOString();
|
|
40
|
+
|
|
41
|
+
// Use type-safe interfaces
|
|
42
|
+
interface User {
|
|
43
|
+
id: string;
|
|
44
|
+
name: string;
|
|
45
|
+
email: string;
|
|
46
|
+
}
|
|
42
47
|
```
|
|
43
48
|
|
|
44
49
|
#### ❌ Bad Examples
|
|
@@ -49,6 +54,9 @@ const id = generateId();
|
|
|
49
54
|
|
|
50
55
|
// Store timestamps in a suitable format
|
|
51
56
|
const created_at = getCurrentTime();
|
|
57
|
+
|
|
58
|
+
// Use appropriate types
|
|
59
|
+
const user: any;
|
|
52
60
|
```
|
|
53
61
|
|
|
54
62
|
### Avoid Conceptual Explanations
|
|
@@ -58,25 +66,27 @@ Focus on procedural steps, not theory.
|
|
|
58
66
|
#### ✅ Good (Procedural)
|
|
59
67
|
|
|
60
68
|
```markdown
|
|
61
|
-
To
|
|
69
|
+
To fetch user data:
|
|
62
70
|
|
|
63
|
-
1.
|
|
64
|
-
2.
|
|
65
|
-
3.
|
|
71
|
+
1. Import the API client
|
|
72
|
+
2. Call the endpoint with typed parameters
|
|
73
|
+
3. Handle the response with type checking
|
|
74
|
+
4. Return the typed result
|
|
66
75
|
```
|
|
67
76
|
|
|
68
77
|
#### ❌ Bad (Conceptual)
|
|
69
78
|
|
|
70
79
|
```markdown
|
|
71
|
-
When thinking about
|
|
72
|
-
|
|
80
|
+
When thinking about API design, consider REST principles and how
|
|
81
|
+
architectural patterns affect your implementation...
|
|
73
82
|
```
|
|
74
83
|
|
|
75
84
|
---
|
|
76
85
|
|
|
77
86
|
## Description Writing
|
|
78
87
|
|
|
79
|
-
The description determines when Claude triggers your skill. Make it
|
|
88
|
+
The description determines when Claude triggers your skill. Make it
|
|
89
|
+
count.
|
|
80
90
|
|
|
81
91
|
### Description Formula
|
|
82
92
|
|
|
@@ -86,30 +96,36 @@ The description determines when Claude triggers your skill. Make it count.
|
|
|
86
96
|
|
|
87
97
|
### Examples
|
|
88
98
|
|
|
89
|
-
####
|
|
99
|
+
#### API Client Skill
|
|
90
100
|
|
|
91
101
|
```yaml
|
|
92
|
-
description:
|
|
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.
|
|
93
106
|
```
|
|
94
107
|
|
|
95
108
|
**Breakdown**:
|
|
96
109
|
|
|
97
|
-
- Technology: "
|
|
98
|
-
- Operations: "
|
|
99
|
-
- Data types: "
|
|
100
|
-
- Trigger: "Use when
|
|
110
|
+
- Technology: "REST API", "TypeScript"
|
|
111
|
+
- Operations: "HTTP requests", "authentication", "error handling"
|
|
112
|
+
- Data types: "user data endpoints", "API responses"
|
|
113
|
+
- Trigger: "Use when making...or working with"
|
|
101
114
|
|
|
102
115
|
#### Component Skill
|
|
103
116
|
|
|
104
117
|
```yaml
|
|
105
|
-
description:
|
|
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.
|
|
106
122
|
```
|
|
107
123
|
|
|
108
124
|
**Breakdown**:
|
|
109
125
|
|
|
110
|
-
- Technology: "
|
|
126
|
+
- Technology: "React", "hooks", "TypeScript"
|
|
111
127
|
- Operations: "building components", "implementing forms"
|
|
112
|
-
- Data types: "
|
|
128
|
+
- Data types: "component state", "props"
|
|
113
129
|
- Trigger: "Use when building...or working with"
|
|
114
130
|
|
|
115
131
|
### Description Checklist
|
|
@@ -134,10 +150,10 @@ Show the most common operation immediately.
|
|
|
134
150
|
## Quick Start
|
|
135
151
|
|
|
136
152
|
```typescript
|
|
137
|
-
import {
|
|
153
|
+
import { apiClient } from './lib/api';
|
|
138
154
|
|
|
139
|
-
const
|
|
140
|
-
const
|
|
155
|
+
const response = await apiClient.get<User[]>('/users');
|
|
156
|
+
const users = response.data;
|
|
141
157
|
```
|
|
142
158
|
````
|
|
143
159
|
|
|
@@ -157,26 +173,25 @@ Provide 3-5 essential patterns.
|
|
|
157
173
|
```markdown
|
|
158
174
|
## Core Patterns
|
|
159
175
|
|
|
160
|
-
###
|
|
176
|
+
### GET Requests
|
|
161
177
|
|
|
162
178
|
```typescript
|
|
163
|
-
// Single
|
|
164
|
-
const
|
|
165
|
-
const contact = stmt.get(id) as Contact | undefined;
|
|
179
|
+
// Single resource
|
|
180
|
+
const user = await apiClient.get<User>(`/users/${id}`);
|
|
166
181
|
|
|
167
|
-
//
|
|
168
|
-
const
|
|
169
|
-
const contacts = stmt.all(user_id) as Contact[];
|
|
182
|
+
// Collection
|
|
183
|
+
const users = await apiClient.get<User[]>('/users');
|
|
170
184
|
````
|
|
171
185
|
|
|
172
|
-
###
|
|
186
|
+
### POST Requests
|
|
173
187
|
|
|
174
188
|
```typescript
|
|
175
|
-
const
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
189
|
+
const newUser = await apiClient.post<User>('/users', {
|
|
190
|
+
id: nanoid(),
|
|
191
|
+
name: 'John Doe',
|
|
192
|
+
email: 'john@example.com',
|
|
193
|
+
createdAt: new Date().toISOString(),
|
|
194
|
+
});
|
|
180
195
|
```
|
|
181
196
|
|
|
182
197
|
````
|
|
@@ -196,9 +211,9 @@ Link to detailed references.
|
|
|
196
211
|
## Advanced Usage
|
|
197
212
|
|
|
198
213
|
For detailed information:
|
|
199
|
-
- [references/
|
|
200
|
-
- [references/
|
|
201
|
-
- [references/
|
|
214
|
+
- [references/api-docs.md](references/api-docs.md) - Complete API reference
|
|
215
|
+
- [references/authentication.md](references/authentication.md) - Auth patterns
|
|
216
|
+
- [references/examples.md](references/examples.md) - 20+ usage examples
|
|
202
217
|
````
|
|
203
218
|
|
|
204
219
|
**Guidelines**:
|
|
@@ -219,21 +234,21 @@ Pull examples from actual codebase, not invented scenarios.
|
|
|
219
234
|
#### ✅ Good (Real)
|
|
220
235
|
|
|
221
236
|
```typescript
|
|
222
|
-
// From src/lib/
|
|
223
|
-
const
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
237
|
+
// From src/lib/api/users.ts
|
|
238
|
+
const response = await fetch(`${API_BASE}/users/${userId}/stats`, {
|
|
239
|
+
headers: {
|
|
240
|
+
Authorization: `Bearer ${token}`,
|
|
241
|
+
'Content-Type': 'application/json',
|
|
242
|
+
},
|
|
243
|
+
});
|
|
244
|
+
const stats = (await response.json()) as UserStats;
|
|
230
245
|
```
|
|
231
246
|
|
|
232
247
|
#### ❌ Bad (Generic)
|
|
233
248
|
|
|
234
249
|
```typescript
|
|
235
250
|
// Generic example
|
|
236
|
-
const result =
|
|
251
|
+
const result = await api.getData();
|
|
237
252
|
```
|
|
238
253
|
|
|
239
254
|
### Include Context
|
|
@@ -242,18 +257,21 @@ Show imports, types, and surrounding context.
|
|
|
242
257
|
|
|
243
258
|
```typescript
|
|
244
259
|
// ✅ Complete context
|
|
245
|
-
import { db } from '$lib/server/db';
|
|
246
260
|
import { nanoid } from 'nanoid';
|
|
247
|
-
import type {
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
261
|
+
import type { User, CreateUserRequest } from './types';
|
|
262
|
+
import { apiClient } from './client';
|
|
263
|
+
|
|
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;
|
|
257
275
|
};
|
|
258
276
|
```
|
|
259
277
|
|
|
@@ -263,18 +281,18 @@ Explain WHY, not WHAT.
|
|
|
263
281
|
|
|
264
282
|
```typescript
|
|
265
283
|
// ✅ Good comments (explain why)
|
|
266
|
-
// Use
|
|
267
|
-
const
|
|
284
|
+
// Use Authorization header to verify JWT token
|
|
285
|
+
const headers = { Authorization: `Bearer ${token}` };
|
|
268
286
|
|
|
269
|
-
// Always
|
|
270
|
-
const
|
|
287
|
+
// Always validate input to prevent injection attacks
|
|
288
|
+
const sanitized = validator.escape(userInput);
|
|
271
289
|
|
|
272
290
|
// ❌ Bad comments (state the obvious)
|
|
273
|
-
// This
|
|
274
|
-
const
|
|
291
|
+
// This creates headers
|
|
292
|
+
const headers = { Authorization: `Bearer ${token}` };
|
|
275
293
|
|
|
276
|
-
// This
|
|
277
|
-
const
|
|
294
|
+
// This makes a request
|
|
295
|
+
const response = await fetch(url);
|
|
278
296
|
```
|
|
279
297
|
|
|
280
298
|
---
|
|
@@ -353,7 +371,8 @@ For 20+ common query patterns including joins and aggregations:
|
|
|
353
371
|
Not just:
|
|
354
372
|
|
|
355
373
|
```markdown
|
|
356
|
-
See [schema.md](references/schema.md) and
|
|
374
|
+
See [schema.md](references/schema.md) and
|
|
375
|
+
[examples](references/query-examples.md).
|
|
357
376
|
```
|
|
358
377
|
|
|
359
378
|
---
|
|
@@ -371,62 +390,64 @@ Create scripts for:
|
|
|
371
390
|
|
|
372
391
|
### Script Structure
|
|
373
392
|
|
|
374
|
-
```
|
|
375
|
-
#!/usr/bin/env
|
|
376
|
-
|
|
377
|
-
Clear description of what this script does.
|
|
378
|
-
|
|
379
|
-
This script [main purpose] by [method]. Use it to [when to use].
|
|
380
|
-
|
|
381
|
-
Usage:
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
Example:
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
Options:
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
import
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
393
|
+
```javascript
|
|
394
|
+
#!/usr/bin/env node
|
|
395
|
+
/**
|
|
396
|
+
* Clear description of what this script does.
|
|
397
|
+
*
|
|
398
|
+
* This script [main purpose] by [method]. Use it to [when to use].
|
|
399
|
+
*
|
|
400
|
+
* Usage:
|
|
401
|
+
* node script-name.js [arguments]
|
|
402
|
+
*
|
|
403
|
+
* Example:
|
|
404
|
+
* node validate-config.js --check-all
|
|
405
|
+
* node validate-config.js --file config.json
|
|
406
|
+
*
|
|
407
|
+
* Options:
|
|
408
|
+
* --check-all Check all config files
|
|
409
|
+
* --file NAME Check specific file
|
|
410
|
+
* --verbose Show detailed output
|
|
411
|
+
*/
|
|
412
|
+
|
|
413
|
+
import { parseArgs } from 'node:util';
|
|
414
|
+
|
|
415
|
+
async function main() {
|
|
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
|
+
}
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
async function performOperation(options) {
|
|
435
|
+
// Main logic here
|
|
436
|
+
return 'Operation completed';
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
main();
|
|
420
440
|
```
|
|
421
441
|
|
|
422
442
|
### Script Best Practices
|
|
423
443
|
|
|
424
|
-
- Include shebang (`#!/usr/bin/env
|
|
425
|
-
- Detailed
|
|
426
|
-
- Argument parsing with
|
|
444
|
+
- Include shebang (`#!/usr/bin/env node`)
|
|
445
|
+
- Detailed JSDoc comment with usage examples
|
|
446
|
+
- Argument parsing with node:util or commander
|
|
427
447
|
- Error handling with meaningful messages
|
|
428
448
|
- Exit codes (0 = success, 1 = error)
|
|
429
449
|
- Clear output formatting (✅ ❌ ⚠️)
|
|
450
|
+
- Use ES modules (import/export) or CommonJS (require)
|
|
430
451
|
|
|
431
452
|
---
|
|
432
453
|
|
|
@@ -500,10 +521,10 @@ Modify the template for your needs.
|
|
|
500
521
|
### Mistake 1: Vague Descriptions
|
|
501
522
|
```yaml
|
|
502
523
|
# ❌ Bad
|
|
503
|
-
description: Helper for
|
|
524
|
+
description: Helper for API stuff
|
|
504
525
|
|
|
505
526
|
# ✅ Good
|
|
506
|
-
description:
|
|
527
|
+
description: REST API client with TypeScript types for user endpoints. Use when making HTTP requests, handling auth, or managing API errors.
|
|
507
528
|
````
|
|
508
529
|
|
|
509
530
|
### Mistake 2: Second Person
|
|
@@ -523,15 +544,17 @@ Validate input before saving to database.
|
|
|
523
544
|
````markdown
|
|
524
545
|
# ❌ Bad
|
|
525
546
|
|
|
526
|
-
Understanding the importance of
|
|
527
|
-
of
|
|
547
|
+
Understanding the importance of authentication tokens in the context
|
|
548
|
+
of secure API communication is crucial for security...
|
|
528
549
|
|
|
529
550
|
# ✅ Good
|
|
530
551
|
|
|
531
|
-
|
|
552
|
+
Include authentication tokens in all API requests:
|
|
532
553
|
|
|
533
554
|
```typescript
|
|
534
|
-
const
|
|
555
|
+
const response = await fetch(url, {
|
|
556
|
+
headers: { Authorization: `Bearer ${token}` },
|
|
557
|
+
});
|
|
535
558
|
```
|
|
536
559
|
````
|
|
537
560
|
|
|
@@ -589,6 +612,8 @@ Before finalizing a skill:
|
|
|
589
612
|
|
|
590
613
|
## Resources
|
|
591
614
|
|
|
592
|
-
- [SKILLS-ARCHITECTURE.md](../../../docs/SKILLS-ARCHITECTURE.md) -
|
|
593
|
-
|
|
615
|
+
- [SKILLS-ARCHITECTURE.md](../../../docs/SKILLS-ARCHITECTURE.md) -
|
|
616
|
+
System overview
|
|
617
|
+
- [SKILL-DEVELOPMENT.md](../../../docs/SKILL-DEVELOPMENT.md) -
|
|
618
|
+
Development workflow
|
|
594
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
|
+
-->
|