@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.
Files changed (35) hide show
  1. package/dist/bin.js +4 -1
  2. package/dist/bin.js.map +1 -1
  3. package/dist/commands/logs.d.ts.map +1 -1
  4. package/dist/commands/logs.js +2 -2
  5. package/dist/commands/logs.js.map +1 -1
  6. package/dist/static/log-viewer.html +946 -690
  7. package/dist/static/static/log-viewer.html +946 -690
  8. package/package.json +1 -1
  9. package/packs/dev-pack/agents/gr.code-reviewer.md +286 -0
  10. package/packs/dev-pack/agents/gr.tdd-specialist.md +44 -0
  11. package/packs/dev-pack/grimoire.json +55 -0
  12. package/packs/dev-pack/skills/gr.tdd-specialist/SKILL.md +247 -0
  13. package/packs/dev-pack/skills/gr.tdd-specialist/reference/anti-patterns.md +166 -0
  14. package/packs/dev-pack/skills/gr.tdd-specialist/reference/language-frameworks.md +388 -0
  15. package/packs/dev-pack/skills/gr.tdd-specialist/reference/tdd-workflow-patterns.md +135 -0
  16. package/packs/docs-pack/grimoire.json +30 -0
  17. package/packs/docs-pack/skills/gr.business-logic-docs/SKILL.md +141 -0
  18. package/packs/docs-pack/skills/gr.business-logic-docs/references/tier2-template.md +74 -0
  19. package/packs/essentials-pack/agents/gr.fact-checker.md +202 -0
  20. package/packs/essentials-pack/grimoire.json +12 -0
  21. package/packs/meta-pack/grimoire.json +72 -0
  22. package/packs/meta-pack/skills/gr.context-file-guide/SKILL.md +201 -0
  23. package/packs/meta-pack/skills/gr.context-file-guide/scripts/validate-context-file.sh +29 -0
  24. package/packs/meta-pack/skills/gr.readme-guide/SKILL.md +362 -0
  25. package/packs/meta-pack/skills/gr.skill-developer/SKILL.md +321 -0
  26. package/packs/meta-pack/skills/gr.skill-developer/examples/brand-guidelines.md +94 -0
  27. package/packs/meta-pack/skills/gr.skill-developer/examples/financial-analysis.md +85 -0
  28. package/packs/meta-pack/skills/gr.skill-developer/reference/best-practices.md +410 -0
  29. package/packs/meta-pack/skills/gr.skill-developer/reference/file-organization.md +452 -0
  30. package/packs/meta-pack/skills/gr.skill-developer/reference/patterns.md +459 -0
  31. package/packs/meta-pack/skills/gr.skill-developer/reference/yaml-spec.md +214 -0
  32. package/packs/meta-pack/skills/gr.skill-developer/scripts/create-skill.sh +210 -0
  33. package/packs/meta-pack/skills/gr.skill-developer/scripts/validate-skill.py +520 -0
  34. package/packs/meta-pack/skills/gr.skill-developer/templates/basic-skill.md +94 -0
  35. package/packs/meta-pack/skills/gr.skill-developer/templates/domain-skill.md +108 -0
@@ -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)