@grimoire-cc/cli 0.6.2 → 0.7.0
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/dist/bin.js +4 -1
- package/dist/bin.js.map +1 -1
- package/dist/commands/logs.d.ts.map +1 -1
- package/dist/commands/logs.js +2 -2
- package/dist/commands/logs.js.map +1 -1
- package/dist/static/log-viewer.html +946 -690
- package/dist/static/static/log-viewer.html +946 -690
- package/package.json +1 -1
- package/packs/dev-pack/agents/gr.code-reviewer.md +286 -0
- package/packs/dev-pack/agents/gr.tdd-specialist.md +44 -0
- package/packs/dev-pack/grimoire.json +55 -0
- package/packs/dev-pack/skills/gr.tdd-specialist/SKILL.md +247 -0
- package/packs/dev-pack/skills/gr.tdd-specialist/reference/anti-patterns.md +166 -0
- package/packs/dev-pack/skills/gr.tdd-specialist/reference/language-frameworks.md +388 -0
- package/packs/dev-pack/skills/gr.tdd-specialist/reference/tdd-workflow-patterns.md +135 -0
- package/packs/docs-pack/grimoire.json +30 -0
- package/packs/docs-pack/skills/gr.business-logic-docs/SKILL.md +141 -0
- package/packs/docs-pack/skills/gr.business-logic-docs/references/tier2-template.md +74 -0
- package/packs/essentials-pack/agents/gr.fact-checker.md +202 -0
- package/packs/essentials-pack/grimoire.json +12 -0
- package/packs/meta-pack/grimoire.json +72 -0
- package/packs/meta-pack/skills/gr.context-file-guide/SKILL.md +201 -0
- package/packs/meta-pack/skills/gr.context-file-guide/scripts/validate-context-file.sh +29 -0
- package/packs/meta-pack/skills/gr.readme-guide/SKILL.md +362 -0
- package/packs/meta-pack/skills/gr.skill-developer/SKILL.md +321 -0
- package/packs/meta-pack/skills/gr.skill-developer/examples/brand-guidelines.md +94 -0
- package/packs/meta-pack/skills/gr.skill-developer/examples/financial-analysis.md +85 -0
- package/packs/meta-pack/skills/gr.skill-developer/reference/best-practices.md +410 -0
- package/packs/meta-pack/skills/gr.skill-developer/reference/file-organization.md +452 -0
- package/packs/meta-pack/skills/gr.skill-developer/reference/patterns.md +459 -0
- package/packs/meta-pack/skills/gr.skill-developer/reference/yaml-spec.md +214 -0
- package/packs/meta-pack/skills/gr.skill-developer/scripts/create-skill.sh +210 -0
- package/packs/meta-pack/skills/gr.skill-developer/scripts/validate-skill.py +520 -0
- package/packs/meta-pack/skills/gr.skill-developer/templates/basic-skill.md +94 -0
- package/packs/meta-pack/skills/gr.skill-developer/templates/domain-skill.md +108 -0
|
@@ -0,0 +1,459 @@
|
|
|
1
|
+
# Common Skill Patterns
|
|
2
|
+
|
|
3
|
+
Proven patterns for different types of skills, based on Anthropic cookbook examples.
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
|
|
7
|
+
- [Pattern 1: Structured Data Processing](#pattern-1-structured-data-processing)
|
|
8
|
+
- [Pattern 2: Standards Enforcement](#pattern-2-standards-enforcement)
|
|
9
|
+
- [Pattern 3: Multi-Step Workflows](#pattern-3-multi-step-workflows)
|
|
10
|
+
- [Pattern 4: Reference and Lookup](#pattern-4-reference-and-lookup)
|
|
11
|
+
- [Choosing the Right Pattern](#choosing-the-right-pattern)
|
|
12
|
+
- [Mixing Patterns](#mixing-patterns)
|
|
13
|
+
- [Resources](#resources)
|
|
14
|
+
|
|
15
|
+
## Pattern 1: Structured Data Processing
|
|
16
|
+
|
|
17
|
+
**Use for:** Skills that process structured data (financial analysis, scientific calculations, data transformation)
|
|
18
|
+
|
|
19
|
+
### Characteristics
|
|
20
|
+
|
|
21
|
+
- Clear input format requirements
|
|
22
|
+
- Deterministic processing steps
|
|
23
|
+
- Structured output with calculations
|
|
24
|
+
- Often includes scripts for complex logic
|
|
25
|
+
|
|
26
|
+
### Structure Template
|
|
27
|
+
|
|
28
|
+
```markdown
|
|
29
|
+
## Capabilities
|
|
30
|
+
|
|
31
|
+
Process and analyze:
|
|
32
|
+
- **Data Type 1**: Specific processing
|
|
33
|
+
- **Data Type 2**: Specific calculations
|
|
34
|
+
- **Data Type 3**: Specific transformations
|
|
35
|
+
|
|
36
|
+
## Input Format
|
|
37
|
+
|
|
38
|
+
Accepts multiple formats:
|
|
39
|
+
- **CSV**: Column headers: Field1, Field2, Field3
|
|
40
|
+
- **JSON**: `{"field1": value, "field2": value}`
|
|
41
|
+
- **Excel**: Sheet name "Data" with labeled rows
|
|
42
|
+
|
|
43
|
+
Minimum required fields:
|
|
44
|
+
- Field1 (required): Description
|
|
45
|
+
- Field2 (required): Description
|
|
46
|
+
- Field3 (optional): Description
|
|
47
|
+
|
|
48
|
+
## Processing Steps
|
|
49
|
+
|
|
50
|
+
1. **Validate data completeness**
|
|
51
|
+
- Check all required fields present
|
|
52
|
+
- Verify data types and ranges
|
|
53
|
+
- Handle missing values appropriately
|
|
54
|
+
|
|
55
|
+
2. **Transform to standard format**
|
|
56
|
+
- Normalize units and scales
|
|
57
|
+
- Convert to consistent data structure
|
|
58
|
+
- Apply any necessary conversions
|
|
59
|
+
|
|
60
|
+
3. **Perform calculations**
|
|
61
|
+
- Execute primary analysis
|
|
62
|
+
- Calculate derived metrics
|
|
63
|
+
- Generate comparisons
|
|
64
|
+
|
|
65
|
+
4. **Interpret results**
|
|
66
|
+
- Apply domain expertise
|
|
67
|
+
- Compare to benchmarks
|
|
68
|
+
- Identify notable patterns
|
|
69
|
+
|
|
70
|
+
## Output Format
|
|
71
|
+
|
|
72
|
+
Structured results including:
|
|
73
|
+
- **Calculated values:** Primary metrics with units
|
|
74
|
+
- **Benchmarks:** Comparisons to standards (when available)
|
|
75
|
+
- **Trends:** Historical or comparative analysis
|
|
76
|
+
- **Interpretations:** Domain-specific insights
|
|
77
|
+
- **Formatted report:** Excel/PDF with visualizations
|
|
78
|
+
|
|
79
|
+
## Scripts
|
|
80
|
+
|
|
81
|
+
- `process_data.py`: Main data processing engine
|
|
82
|
+
- `validate_input.py`: Input validation and sanitization
|
|
83
|
+
- `calculate_metrics.py`: Core calculations
|
|
84
|
+
- `generate_report.py`: Output formatting
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Examples Using This Pattern
|
|
88
|
+
|
|
89
|
+
- Financial ratio analysis
|
|
90
|
+
- Scientific data analysis
|
|
91
|
+
- Statistical processing
|
|
92
|
+
- Data quality assessment
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Pattern 2: Standards Enforcement
|
|
97
|
+
|
|
98
|
+
**Use for:** Skills that enforce consistency (brand guidelines, coding standards, compliance checking)
|
|
99
|
+
|
|
100
|
+
### Characteristics
|
|
101
|
+
|
|
102
|
+
- Detailed specifications and rules
|
|
103
|
+
- Validation checklists
|
|
104
|
+
- Before/after examples
|
|
105
|
+
- Compliance verification
|
|
106
|
+
|
|
107
|
+
### Structure Template
|
|
108
|
+
|
|
109
|
+
```markdown
|
|
110
|
+
## Standards Overview
|
|
111
|
+
|
|
112
|
+
This skill enforces [domain] standards for consistent, compliant [outputs].
|
|
113
|
+
|
|
114
|
+
### Applicable To
|
|
115
|
+
|
|
116
|
+
- Document Type 1 (PowerPoint presentations)
|
|
117
|
+
- Document Type 2 (Excel workbooks)
|
|
118
|
+
- Document Type 3 (PDF reports)
|
|
119
|
+
|
|
120
|
+
## Standards Specifications
|
|
121
|
+
|
|
122
|
+
### Category 1: Visual Standards
|
|
123
|
+
|
|
124
|
+
**Color Palette:**
|
|
125
|
+
- **Primary Color**: #0066CC - Use for headers, CTAs
|
|
126
|
+
- **Secondary Color**: #003366 - Use for body text
|
|
127
|
+
- **Accent Color**: #28A745 - Use for success states
|
|
128
|
+
- **Never use:** Colors outside approved palette
|
|
129
|
+
|
|
130
|
+
**Typography:**
|
|
131
|
+
- **H1**: 32pt Bold Primary Font
|
|
132
|
+
- **H2**: 24pt Semibold Primary Font
|
|
133
|
+
- **Body**: 11pt Regular Primary Font
|
|
134
|
+
- **Minimum line spacing**: 1.15
|
|
135
|
+
|
|
136
|
+
### Category 2: Content Standards
|
|
137
|
+
|
|
138
|
+
**Tone and Voice:**
|
|
139
|
+
- Professional yet approachable
|
|
140
|
+
- Active voice preferred
|
|
141
|
+
- Sentence length <20 words
|
|
142
|
+
- Avoid jargon unless defined
|
|
143
|
+
|
|
144
|
+
**Required Elements:**
|
|
145
|
+
- Document title (top-right)
|
|
146
|
+
- Company logo (top-left)
|
|
147
|
+
- Page numbers (centered bottom)
|
|
148
|
+
- Date (bottom-right)
|
|
149
|
+
|
|
150
|
+
### Category 3: Format Standards
|
|
151
|
+
|
|
152
|
+
**Page Setup:**
|
|
153
|
+
- Size: Letter (8.5" × 11")
|
|
154
|
+
- Margins: 1" all sides
|
|
155
|
+
- Orientation: Portrait (unless exception)
|
|
156
|
+
|
|
157
|
+
**File Naming:**
|
|
158
|
+
- Format: `[Category]_[Title]_[Date]_[Version].ext`
|
|
159
|
+
- Example: `Report_Q4Analysis_2024-01-15_v2.pdf`
|
|
160
|
+
|
|
161
|
+
## Validation Checklist
|
|
162
|
+
|
|
163
|
+
Before finalizing, verify:
|
|
164
|
+
|
|
165
|
+
**Visual Compliance:**
|
|
166
|
+
- [ ] Colors match approved palette
|
|
167
|
+
- [ ] Fonts are from approved list
|
|
168
|
+
- [ ] Logo placement correct
|
|
169
|
+
- [ ] Spacing meets minimums
|
|
170
|
+
|
|
171
|
+
**Content Compliance:**
|
|
172
|
+
- [ ] Tone matches standards
|
|
173
|
+
- [ ] Required elements present
|
|
174
|
+
- [ ] Terminology consistent
|
|
175
|
+
- [ ] Grammar and style correct
|
|
176
|
+
|
|
177
|
+
**Format Compliance:**
|
|
178
|
+
- [ ] Page setup correct
|
|
179
|
+
- [ ] File named properly
|
|
180
|
+
- [ ] Metadata complete
|
|
181
|
+
- [ ] Quality standards met
|
|
182
|
+
|
|
183
|
+
## Scripts
|
|
184
|
+
|
|
185
|
+
- `apply_standards.py`: Automated standards application
|
|
186
|
+
- `validate_compliance.py`: Compliance verification
|
|
187
|
+
- `generate_report.py`: Compliance report generation
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### Examples Using This Pattern
|
|
191
|
+
|
|
192
|
+
- Corporate brand guidelines
|
|
193
|
+
- Coding style enforcement
|
|
194
|
+
- Document formatting standards
|
|
195
|
+
- Regulatory compliance checking
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
## Pattern 3: Multi-Step Workflows
|
|
200
|
+
|
|
201
|
+
**Use for:** Skills that guide complex processes (project setup, analysis workflows, multi-stage operations)
|
|
202
|
+
|
|
203
|
+
### Characteristics
|
|
204
|
+
|
|
205
|
+
- Sequential phases with dependencies
|
|
206
|
+
- Clear success criteria for each phase
|
|
207
|
+
- Decision points and branching
|
|
208
|
+
- Progress tracking
|
|
209
|
+
|
|
210
|
+
### Structure Template
|
|
211
|
+
|
|
212
|
+
```markdown
|
|
213
|
+
## Workflow Overview
|
|
214
|
+
|
|
215
|
+
This skill guides you through [process name] in [X] phases.
|
|
216
|
+
|
|
217
|
+
**Total time:** Estimate
|
|
218
|
+
**Prerequisites:** What's needed before starting
|
|
219
|
+
**Outputs:** What you'll have when done
|
|
220
|
+
|
|
221
|
+
## Phase 1: Preparation
|
|
222
|
+
|
|
223
|
+
**Objective:** Set up environment and gather requirements
|
|
224
|
+
|
|
225
|
+
### Steps
|
|
226
|
+
|
|
227
|
+
1. **Gather inputs**
|
|
228
|
+
- Item 1: Description and source
|
|
229
|
+
- Item 2: Description and source
|
|
230
|
+
- Item 3: Description and source
|
|
231
|
+
|
|
232
|
+
2. **Validate prerequisites**
|
|
233
|
+
- [ ] Requirement 1 met
|
|
234
|
+
- [ ] Requirement 2 met
|
|
235
|
+
- [ ] Requirement 3 met
|
|
236
|
+
|
|
237
|
+
3. **Set up environment**
|
|
238
|
+
- Action 1: Specific instructions
|
|
239
|
+
- Action 2: Specific instructions
|
|
240
|
+
|
|
241
|
+
### Success Criteria
|
|
242
|
+
|
|
243
|
+
- [ ] All inputs collected
|
|
244
|
+
- [ ] Prerequisites validated
|
|
245
|
+
- [ ] Environment ready
|
|
246
|
+
|
|
247
|
+
**Next:** Proceed to Phase 2 only after all criteria met
|
|
248
|
+
|
|
249
|
+
## Phase 2: Execution
|
|
250
|
+
|
|
251
|
+
**Objective:** Perform main operations
|
|
252
|
+
|
|
253
|
+
### Steps
|
|
254
|
+
|
|
255
|
+
1. **Process data**
|
|
256
|
+
- Substep 1: Details
|
|
257
|
+
- Substep 2: Details
|
|
258
|
+
- Substep 3: Details
|
|
259
|
+
|
|
260
|
+
2. **Generate outputs**
|
|
261
|
+
- Output 1: Format and content
|
|
262
|
+
- Output 2: Format and content
|
|
263
|
+
|
|
264
|
+
3. **Verify results**
|
|
265
|
+
- Check 1: What to verify
|
|
266
|
+
- Check 2: What to verify
|
|
267
|
+
|
|
268
|
+
### Decision Point
|
|
269
|
+
|
|
270
|
+
**If verification passes:** Proceed to Phase 3
|
|
271
|
+
**If issues found:** Return to step 1 with corrections
|
|
272
|
+
|
|
273
|
+
### Success Criteria
|
|
274
|
+
|
|
275
|
+
- [ ] Processing complete
|
|
276
|
+
- [ ] Outputs generated
|
|
277
|
+
- [ ] Results verified
|
|
278
|
+
|
|
279
|
+
## Phase 3: Finalization
|
|
280
|
+
|
|
281
|
+
**Objective:** Complete and deliver results
|
|
282
|
+
|
|
283
|
+
### Steps
|
|
284
|
+
|
|
285
|
+
1. **Format deliverables**
|
|
286
|
+
- Apply formatting standards
|
|
287
|
+
- Add documentation
|
|
288
|
+
- Package for delivery
|
|
289
|
+
|
|
290
|
+
2. **Quality review**
|
|
291
|
+
- [ ] Completeness check
|
|
292
|
+
- [ ] Accuracy check
|
|
293
|
+
- [ ] Format check
|
|
294
|
+
|
|
295
|
+
3. **Deliver and document**
|
|
296
|
+
- Submit deliverables
|
|
297
|
+
- Document process
|
|
298
|
+
- Archive artifacts
|
|
299
|
+
|
|
300
|
+
### Success Criteria
|
|
301
|
+
|
|
302
|
+
- [ ] All deliverables complete
|
|
303
|
+
- [ ] Quality standards met
|
|
304
|
+
- [ ] Documentation finalized
|
|
305
|
+
|
|
306
|
+
## Troubleshooting
|
|
307
|
+
|
|
308
|
+
### Common Issues
|
|
309
|
+
|
|
310
|
+
**Issue 1: Problem description**
|
|
311
|
+
- Cause: What causes this
|
|
312
|
+
- Solution: How to fix
|
|
313
|
+
- Prevention: How to avoid
|
|
314
|
+
|
|
315
|
+
**Issue 2: Problem description**
|
|
316
|
+
- Cause: What causes this
|
|
317
|
+
- Solution: How to fix
|
|
318
|
+
- Prevention: How to avoid
|
|
319
|
+
|
|
320
|
+
## Scripts
|
|
321
|
+
|
|
322
|
+
- `phase1_setup.py`: Automates preparation phase
|
|
323
|
+
- `phase2_process.py`: Executes main operations
|
|
324
|
+
- `phase3_finalize.py`: Handles finalization
|
|
325
|
+
- `verify_phase.py`: Validates phase completion
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
### Examples Using This Pattern
|
|
329
|
+
|
|
330
|
+
- Project initialization workflows
|
|
331
|
+
- Data migration processes
|
|
332
|
+
- Analysis pipelines
|
|
333
|
+
- Deployment procedures
|
|
334
|
+
|
|
335
|
+
---
|
|
336
|
+
|
|
337
|
+
## Pattern 4: Reference and Lookup
|
|
338
|
+
|
|
339
|
+
**Use for:** Skills that provide quick reference information (API docs, formula references, terminology)
|
|
340
|
+
|
|
341
|
+
### Characteristics
|
|
342
|
+
|
|
343
|
+
- Organized by category or topic
|
|
344
|
+
- Searchable structure
|
|
345
|
+
- Quick access to specific information
|
|
346
|
+
- Minimal processing, maximum reference
|
|
347
|
+
|
|
348
|
+
### Structure Template
|
|
349
|
+
|
|
350
|
+
```markdown
|
|
351
|
+
## Quick Reference
|
|
352
|
+
|
|
353
|
+
Fast lookup for [domain] information.
|
|
354
|
+
|
|
355
|
+
### Category 1: [Name]
|
|
356
|
+
|
|
357
|
+
#### Item 1
|
|
358
|
+
**Description:** Brief explanation
|
|
359
|
+
**Usage:** When and how to use
|
|
360
|
+
**Example:** `concrete example`
|
|
361
|
+
**Related:** Links to related items
|
|
362
|
+
|
|
363
|
+
#### Item 2
|
|
364
|
+
**Description:** Brief explanation
|
|
365
|
+
**Usage:** When and how to use
|
|
366
|
+
**Example:** `concrete example`
|
|
367
|
+
**Related:** Links to related items
|
|
368
|
+
|
|
369
|
+
### Category 2: [Name]
|
|
370
|
+
|
|
371
|
+
#### Item 1
|
|
372
|
+
**Formula:** `mathematical or code formula`
|
|
373
|
+
**Parameters:**
|
|
374
|
+
- `param1`: Description and valid range
|
|
375
|
+
- `param2`: Description and valid range
|
|
376
|
+
**Returns:** What it produces
|
|
377
|
+
**Example:** Working example with values
|
|
378
|
+
|
|
379
|
+
## Common Combinations
|
|
380
|
+
|
|
381
|
+
Frequently used together:
|
|
382
|
+
|
|
383
|
+
**Combination 1: Use Case Name**
|
|
384
|
+
- Use Item A for: Purpose
|
|
385
|
+
- Then Item B for: Purpose
|
|
386
|
+
- Finally Item C for: Purpose
|
|
387
|
+
|
|
388
|
+
**Combination 2: Use Case Name**
|
|
389
|
+
- Start with Item X
|
|
390
|
+
- Apply Item Y
|
|
391
|
+
- Validate with Item Z
|
|
392
|
+
|
|
393
|
+
## Lookup Tables
|
|
394
|
+
|
|
395
|
+
### Table 1: [Name]
|
|
396
|
+
|
|
397
|
+
| Key | Value | Notes |
|
|
398
|
+
|-----|-------|-------|
|
|
399
|
+
| Entry 1 | Data | Context |
|
|
400
|
+
| Entry 2 | Data | Context |
|
|
401
|
+
|
|
402
|
+
### Table 2: [Name]
|
|
403
|
+
|
|
404
|
+
| Parameter | Range | Default | Description |
|
|
405
|
+
|-----------|-------|---------|-------------|
|
|
406
|
+
| Param 1 | 0-100 | 50 | Details |
|
|
407
|
+
| Param 2 | A-Z | A | Details |
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
### Examples Using This Pattern
|
|
411
|
+
|
|
412
|
+
- API reference documentation
|
|
413
|
+
- Formula and calculation guides
|
|
414
|
+
- Configuration references
|
|
415
|
+
- Terminology glossaries
|
|
416
|
+
|
|
417
|
+
---
|
|
418
|
+
|
|
419
|
+
## Choosing the Right Pattern
|
|
420
|
+
|
|
421
|
+
| If your skill... | Use this pattern |
|
|
422
|
+
|------------------|------------------|
|
|
423
|
+
| Processes data with calculations | Structured Data Processing |
|
|
424
|
+
| Enforces rules or standards | Standards Enforcement |
|
|
425
|
+
| Guides multi-step processes | Multi-Step Workflows |
|
|
426
|
+
| Provides reference information | Reference and Lookup |
|
|
427
|
+
| Combines multiple aspects | Mix patterns as needed |
|
|
428
|
+
|
|
429
|
+
## Mixing Patterns
|
|
430
|
+
|
|
431
|
+
Complex skills can combine patterns:
|
|
432
|
+
|
|
433
|
+
**Example: Financial Analysis Skill**
|
|
434
|
+
|
|
435
|
+
- **Primary:** Structured Data Processing (for calculations)
|
|
436
|
+
- **Secondary:** Reference and Lookup (for ratio definitions)
|
|
437
|
+
- **Tertiary:** Standards Enforcement (for report formatting)
|
|
438
|
+
|
|
439
|
+
**Structure:**
|
|
440
|
+
|
|
441
|
+
```markdown
|
|
442
|
+
## Capabilities
|
|
443
|
+
[List all capabilities across patterns]
|
|
444
|
+
|
|
445
|
+
## Financial Ratio Reference
|
|
446
|
+
[Reference pattern for definitions]
|
|
447
|
+
|
|
448
|
+
## Data Processing
|
|
449
|
+
[Structured data pattern for calculations]
|
|
450
|
+
|
|
451
|
+
## Report Standards
|
|
452
|
+
[Standards enforcement for outputs]
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
## Resources
|
|
456
|
+
|
|
457
|
+
- See `examples/` directory for complete skill examples using these patterns
|
|
458
|
+
- Refer to `templates/` for starting templates
|
|
459
|
+
- Check `reference/best-practices.md` for quality guidelines
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
# YAML Frontmatter Specification
|
|
2
|
+
|
|
3
|
+
Complete specification for skill YAML frontmatter requirements based on official Anthropic documentation.
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
|
|
7
|
+
- [Required Structure](#required-structure)
|
|
8
|
+
- [File Size Constraints](#file-size-constraints)
|
|
9
|
+
- [Field Requirements](#field-requirements)
|
|
10
|
+
- [name Field](#name-field)
|
|
11
|
+
- [description Field](#description-field)
|
|
12
|
+
- [Keyword Strategy](#keyword-strategy)
|
|
13
|
+
- [Validation Checklist](#validation-checklist)
|
|
14
|
+
- [Directory Naming](#directory-naming)
|
|
15
|
+
- [Source](#source)
|
|
16
|
+
|
|
17
|
+
## Required Structure
|
|
18
|
+
|
|
19
|
+
Every SKILL.md file MUST start with YAML frontmatter:
|
|
20
|
+
|
|
21
|
+
```yaml
|
|
22
|
+
---
|
|
23
|
+
name: your-skill-name
|
|
24
|
+
description: Brief description of what this Skill does and when to use it
|
|
25
|
+
---
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## File Size Constraints
|
|
29
|
+
|
|
30
|
+
Every skill must comply with these official Anthropic size limits:
|
|
31
|
+
|
|
32
|
+
### SKILL.md Body Size
|
|
33
|
+
|
|
34
|
+
**Maximum:** 500 lines (excluding YAML frontmatter)
|
|
35
|
+
|
|
36
|
+
**Enforcement:** Validation script will block skills exceeding this limit
|
|
37
|
+
|
|
38
|
+
**Rationale:** Optimal context window usage and performance
|
|
39
|
+
|
|
40
|
+
**How to comply:**
|
|
41
|
+
- Keep core instructions in SKILL.md
|
|
42
|
+
- Move detailed content to supporting files (reference/, examples/, templates/)
|
|
43
|
+
- Link to supporting files for additional details
|
|
44
|
+
|
|
45
|
+
### Total Skill Bundle Size
|
|
46
|
+
|
|
47
|
+
**Maximum:** 8MB (all files combined)
|
|
48
|
+
|
|
49
|
+
**Includes:** SKILL.md + all supporting files (reference/, examples/, templates/, scripts/)
|
|
50
|
+
|
|
51
|
+
**Enforcement:** Validation script will block if total size exceeds limit
|
|
52
|
+
|
|
53
|
+
**How to comply:**
|
|
54
|
+
- Remove redundant content
|
|
55
|
+
- Compress or remove large images
|
|
56
|
+
- Split large files by topic
|
|
57
|
+
- Use external resources for very large datasets
|
|
58
|
+
|
|
59
|
+
### Skills Per Request Limit
|
|
60
|
+
|
|
61
|
+
**Maximum:** 8 skills can be loaded per request
|
|
62
|
+
|
|
63
|
+
**Context:** Claude Code automatically loads relevant skills based on user queries. This limit ensures context window efficiency.
|
|
64
|
+
|
|
65
|
+
### Additional Requirements
|
|
66
|
+
|
|
67
|
+
**Reference files >100 lines:** Should include a table of contents at the top
|
|
68
|
+
|
|
69
|
+
**Enforcement:** Validation script warns (non-blocking) if missing
|
|
70
|
+
|
|
71
|
+
**Purpose:** Ensures Claude can see full scope even in partial file reads
|
|
72
|
+
|
|
73
|
+
**Reference file linking:** Keep all references one level deep from SKILL.md
|
|
74
|
+
|
|
75
|
+
**Enforcement:** Validation script warns if nested references detected
|
|
76
|
+
|
|
77
|
+
**Purpose:** Ensures Claude can access any reference directly from SKILL.md
|
|
78
|
+
|
|
79
|
+
## Field Requirements
|
|
80
|
+
|
|
81
|
+
### `name` Field
|
|
82
|
+
|
|
83
|
+
**Type:** String
|
|
84
|
+
**Required:** Yes
|
|
85
|
+
**Maximum length:** 64 characters
|
|
86
|
+
|
|
87
|
+
**Format rules:**
|
|
88
|
+
|
|
89
|
+
- Lowercase letters only (a-z)
|
|
90
|
+
- Numbers allowed (0-9)
|
|
91
|
+
- Hyphens allowed as separators (-)
|
|
92
|
+
- No other characters (no underscores, spaces, or special characters)
|
|
93
|
+
- No XML tags
|
|
94
|
+
- Must match directory name exactly
|
|
95
|
+
|
|
96
|
+
**Reserved words (cannot use):**
|
|
97
|
+
|
|
98
|
+
- "anthropic"
|
|
99
|
+
- "claude"
|
|
100
|
+
|
|
101
|
+
**Examples:**
|
|
102
|
+
|
|
103
|
+
✅ **Valid names:**
|
|
104
|
+
|
|
105
|
+
- `analyzing-financial-statements`
|
|
106
|
+
- `python-data-science`
|
|
107
|
+
- `brand-guidelines-2024`
|
|
108
|
+
- `api-design-patterns`
|
|
109
|
+
|
|
110
|
+
❌ **Invalid names:**
|
|
111
|
+
|
|
112
|
+
- `Analyzing_Financial_Statements` (uppercase, underscores)
|
|
113
|
+
- `python data science` (spaces)
|
|
114
|
+
- `claude-helper` (reserved word)
|
|
115
|
+
- `api.design.patterns` (periods not allowed)
|
|
116
|
+
- `very-long-skill-name-that-exceeds-the-sixty-four-character-limit-for-names` (>64 chars)
|
|
117
|
+
|
|
118
|
+
### `description` Field
|
|
119
|
+
|
|
120
|
+
**Type:** String
|
|
121
|
+
**Required:** Yes
|
|
122
|
+
**Minimum length:** 1 character (non-empty)
|
|
123
|
+
**Maximum length:** 1024 characters
|
|
124
|
+
|
|
125
|
+
**Content requirements:**
|
|
126
|
+
|
|
127
|
+
- No XML tags
|
|
128
|
+
- Must include BOTH:
|
|
129
|
+
1. **What** the skill does (functionality)
|
|
130
|
+
2. **When** to use it (trigger keywords)
|
|
131
|
+
|
|
132
|
+
**Purpose:**
|
|
133
|
+
The description enables Claude's automatic skill activation. When users ask questions matching keywords in the description, Claude loads this skill.
|
|
134
|
+
|
|
135
|
+
**Best practice formula:**
|
|
136
|
+
|
|
137
|
+
```text
|
|
138
|
+
[Domain/Technology] + [What it does] + [When/Keywords for activation]
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
**Examples:**
|
|
142
|
+
|
|
143
|
+
✅ **Good descriptions:**
|
|
144
|
+
|
|
145
|
+
```yaml
|
|
146
|
+
description: "This skill calculates key financial ratios and metrics from financial statement data for investment analysis"
|
|
147
|
+
# Keywords: financial ratios, metrics, financial statement, investment analysis
|
|
148
|
+
|
|
149
|
+
description: "Python coding standards and patterns for data science projects. Use when writing Python code, analyzing data, or creating visualizations"
|
|
150
|
+
# Keywords: Python, coding standards, data science, writing code, analyzing data, visualizations
|
|
151
|
+
|
|
152
|
+
description: "This skill applies consistent corporate branding and styling to all generated documents including colors, fonts, layouts, and messaging"
|
|
153
|
+
# Keywords: branding, styling, documents, colors, fonts, layouts, messaging
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
❌ **Bad descriptions:**
|
|
157
|
+
|
|
158
|
+
```yaml
|
|
159
|
+
description: "Helps with finance"
|
|
160
|
+
# Too vague, no trigger keywords
|
|
161
|
+
|
|
162
|
+
description: "Contains brand information"
|
|
163
|
+
# No actionable keywords, doesn't explain when to use
|
|
164
|
+
|
|
165
|
+
description: "ROE, ROA, P/E calculator"
|
|
166
|
+
# Too technical without context, unclear when to activate
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
## Keyword Strategy
|
|
170
|
+
|
|
171
|
+
Include these in your description for better discoverability:
|
|
172
|
+
|
|
173
|
+
1. **Domain/Technology terms:** "financial analysis", "Python", "brand guidelines"
|
|
174
|
+
2. **Action verbs:** "calculates", "applies", "analyzes", "creates", "validates"
|
|
175
|
+
3. **Object nouns:** "ratios", "documents", "code", "data", "reports"
|
|
176
|
+
4. **Use cases:** "investment analysis", "data science projects", "corporate branding"
|
|
177
|
+
5. **Natural phrases:** How users would actually ask questions
|
|
178
|
+
|
|
179
|
+
## Validation Checklist
|
|
180
|
+
|
|
181
|
+
Before finalizing frontmatter:
|
|
182
|
+
|
|
183
|
+
- [ ] YAML starts with `---` on its own line
|
|
184
|
+
- [ ] YAML ends with `---` on its own line
|
|
185
|
+
- [ ] `name` field present and not empty
|
|
186
|
+
- [ ] `name` is ≤64 characters
|
|
187
|
+
- [ ] `name` uses only lowercase, numbers, hyphens
|
|
188
|
+
- [ ] `name` doesn't contain "anthropic" or "claude"
|
|
189
|
+
- [ ] `name` matches directory name exactly
|
|
190
|
+
- [ ] `description` field present and not empty
|
|
191
|
+
- [ ] `description` is ≤1024 characters
|
|
192
|
+
- [ ] `description` explains WHAT skill does
|
|
193
|
+
- [ ] `description` includes WHEN keywords
|
|
194
|
+
- [ ] No XML tags in any field
|
|
195
|
+
- [ ] No trailing spaces or formatting issues
|
|
196
|
+
|
|
197
|
+
## Directory Naming
|
|
198
|
+
|
|
199
|
+
The skill directory name must match the `name` field exactly:
|
|
200
|
+
|
|
201
|
+
```text
|
|
202
|
+
✅ Correct:
|
|
203
|
+
.claude/skills/analyzing-financial-statements/
|
|
204
|
+
└── SKILL.md (name: analyzing-financial-statements)
|
|
205
|
+
|
|
206
|
+
❌ Incorrect:
|
|
207
|
+
.claude/skills/financial-analysis/
|
|
208
|
+
└── SKILL.md (name: analyzing-financial-statements)
|
|
209
|
+
# Mismatch! Directory doesn't match name field
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
## Source
|
|
213
|
+
|
|
214
|
+
Based on [Official Claude Code Skills Documentation](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview)
|