@grimoire-cc/cli 0.6.3 → 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/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,321 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: grimoire:skill-developer
|
|
3
|
+
description: Create and maintain custom skills for Claude Code following official Anthropic patterns. Use when creating new skills, updating existing skills, or organizing skill documentation.
|
|
4
|
+
user_invocable: true
|
|
5
|
+
disable-model-invocation: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Skill Developer
|
|
9
|
+
|
|
10
|
+
This meta-skill teaches you how to create effective custom skills for Claude Code, following official Anthropic documentation and the progressive disclosure architecture.
|
|
11
|
+
|
|
12
|
+
## What Are Skills?
|
|
13
|
+
|
|
14
|
+
Skills are specialized knowledge modules that Claude loads when working on specific tasks. They provide:
|
|
15
|
+
|
|
16
|
+
- **Instruction sets:** Domain-specific guidance and patterns
|
|
17
|
+
- **Automatic activation:** Based on description keywords
|
|
18
|
+
- **Progressive disclosure:** Supporting files loaded on-demand
|
|
19
|
+
- **Context efficiency:** Only relevant content in context window
|
|
20
|
+
|
|
21
|
+
Skills live in `.claude/skills/{skill-name}/SKILL.md` with optional supporting files.
|
|
22
|
+
|
|
23
|
+
## When to Create a Skill
|
|
24
|
+
|
|
25
|
+
Create a skill when you need:
|
|
26
|
+
|
|
27
|
+
- **Consistent patterns** across multiple tasks (code style, financial analysis)
|
|
28
|
+
- **Domain expertise** captured in one place (industry standards, calculations)
|
|
29
|
+
- **Reference material** easily accessible (formulas, specifications)
|
|
30
|
+
- **Specialized workflows** for specific domains (multi-step processes)
|
|
31
|
+
|
|
32
|
+
**Don't create a skill when:**
|
|
33
|
+
|
|
34
|
+
- You need task execution (create an agent instead)
|
|
35
|
+
- It's a one-time task or simple query
|
|
36
|
+
- The domain is too broad or unfocused
|
|
37
|
+
|
|
38
|
+
## YAML Frontmatter Requirements
|
|
39
|
+
|
|
40
|
+
Every SKILL.md must start with YAML frontmatter:
|
|
41
|
+
|
|
42
|
+
```yaml
|
|
43
|
+
---
|
|
44
|
+
name: your-skill-name
|
|
45
|
+
description: "What this skill does and when to use it with trigger keywords"
|
|
46
|
+
---
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Quick Requirements
|
|
50
|
+
|
|
51
|
+
**`name` field:**
|
|
52
|
+
|
|
53
|
+
- Maximum 64 characters
|
|
54
|
+
- Lowercase letters, numbers, hyphens only
|
|
55
|
+
- Must match directory name exactly
|
|
56
|
+
- Cannot contain "anthropic" or "claude"
|
|
57
|
+
|
|
58
|
+
**`description` field:**
|
|
59
|
+
|
|
60
|
+
- Maximum 1024 characters
|
|
61
|
+
- Must include WHAT the skill does
|
|
62
|
+
- Must include WHEN to use it (trigger keywords)
|
|
63
|
+
|
|
64
|
+
**For detailed specifications:** See [reference/yaml-spec.md](reference/yaml-spec.md)
|
|
65
|
+
|
|
66
|
+
## Official Size and Structure Requirements
|
|
67
|
+
|
|
68
|
+
Every skill must comply with these official Anthropic requirements:
|
|
69
|
+
|
|
70
|
+
- **SKILL.md body:** Maximum 500 lines (excluding YAML frontmatter)
|
|
71
|
+
- **Total bundle size:** Maximum 8MB (all files combined)
|
|
72
|
+
- **Skills per request:** Maximum 8 skills can be loaded
|
|
73
|
+
- **Reference files >100 lines:** Must include table of contents at top
|
|
74
|
+
- **Reference file linking:** Keep all references one level deep from SKILL.md
|
|
75
|
+
|
|
76
|
+
These limits are enforced by the validation script and ensure optimal performance.
|
|
77
|
+
|
|
78
|
+
**For detailed file organization guidance:** See [reference/file-organization.md](reference/file-organization.md)
|
|
79
|
+
|
|
80
|
+
## File Structure Options
|
|
81
|
+
|
|
82
|
+
**Minimal (single file):**
|
|
83
|
+
|
|
84
|
+
```text
|
|
85
|
+
.claude/skills/skill-name/
|
|
86
|
+
└── SKILL.md
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
**Complete (progressive disclosure):**
|
|
90
|
+
|
|
91
|
+
```text
|
|
92
|
+
.claude/skills/skill-name/
|
|
93
|
+
├── SKILL.md # Core instructions (<500 lines)
|
|
94
|
+
├── templates/ # Skill templates
|
|
95
|
+
├── examples/ # Full skill examples
|
|
96
|
+
├── reference/ # Detailed specifications
|
|
97
|
+
└── scripts/ # Automation (Python, Bash)
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Claude loads supporting files only when relevant - **files don't consume context until accessed**. This means you can include dozens of reference files without penalty, as they're only loaded when Claude needs them.
|
|
101
|
+
|
|
102
|
+
## Content Structure Pattern
|
|
103
|
+
|
|
104
|
+
Follow this structure for SKILL.md:
|
|
105
|
+
|
|
106
|
+
1. **YAML Frontmatter** - Required (name, description)
|
|
107
|
+
2. **Title & Introduction** - What this skill does
|
|
108
|
+
3. **Capabilities** - What it can help with
|
|
109
|
+
4. **How to Use** - Step-by-step instructions
|
|
110
|
+
5. **Input/Output Format** - What goes in, what comes out
|
|
111
|
+
6. **Example Usage** - Concrete user queries
|
|
112
|
+
7. **Scripts** - Supporting automation (optional)
|
|
113
|
+
8. **Best Practices** - How to use well
|
|
114
|
+
9. **Limitations** - Boundaries and constraints
|
|
115
|
+
|
|
116
|
+
**Keep SKILL.md body under 500 lines.** Move detailed content to supporting files to stay within limits.
|
|
117
|
+
|
|
118
|
+
## Skill Creation Workflow
|
|
119
|
+
|
|
120
|
+
### 1. Define Scope
|
|
121
|
+
|
|
122
|
+
Answer before writing:
|
|
123
|
+
|
|
124
|
+
- What domain or task?
|
|
125
|
+
- What specific capabilities?
|
|
126
|
+
- What triggers activation (keywords)?
|
|
127
|
+
- What input does it need?
|
|
128
|
+
- What output does it produce?
|
|
129
|
+
|
|
130
|
+
### 2. Choose Template
|
|
131
|
+
|
|
132
|
+
Use `scripts/create-skill.sh` to scaffold from a template:
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
# Basic skill (single-purpose)
|
|
136
|
+
./scripts/create-skill.sh my-skill --template basic
|
|
137
|
+
|
|
138
|
+
# Domain skill (specialized expertise)
|
|
139
|
+
./scripts/create-skill.sh financial-analysis --template domain
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
**Templates:** See [templates/](templates/) directory
|
|
143
|
+
|
|
144
|
+
### 3. Write Content
|
|
145
|
+
|
|
146
|
+
Follow the content structure pattern:
|
|
147
|
+
|
|
148
|
+
- Be specific and actionable
|
|
149
|
+
- Use concrete examples
|
|
150
|
+
- Define terminology
|
|
151
|
+
- Keep it concise
|
|
152
|
+
|
|
153
|
+
**Best practices:** See [reference/best-practices.md](reference/best-practices.md)
|
|
154
|
+
|
|
155
|
+
### 4. Add Supporting Materials
|
|
156
|
+
|
|
157
|
+
**When to add scripts:**
|
|
158
|
+
|
|
159
|
+
- Complex calculations
|
|
160
|
+
- Formatting automation
|
|
161
|
+
- Data transformation
|
|
162
|
+
- Validation checks
|
|
163
|
+
|
|
164
|
+
**Progressive disclosure:**
|
|
165
|
+
|
|
166
|
+
- Detailed specs → `reference/`
|
|
167
|
+
- Full examples → `examples/`
|
|
168
|
+
- Templates → `templates/`
|
|
169
|
+
- Scripts → `scripts/`
|
|
170
|
+
|
|
171
|
+
### 5. Validate
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
./scripts/validate-skill.py .claude/skills/my-skill/SKILL.md
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Checks:
|
|
178
|
+
|
|
179
|
+
- YAML frontmatter format
|
|
180
|
+
- Name requirements
|
|
181
|
+
- Description requirements
|
|
182
|
+
- Directory name matching
|
|
183
|
+
|
|
184
|
+
### 6. Test Activation
|
|
185
|
+
|
|
186
|
+
Ask questions with your description keywords:
|
|
187
|
+
|
|
188
|
+
- Should activate for relevant queries
|
|
189
|
+
- Should NOT activate for unrelated queries
|
|
190
|
+
|
|
191
|
+
### 7. Refine
|
|
192
|
+
|
|
193
|
+
Adjust based on:
|
|
194
|
+
|
|
195
|
+
- Does it activate when expected?
|
|
196
|
+
- Are instructions clear?
|
|
197
|
+
- Do examples work?
|
|
198
|
+
|
|
199
|
+
## Examples
|
|
200
|
+
|
|
201
|
+
**Complete skill examples:**
|
|
202
|
+
|
|
203
|
+
- [examples/financial-analysis.md](examples/financial-analysis.md) - Financial ratio calculator
|
|
204
|
+
- [examples/brand-guidelines.md](examples/brand-guidelines.md) - Corporate branding standards
|
|
205
|
+
|
|
206
|
+
**Common patterns:**
|
|
207
|
+
|
|
208
|
+
- [reference/patterns.md](reference/patterns.md) - Structured data, standards enforcement, workflows
|
|
209
|
+
|
|
210
|
+
## Quick Start
|
|
211
|
+
|
|
212
|
+
Create a new skill in 5 steps:
|
|
213
|
+
|
|
214
|
+
**1. Use scaffolding script:**
|
|
215
|
+
|
|
216
|
+
```bash
|
|
217
|
+
cd .claude/skills/skill-developer/scripts
|
|
218
|
+
./create-skill.sh my-new-skill
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
**2. Edit the generated SKILL.md:**
|
|
222
|
+
|
|
223
|
+
- Add capabilities
|
|
224
|
+
- Write "How to Use" instructions
|
|
225
|
+
- Include example usage
|
|
226
|
+
- Add best practices and limitations
|
|
227
|
+
|
|
228
|
+
**3. Validate:**
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
./validate-skill.py ../my-new-skill/SKILL.md
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
**4. Test:**
|
|
235
|
+
Ask Claude questions matching your keywords
|
|
236
|
+
|
|
237
|
+
**5. Refine:**
|
|
238
|
+
Adjust description and content based on activation accuracy
|
|
239
|
+
|
|
240
|
+
## Automation Scripts
|
|
241
|
+
|
|
242
|
+
**Create new skill:**
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
scripts/create-skill.sh <skill-name> [--template basic|domain]
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
Scaffolds directory structure and SKILL.md from template
|
|
249
|
+
|
|
250
|
+
**Validate skill:**
|
|
251
|
+
|
|
252
|
+
```bash
|
|
253
|
+
scripts/validate-skill.py <path-to-SKILL.md>
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
Validates YAML frontmatter and requirements
|
|
257
|
+
|
|
258
|
+
## Best Practices Summary
|
|
259
|
+
|
|
260
|
+
**Discoverability:**
|
|
261
|
+
|
|
262
|
+
- Rich descriptions with action verbs
|
|
263
|
+
- Include domain terms and use cases
|
|
264
|
+
- Multiple trigger keywords
|
|
265
|
+
|
|
266
|
+
**Content Quality:**
|
|
267
|
+
|
|
268
|
+
- Specific, actionable instructions
|
|
269
|
+
- Concrete examples
|
|
270
|
+
- Defined terminology
|
|
271
|
+
|
|
272
|
+
**Organization:**
|
|
273
|
+
|
|
274
|
+
- Clear heading hierarchy
|
|
275
|
+
- Logical flow (what → how → examples → practices)
|
|
276
|
+
- Scannable formatting (bullets, bold, code blocks)
|
|
277
|
+
|
|
278
|
+
**Progressive Disclosure:**
|
|
279
|
+
|
|
280
|
+
- Keep SKILL.md body <500 lines, total bundle <8MB
|
|
281
|
+
- Move detailed content to supporting files
|
|
282
|
+
- Files don't consume context until accessed
|
|
283
|
+
- Scripts execute without entering context
|
|
284
|
+
|
|
285
|
+
**For comprehensive guidelines:** See [reference/best-practices.md](reference/best-practices.md)
|
|
286
|
+
|
|
287
|
+
## Common Patterns
|
|
288
|
+
|
|
289
|
+
Skills typically follow one of these patterns:
|
|
290
|
+
|
|
291
|
+
- **Structured Data Processing** - Analysis, calculations, transformations
|
|
292
|
+
- **Standards Enforcement** - Branding, style guides, compliance
|
|
293
|
+
- **Multi-Step Workflows** - Guided processes with phases
|
|
294
|
+
- **Reference and Lookup** - Quick access to specifications
|
|
295
|
+
|
|
296
|
+
**Pattern details:** See [reference/patterns.md](reference/patterns.md)
|
|
297
|
+
|
|
298
|
+
## Resources
|
|
299
|
+
|
|
300
|
+
### Official Documentation
|
|
301
|
+
|
|
302
|
+
- [Agent Skills Overview](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview)
|
|
303
|
+
- [Skills Best Practices](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices)
|
|
304
|
+
|
|
305
|
+
### Official Examples
|
|
306
|
+
|
|
307
|
+
- [Claude Cookbooks - Custom Skills](https://github.com/anthropics/claude-cookbooks/tree/main/skills/custom_skills)
|
|
308
|
+
|
|
309
|
+
### This Skill's Resources
|
|
310
|
+
|
|
311
|
+
- [templates/](templates/) - Basic and domain-specific templates
|
|
312
|
+
- [examples/](examples/) - Complete skill examples
|
|
313
|
+
- [reference/](reference/) - Detailed specifications and best practices
|
|
314
|
+
- [scripts/](scripts/) - Automation tools
|
|
315
|
+
|
|
316
|
+
## Limitations
|
|
317
|
+
|
|
318
|
+
- Skills don't execute tasks (they provide guidance to Claude)
|
|
319
|
+
- Custom skills don't sync across Claude surfaces (Code, API, claude.ai)
|
|
320
|
+
- Activation depends on keyword matching in description
|
|
321
|
+
- Skills load at startup (Level 1 metadata ~100 tokens per skill)
|
|
@@ -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
|