@grimoire-cc/cli 0.6.3 → 0.7.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/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 +278 -0
- package/packs/docs-pack/skills/gr.business-logic-docs/references/audit-checklist.md +48 -0
- package/packs/docs-pack/skills/gr.business-logic-docs/references/tier2-template.md +129 -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,94 @@
|
|
|
1
|
+
# Brand Guidelines Skill Example
|
|
2
|
+
|
|
3
|
+
This is a complete example of a skill that applies corporate branding standards to documents.
|
|
4
|
+
|
|
5
|
+
```yaml
|
|
6
|
+
---
|
|
7
|
+
name: applying-brand-guidelines
|
|
8
|
+
description: This skill applies consistent corporate branding and styling to all generated documents including colors, fonts, layouts, and messaging
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Corporate Brand Guidelines Skill
|
|
12
|
+
|
|
13
|
+
This skill ensures all generated documents adhere to corporate brand standards for consistent, professional communication.
|
|
14
|
+
|
|
15
|
+
## Brand Identity
|
|
16
|
+
|
|
17
|
+
### Company: Acme Corporation
|
|
18
|
+
**Tagline**: "Innovation Through Excellence"
|
|
19
|
+
**Industry**: Technology Solutions
|
|
20
|
+
|
|
21
|
+
## Visual Standards
|
|
22
|
+
|
|
23
|
+
### Color Palette
|
|
24
|
+
|
|
25
|
+
**Primary Colors**:
|
|
26
|
+
- **Acme Blue**: #0066CC (RGB: 0, 102, 204) - Headers, primary buttons
|
|
27
|
+
- **Acme Navy**: #003366 (RGB: 0, 51, 102) - Text, accents
|
|
28
|
+
- **White**: #FFFFFF - Backgrounds, reverse text
|
|
29
|
+
|
|
30
|
+
**Secondary Colors**:
|
|
31
|
+
- **Success Green**: #28A745 - Positive metrics
|
|
32
|
+
- **Warning Amber**: #FFC107 - Cautions
|
|
33
|
+
- **Error Red**: #DC3545 - Negative values
|
|
34
|
+
- **Neutral Gray**: #6C757D - Secondary text
|
|
35
|
+
|
|
36
|
+
### Typography
|
|
37
|
+
|
|
38
|
+
**Primary Font Family**: Segoe UI, system-ui, sans-serif
|
|
39
|
+
|
|
40
|
+
**Font Hierarchy**:
|
|
41
|
+
- **H1**: 32pt, Bold, Acme Blue
|
|
42
|
+
- **H2**: 24pt, Semibold, Acme Navy
|
|
43
|
+
- **H3**: 18pt, Semibold, Acme Navy
|
|
44
|
+
- **Body**: 11pt, Regular, Acme Navy
|
|
45
|
+
- **Caption**: 9pt, Regular, Neutral Gray
|
|
46
|
+
|
|
47
|
+
## Document Standards
|
|
48
|
+
|
|
49
|
+
### PowerPoint Templates
|
|
50
|
+
- Title slide: Acme Blue background, white text
|
|
51
|
+
- Content slides: White background, Acme Navy text
|
|
52
|
+
- Charts: Use primary/secondary color palette
|
|
53
|
+
- Footer: Company name, page number, date
|
|
54
|
+
|
|
55
|
+
### Excel Workbooks
|
|
56
|
+
- Header row: Acme Blue background, white bold text
|
|
57
|
+
- Data rows: Alternating white/light gray (#F8F9FA)
|
|
58
|
+
- Numbers: Right-aligned, 2 decimal places
|
|
59
|
+
- Currency: $ prefix, comma separators
|
|
60
|
+
|
|
61
|
+
### PDF Documents
|
|
62
|
+
- Page size: Letter (8.5" x 11")
|
|
63
|
+
- Margins: 1" all sides
|
|
64
|
+
- Header: Company logo (top-left), document title (top-right)
|
|
65
|
+
- Footer: Page numbers centered
|
|
66
|
+
|
|
67
|
+
## Content Guidelines
|
|
68
|
+
|
|
69
|
+
### Tone and Voice
|
|
70
|
+
- **Professional yet approachable**: Avoid jargon, use clear language
|
|
71
|
+
- **Confident and innovative**: Emphasize solutions and possibilities
|
|
72
|
+
- **Customer-focused**: Address client needs and benefits
|
|
73
|
+
|
|
74
|
+
### Messaging Standards
|
|
75
|
+
- Lead with value proposition
|
|
76
|
+
- Use active voice
|
|
77
|
+
- Keep sentences concise (<20 words)
|
|
78
|
+
- Include call-to-action in conclusions
|
|
79
|
+
|
|
80
|
+
## Scripts
|
|
81
|
+
|
|
82
|
+
- `apply_brand.py`: Automated brand formatting application
|
|
83
|
+
- `validate_brand.py`: Brand compliance verification
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Key Takeaways
|
|
87
|
+
|
|
88
|
+
This example demonstrates:
|
|
89
|
+
|
|
90
|
+
1. **Standards enforcement pattern**: Detailed specifications for compliance
|
|
91
|
+
2. **Reference materials**: Colors, fonts, layouts as on-demand resources
|
|
92
|
+
3. **Multi-format support**: PowerPoint, Excel, PDF standards
|
|
93
|
+
4. **Content + visual**: Both design and messaging guidelines
|
|
94
|
+
5. **Validation scripts**: Automated brand compliance checking
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Financial Analysis Skill Example
|
|
2
|
+
|
|
3
|
+
This is a complete example of a skill that calculates financial ratios and metrics.
|
|
4
|
+
|
|
5
|
+
```yaml
|
|
6
|
+
---
|
|
7
|
+
name: analyzing-financial-statements
|
|
8
|
+
description: This skill calculates key financial ratios and metrics from financial statement data for investment analysis
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Financial Ratio Calculator Skill
|
|
12
|
+
|
|
13
|
+
This skill provides comprehensive financial ratio analysis for evaluating company performance, profitability, liquidity, and valuation.
|
|
14
|
+
|
|
15
|
+
## Capabilities
|
|
16
|
+
|
|
17
|
+
Calculate and interpret:
|
|
18
|
+
- **Profitability Ratios**: ROE, ROA, Gross Margin, Operating Margin, Net Margin
|
|
19
|
+
- **Liquidity Ratios**: Current Ratio, Quick Ratio, Cash Ratio
|
|
20
|
+
- **Leverage Ratios**: Debt-to-Equity, Interest Coverage, Debt Service Coverage
|
|
21
|
+
- **Efficiency Ratios**: Asset Turnover, Inventory Turnover, Receivables Turnover
|
|
22
|
+
- **Valuation Ratios**: P/E, P/B, P/S, EV/EBITDA, PEG
|
|
23
|
+
- **Per-Share Metrics**: EPS, Book Value per Share, Dividend per Share
|
|
24
|
+
|
|
25
|
+
## How to Use
|
|
26
|
+
|
|
27
|
+
1. **Input Data**: Provide financial statement data (income statement, balance sheet, cash flow)
|
|
28
|
+
2. **Select Ratios**: Specify which ratios to calculate or use "all" for comprehensive analysis
|
|
29
|
+
3. **Interpretation**: The skill will calculate ratios and provide industry-standard interpretations
|
|
30
|
+
|
|
31
|
+
## Input Format
|
|
32
|
+
|
|
33
|
+
Financial data can be provided as:
|
|
34
|
+
- CSV with financial line items
|
|
35
|
+
- JSON with structured financial statements
|
|
36
|
+
- Text description of key financial figures
|
|
37
|
+
- Excel files with financial statements
|
|
38
|
+
|
|
39
|
+
## Output Format
|
|
40
|
+
|
|
41
|
+
Results include:
|
|
42
|
+
- Calculated ratios with values
|
|
43
|
+
- Industry benchmark comparisons (when available)
|
|
44
|
+
- Trend analysis (if multiple periods provided)
|
|
45
|
+
- Interpretation and insights
|
|
46
|
+
- Excel report with formatted results
|
|
47
|
+
|
|
48
|
+
## Example Usage
|
|
49
|
+
|
|
50
|
+
"Calculate key financial ratios for this company based on the attached financial statements"
|
|
51
|
+
|
|
52
|
+
"What's the P/E ratio if the stock price is $50 and annual earnings are $2.50 per share?"
|
|
53
|
+
|
|
54
|
+
"Analyze the liquidity position using the balance sheet data"
|
|
55
|
+
|
|
56
|
+
## Scripts
|
|
57
|
+
|
|
58
|
+
- `calculate_ratios.py`: Main calculation engine for all financial ratios
|
|
59
|
+
- `interpret_ratios.py`: Provides interpretation and benchmarking
|
|
60
|
+
|
|
61
|
+
## Best Practices
|
|
62
|
+
|
|
63
|
+
1. Always validate data completeness before calculations
|
|
64
|
+
2. Handle missing values appropriately (use industry averages or exclude)
|
|
65
|
+
3. Consider industry context when interpreting ratios
|
|
66
|
+
4. Include period comparisons for trend analysis
|
|
67
|
+
5. Flag unusual or concerning ratios
|
|
68
|
+
|
|
69
|
+
## Limitations
|
|
70
|
+
|
|
71
|
+
- Requires accurate financial data
|
|
72
|
+
- Industry benchmarks are general guidelines
|
|
73
|
+
- Some ratios may not apply to all industries
|
|
74
|
+
- Historical data doesn't guarantee future performance
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Key Takeaways
|
|
78
|
+
|
|
79
|
+
This example demonstrates:
|
|
80
|
+
|
|
81
|
+
1. **Clear domain focus**: Financial analysis and ratio calculation
|
|
82
|
+
2. **Rich trigger keywords**: "financial ratios", "metrics", "financial statement", "investment analysis"
|
|
83
|
+
3. **Structured sections**: Capabilities, input/output, examples, scripts
|
|
84
|
+
4. **Bundled scripts**: Python files for calculations (code doesn't enter context)
|
|
85
|
+
5. **Practical guidance**: Best practices and limitations
|
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
# Skill Best Practices
|
|
2
|
+
|
|
3
|
+
Comprehensive best practices for creating high-quality, discoverable, and maintainable skills.
|
|
4
|
+
|
|
5
|
+
## Content Quality
|
|
6
|
+
|
|
7
|
+
### Be Specific and Actionable
|
|
8
|
+
|
|
9
|
+
**Good:**
|
|
10
|
+
|
|
11
|
+
```markdown
|
|
12
|
+
"Calculate ROE by dividing net income by shareholder equity"
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
**Bad:**
|
|
16
|
+
|
|
17
|
+
```markdown
|
|
18
|
+
"Calculate financial ratios appropriately"
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
**Why:** Specific instructions tell Claude exactly what to do. Vague guidance leads to inconsistent results.
|
|
22
|
+
|
|
23
|
+
### Use Concrete Examples
|
|
24
|
+
|
|
25
|
+
**Good:**
|
|
26
|
+
|
|
27
|
+
```markdown
|
|
28
|
+
"What's the P/E ratio if the stock price is $50 and EPS is $2.50?"
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
**Bad:**
|
|
32
|
+
|
|
33
|
+
```markdown
|
|
34
|
+
"Calculate P/E ratio"
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**Why:** Concrete examples show users how to interact with the skill and demonstrate expected output.
|
|
38
|
+
|
|
39
|
+
### Define Terminology
|
|
40
|
+
|
|
41
|
+
**Good:**
|
|
42
|
+
|
|
43
|
+
```markdown
|
|
44
|
+
- **ROE (Return on Equity)**: Net Income ÷ Shareholder Equity
|
|
45
|
+
Measures how effectively a company uses shareholder capital
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**Bad:**
|
|
49
|
+
|
|
50
|
+
```markdown
|
|
51
|
+
- ROE: A profitability ratio
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
**Why:** Clear definitions help both Claude and users understand domain-specific terms.
|
|
55
|
+
|
|
56
|
+
## Organization
|
|
57
|
+
|
|
58
|
+
### Clear Hierarchy
|
|
59
|
+
|
|
60
|
+
Use consistent heading levels:
|
|
61
|
+
|
|
62
|
+
- `##` for major sections (Capabilities, How to Use, Best Practices)
|
|
63
|
+
- `###` for subsections (within major sections)
|
|
64
|
+
- `####` sparingly for deep topics (only when necessary)
|
|
65
|
+
|
|
66
|
+
### Logical Flow
|
|
67
|
+
|
|
68
|
+
Organize content in this order:
|
|
69
|
+
|
|
70
|
+
1. **Introduction** - What is this skill?
|
|
71
|
+
2. **Capabilities** - What can it do?
|
|
72
|
+
3. **How to Use** - Step-by-step instructions
|
|
73
|
+
4. **Input/Output** - What goes in, what comes out
|
|
74
|
+
5. **Examples** - Show concrete usage
|
|
75
|
+
6. **Scripts** - Supporting automation (if applicable)
|
|
76
|
+
7. **Best Practices** - How to use it well
|
|
77
|
+
8. **Limitations** - Boundaries and constraints
|
|
78
|
+
|
|
79
|
+
**Why:** This flow matches how users think: "What is it?" → "What does it do?" → "How do I use it?" → "What should I watch out for?"
|
|
80
|
+
|
|
81
|
+
### Scannable Content
|
|
82
|
+
|
|
83
|
+
Format for easy scanning:
|
|
84
|
+
|
|
85
|
+
- **Bullet lists** for options, features, or categories
|
|
86
|
+
- **Numbered lists** for sequential steps or workflows
|
|
87
|
+
- **Bold** for key terms and important concepts
|
|
88
|
+
- **Code blocks** for examples, formulas, or syntax
|
|
89
|
+
- **Tables** for comparisons or structured data
|
|
90
|
+
|
|
91
|
+
**Example:**
|
|
92
|
+
|
|
93
|
+
```markdown
|
|
94
|
+
## Capabilities
|
|
95
|
+
|
|
96
|
+
Calculate these ratio categories:
|
|
97
|
+
- **Profitability**: ROE, ROA, margins
|
|
98
|
+
- **Liquidity**: Current ratio, quick ratio
|
|
99
|
+
- **Leverage**: Debt-to-equity, coverage ratios
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Discoverability
|
|
103
|
+
|
|
104
|
+
### Rich Descriptions with Keywords
|
|
105
|
+
|
|
106
|
+
**Good:**
|
|
107
|
+
|
|
108
|
+
```yaml
|
|
109
|
+
description: "Python data science coding patterns and best practices. Use when writing Python code, analyzing data, creating visualizations, or working with pandas and numpy"
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
**Bad:**
|
|
113
|
+
|
|
114
|
+
```yaml
|
|
115
|
+
description: "Helps with Python programming"
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
**Why:** Rich descriptions with multiple keywords increase activation accuracy.
|
|
119
|
+
|
|
120
|
+
### Multiple Trigger Points
|
|
121
|
+
|
|
122
|
+
Include variety in your description:
|
|
123
|
+
|
|
124
|
+
- **Synonyms:** "branding" AND "styling"
|
|
125
|
+
- **File types:** "PowerPoint", "Excel", "PDF"
|
|
126
|
+
- **Actions:** "creating", "formatting", "analyzing", "validating"
|
|
127
|
+
- **Domain terms:** "financial ratios", "brand guidelines", "API patterns"
|
|
128
|
+
- **Natural phrases:** How users actually ask questions
|
|
129
|
+
|
|
130
|
+
**Example:**
|
|
131
|
+
|
|
132
|
+
```yaml
|
|
133
|
+
description: "This skill applies consistent corporate branding and styling to all generated documents including PowerPoint, Excel, and PDF files. Use when creating, formatting, or reviewing branded materials."
|
|
134
|
+
# Covers: branding, styling, documents, specific file types, multiple action verbs
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## Progressive Disclosure
|
|
138
|
+
|
|
139
|
+
### Keep Core Instructions Concise
|
|
140
|
+
|
|
141
|
+
**Main SKILL.md body:** Maximum 500 lines (excluding YAML frontmatter)
|
|
142
|
+
|
|
143
|
+
- Essential instructions only
|
|
144
|
+
- High-level workflow
|
|
145
|
+
- Links to supporting files
|
|
146
|
+
- Enforced by validation script
|
|
147
|
+
|
|
148
|
+
**Total skill bundle:** Maximum 8MB (all files combined)
|
|
149
|
+
|
|
150
|
+
- Includes SKILL.md + all supporting files + scripts
|
|
151
|
+
- Enforced by validation script
|
|
152
|
+
|
|
153
|
+
**Supporting files:** Loaded on-demand
|
|
154
|
+
|
|
155
|
+
- Detailed specifications → `reference/`
|
|
156
|
+
- Full examples → `examples/`
|
|
157
|
+
- Templates → `templates/`
|
|
158
|
+
- Scripts → `scripts/`
|
|
159
|
+
- **Files don't consume context until accessed** - you can include dozens of reference files without penalty
|
|
160
|
+
|
|
161
|
+
### When to Split Content
|
|
162
|
+
|
|
163
|
+
**Keep in SKILL.md:**
|
|
164
|
+
|
|
165
|
+
- Overview and purpose
|
|
166
|
+
- Key capabilities
|
|
167
|
+
- Basic usage steps
|
|
168
|
+
- Simple examples
|
|
169
|
+
- Links to detailed resources
|
|
170
|
+
|
|
171
|
+
**Move to supporting files:**
|
|
172
|
+
|
|
173
|
+
- Full skill examples (>50 lines)
|
|
174
|
+
- Detailed API specifications
|
|
175
|
+
- Complete templates
|
|
176
|
+
- Extensive best practices guides
|
|
177
|
+
- Industry benchmarks or lookup tables
|
|
178
|
+
|
|
179
|
+
### Reference File Organization Standards
|
|
180
|
+
|
|
181
|
+
**One Level Deep Linking:**
|
|
182
|
+
|
|
183
|
+
All reference files must link directly from SKILL.md - do not nest references within other references. This ensures Claude can read any reference file directly without navigation.
|
|
184
|
+
|
|
185
|
+
**Example (correct):**
|
|
186
|
+
|
|
187
|
+
```markdown
|
|
188
|
+
<!-- SKILL.md -->
|
|
189
|
+
For API details, see [reference/api-specification.md](reference/api-specification.md).
|
|
190
|
+
For error handling, see [reference/error-handling.md](reference/error-handling.md).
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
**Table of Contents for Long Files:**
|
|
194
|
+
|
|
195
|
+
Reference files exceeding 100 lines must include a table of contents at the top. This ensures Claude can see the full scope even in partial reads.
|
|
196
|
+
|
|
197
|
+
**Example:**
|
|
198
|
+
|
|
199
|
+
```markdown
|
|
200
|
+
# API Specification
|
|
201
|
+
|
|
202
|
+
## Table of Contents
|
|
203
|
+
|
|
204
|
+
- [Authentication](#authentication)
|
|
205
|
+
- [Endpoints](#endpoints)
|
|
206
|
+
- [Error Codes](#error-codes)
|
|
207
|
+
|
|
208
|
+
## Authentication
|
|
209
|
+
...
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
### Size Limit Guidelines
|
|
213
|
+
|
|
214
|
+
**SKILL.md body: 500 lines maximum (enforced)**
|
|
215
|
+
|
|
216
|
+
If approaching this limit:
|
|
217
|
+
- Extract detailed sections to reference files
|
|
218
|
+
- Move full examples to `examples/` directory
|
|
219
|
+
- Keep only essential instructions in SKILL.md
|
|
220
|
+
|
|
221
|
+
**Total skill bundle: 8MB maximum (enforced)**
|
|
222
|
+
|
|
223
|
+
If approaching this limit:
|
|
224
|
+
- Remove redundant content
|
|
225
|
+
- Compress or remove large images
|
|
226
|
+
- Split large reference files by topic
|
|
227
|
+
- Use external resources for very large datasets
|
|
228
|
+
|
|
229
|
+
**Reference files >100 lines: Add table of contents (warned if missing)**
|
|
230
|
+
|
|
231
|
+
This is a strong recommendation but not enforced with blocking errors.
|
|
232
|
+
|
|
233
|
+
**For comprehensive file organization guidance:** See [reference/file-organization.md](reference/file-organization.md)
|
|
234
|
+
|
|
235
|
+
## Scripts and Automation
|
|
236
|
+
|
|
237
|
+
### When to Bundle Scripts
|
|
238
|
+
|
|
239
|
+
Add scripts for:
|
|
240
|
+
|
|
241
|
+
- **Complex calculations** (financial ratios, statistical analysis)
|
|
242
|
+
- **Formatting automation** (brand application, document generation)
|
|
243
|
+
- **Data transformation** (parsing, conversion, validation)
|
|
244
|
+
- **Validation** (compliance checking, quality assurance)
|
|
245
|
+
|
|
246
|
+
### Script Documentation
|
|
247
|
+
|
|
248
|
+
Always document scripts clearly:
|
|
249
|
+
|
|
250
|
+
```markdown
|
|
251
|
+
## Scripts
|
|
252
|
+
|
|
253
|
+
- `calculate_ratios.py`: Main calculation engine for all financial ratios
|
|
254
|
+
- Input: Financial statement dict or CSV
|
|
255
|
+
- Output: Dict of calculated ratios with interpretations
|
|
256
|
+
- Usage: Called automatically when ratio calculation requested
|
|
257
|
+
|
|
258
|
+
- `interpret_ratios.py`: Provides interpretation and benchmarking
|
|
259
|
+
- Input: Calculated ratios dict
|
|
260
|
+
- Output: Textual interpretation with industry comparisons
|
|
261
|
+
- Usage: Called after calculations for context
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
### Benefits of Scripts
|
|
265
|
+
|
|
266
|
+
- **Context efficiency:** Script code never enters context, only output
|
|
267
|
+
- **Reliability:** Deterministic operations (calculations, formatting)
|
|
268
|
+
- **Maintainability:** Update logic without changing skill instructions
|
|
269
|
+
|
|
270
|
+
## Testing and Validation
|
|
271
|
+
|
|
272
|
+
### Test Activation
|
|
273
|
+
|
|
274
|
+
1. **Positive tests:** Ask questions matching your keywords
|
|
275
|
+
|
|
276
|
+
```text
|
|
277
|
+
"Calculate financial ratios for this company" # Should activate
|
|
278
|
+
"Analyze the P/E ratio" # Should activate
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
2. **Negative tests:** Ask unrelated questions
|
|
282
|
+
|
|
283
|
+
```text
|
|
284
|
+
"What's the weather today?" # Should NOT activate
|
|
285
|
+
"Write a Python function" # Should NOT activate (unless Python skill)
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
### Test Instructions
|
|
289
|
+
|
|
290
|
+
1. Follow your own "How to Use" steps
|
|
291
|
+
2. Verify examples work as described
|
|
292
|
+
3. Check that outputs match "Output Format" section
|
|
293
|
+
4. Ensure limitations are accurate
|
|
294
|
+
|
|
295
|
+
### Quality Checklist
|
|
296
|
+
|
|
297
|
+
Before finalizing:
|
|
298
|
+
|
|
299
|
+
**YAML Frontmatter:**
|
|
300
|
+
|
|
301
|
+
- [ ] Name is lowercase with hyphens, ≤64 chars
|
|
302
|
+
- [ ] Name matches directory name
|
|
303
|
+
- [ ] Description ≤1024 chars
|
|
304
|
+
- [ ] Description includes WHAT and WHEN
|
|
305
|
+
- [ ] No reserved words or XML tags
|
|
306
|
+
|
|
307
|
+
**Content:**
|
|
308
|
+
|
|
309
|
+
- [ ] Clear introduction
|
|
310
|
+
- [ ] Specific, actionable instructions
|
|
311
|
+
- [ ] Concrete examples
|
|
312
|
+
- [ ] Defined terminology
|
|
313
|
+
- [ ] Proper heading hierarchy
|
|
314
|
+
|
|
315
|
+
**Supporting Files:**
|
|
316
|
+
|
|
317
|
+
- [ ] Relative paths are correct
|
|
318
|
+
- [ ] Files exist in expected locations
|
|
319
|
+
- [ ] Scripts are documented
|
|
320
|
+
- [ ] No broken links
|
|
321
|
+
|
|
322
|
+
## Common Anti-Patterns
|
|
323
|
+
|
|
324
|
+
### ❌ Don't: Overly Broad Scope
|
|
325
|
+
|
|
326
|
+
```yaml
|
|
327
|
+
# Too broad - won't activate reliably
|
|
328
|
+
description: "Helps with programming tasks"
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
**Do:** Focus on specific domain
|
|
332
|
+
|
|
333
|
+
```yaml
|
|
334
|
+
description: "Python data science coding patterns for pandas and numpy. Use when analyzing data or creating visualizations"
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
### ❌ Don't: Missing Trigger Keywords
|
|
338
|
+
|
|
339
|
+
```yaml
|
|
340
|
+
description: "Contains financial information"
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
**Do:** Include action verbs and use cases
|
|
344
|
+
|
|
345
|
+
```yaml
|
|
346
|
+
description: "Calculates financial ratios and metrics from financial statement data for investment analysis"
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
### ❌ Don't: Vague Instructions
|
|
350
|
+
|
|
351
|
+
```markdown
|
|
352
|
+
## How to Use
|
|
353
|
+
|
|
354
|
+
1. Provide data
|
|
355
|
+
2. Get results
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
**Do:** Be specific
|
|
359
|
+
|
|
360
|
+
```markdown
|
|
361
|
+
## How to Use
|
|
362
|
+
|
|
363
|
+
1. **Provide financial statements:** Upload income statement, balance sheet, or provide revenue/earnings figures
|
|
364
|
+
2. **Specify ratios:** Request specific ratios (P/E, ROE) or "all" for comprehensive analysis
|
|
365
|
+
3. **Review results:** Calculated ratios with industry benchmarks and trend analysis
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
### ❌ Don't: Embed Large Examples
|
|
369
|
+
|
|
370
|
+
```markdown
|
|
371
|
+
# SKILL.md (1000+ lines with full examples)
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
**Do:** Extract to separate files
|
|
375
|
+
|
|
376
|
+
```markdown
|
|
377
|
+
# SKILL.md (300 lines)
|
|
378
|
+
See `examples/financial-analysis.md` for a complete example.
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
## Maintenance
|
|
382
|
+
|
|
383
|
+
### Keep Skills Updated
|
|
384
|
+
|
|
385
|
+
- Review quarterly for accuracy
|
|
386
|
+
- Update examples as best practices evolve
|
|
387
|
+
- Add new capabilities incrementally
|
|
388
|
+
- Deprecate outdated information
|
|
389
|
+
|
|
390
|
+
### Version Control
|
|
391
|
+
|
|
392
|
+
Use git to track changes:
|
|
393
|
+
|
|
394
|
+
```bash
|
|
395
|
+
git commit -m "skill-developer: Add visualization examples"
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
### Gather Feedback
|
|
399
|
+
|
|
400
|
+
Monitor skill effectiveness:
|
|
401
|
+
|
|
402
|
+
- Does it activate when expected?
|
|
403
|
+
- Are instructions clear to users?
|
|
404
|
+
- Do examples work correctly?
|
|
405
|
+
- Are there common questions not covered?
|
|
406
|
+
|
|
407
|
+
## Resources
|
|
408
|
+
|
|
409
|
+
- [Official Skills Documentation](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview)
|
|
410
|
+
- [Anthropic Cookbooks - Custom Skills](https://github.com/anthropics/claude-cookbooks/tree/main/skills/custom_skills)
|