@v587d/capital-generation 2.7.0 → 2.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.
Files changed (80) hide show
  1. package/CHANGELOG.md +44 -1
  2. package/LICENSE +1 -1
  3. package/README.md +7 -7
  4. package/THIRD_PARTY_NOTICES.md +12 -4
  5. package/capital-config/client.js +50 -10
  6. package/capital-config/client.src.cjs +376 -62
  7. package/capital-config/index.js +168 -5
  8. package/capital-config/package.json +1 -1
  9. package/capital-watchlist/package.json +1 -1
  10. package/chart-ui/package.json +1 -1
  11. package/lib/agents/selected-skills-provider.js +5 -5
  12. package/lib/index.d.ts +4 -28
  13. package/lib/index.js +8 -18
  14. package/lib/web-retriever/local-fetch.d.ts +1 -1
  15. package/lib/web-retriever/local-fetch.js +1 -1
  16. package/lib/web-retriever/wind-client.d.ts +1 -1
  17. package/lib/web-retriever/wind-client.js +1 -1
  18. package/package.json +2 -1
  19. package/selected-skills/InvestSkill/ADDING-NEW-SKILLS.md +546 -0
  20. package/selected-skills/InvestSkill/CHANGELOG.md +373 -0
  21. package/selected-skills/InvestSkill/CI-CD-GUIDE.md +432 -0
  22. package/selected-skills/InvestSkill/CLAUDE.md +148 -0
  23. package/selected-skills/InvestSkill/CONTRIBUTING.md +291 -0
  24. package/selected-skills/InvestSkill/DEPLOYMENTS.md +321 -0
  25. package/selected-skills/InvestSkill/FAQ.md +509 -0
  26. package/selected-skills/InvestSkill/GEMINI.md +419 -0
  27. package/selected-skills/InvestSkill/LICENSE +21 -0
  28. package/selected-skills/InvestSkill/PLATFORM-COMPATIBILITY.md +529 -0
  29. package/selected-skills/InvestSkill/README-claude-code.md +435 -0
  30. package/selected-skills/InvestSkill/README-cursor.md +475 -0
  31. package/selected-skills/InvestSkill/README-gemini.md +532 -0
  32. package/selected-skills/InvestSkill/README-ollama.md +106 -0
  33. package/selected-skills/InvestSkill/README-zh-TW.md +461 -0
  34. package/selected-skills/InvestSkill/README.md +311 -0
  35. package/selected-skills/InvestSkill/RELEASE-QUICK-REFERENCE.md +230 -0
  36. package/selected-skills/InvestSkill/RELEASE_NOTES.md +121 -0
  37. package/selected-skills/InvestSkill/SECURITY.md +232 -0
  38. package/selected-skills/InvestSkill/TODO.md +28 -0
  39. package/selected-skills/InvestSkill/UPSTREAM.md +62 -0
  40. package/selected-skills/InvestSkill/install.sh +212 -0
  41. package/selected-skills/InvestSkill/package.json +64 -0
  42. package/selected-skills/InvestSkill/plugins/us-stock-analysis/README.md +119 -0
  43. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/10k-digest/SKILL.md +338 -0
  44. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/bear-case/SKILL.md +233 -0
  45. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/catalyst-calendar/SKILL.md +327 -0
  46. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/chart-master/SKILL.md +648 -0
  47. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/competitor-analysis/SKILL.md +478 -0
  48. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/dcf-valuation/SKILL.md +109 -0
  49. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/dividend-analysis/SKILL.md +684 -0
  50. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/earnings-call-analysis/SKILL.md +456 -0
  51. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/earnings-preview/SKILL.md +277 -0
  52. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/economics-analysis/SKILL.md +349 -0
  53. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/etf-analysis/SKILL.md +279 -0
  54. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/fact-check/SKILL.md +288 -0
  55. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/financial-report-analyst/SKILL.md +544 -0
  56. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/full-report/SKILL.md +301 -0
  57. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/fundamental-analysis/SKILL.md +67 -0
  58. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/industry-map/SKILL.md +336 -0
  59. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/insider-trading/SKILL.md +502 -0
  60. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/institutional-ownership/SKILL.md +548 -0
  61. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/learning-coach/SKILL.md +311 -0
  62. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/options-analysis/SKILL.md +495 -0
  63. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/portfolio-review/SKILL.md +465 -0
  64. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/position-ladder/SKILL.md +429 -0
  65. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/report-generator/SKILL.md +857 -0
  66. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/research-bundle/SKILL.md +94 -0
  67. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/result-validator/SKILL.md +174 -0
  68. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/risk-stress-test/SKILL.md +293 -0
  69. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/sector-analysis/SKILL.md +426 -0
  70. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/short-interest/SKILL.md +397 -0
  71. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/stock-eval/SKILL.md +645 -0
  72. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/stock-screener/SKILL.md +244 -0
  73. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/stock-valuation/SKILL.md +640 -0
  74. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/tax-lens/SKILL.md +351 -0
  75. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/technical-analysis/SKILL.md +654 -0
  76. package/selected-skills/InvestSkill/plugins/us-stock-analysis/skills/thesis-tracker/SKILL.md +317 -0
  77. package/selected-skills/README.md +15 -5
  78. package/selected-skills/catalog.js +566 -14
  79. package/selected-skills/investment-skills/UPSTREAM.md +1 -1
  80. package/selected-skills/investment-skills/skills/buffett-investment-framework/SKILL.md +1 -1
@@ -0,0 +1,546 @@
1
+ # Adding a New Skill to InvestSkill
2
+
3
+ Comprehensive guide for contributing a new analysis skill to the InvestSkill project.
4
+
5
+ > **Fast path.** Most of the steps below are automated:
6
+ >
7
+ > ```bash
8
+ > node scripts/new-skill.js my-analysis --category advanced \
9
+ > --title "My Analysis" --desc "One-line description" \
10
+ > --zh-title "中文名" --goal "I want to …" --goal-zh "我想要…"
11
+ > ```
12
+ >
13
+ > This scaffolds `SKILL.md` with the full output contract already in place (Data Verification gate, `Data & Sources` header, Thesis Invalidation, Investment Signal block, disclaimer), generates `prompts/my-analysis.md`, adds the skill to the site's `SKILL_CATEGORIES`, inserts "goal → skill" rows in both `CHOOSE-A-SKILL` pages, adds README / cross-AI table rows and directory-tree lines, and writes a `CHANGELOG.md` line under `[Unreleased]`. You then write the analysis, run `node scripts/sync-prompts.js my-analysis`, update the two Cookbook skill counts, and run `npm test`. The manual walkthrough below explains what each of those files is for.
14
+ >
15
+ > **The prompt is generated, never hand-edited.** `prompts/<name>.md` is produced from `SKILL.md` by `scripts/sync-prompts.js` (frontmatter stripped, `/us-stock-analysis:x` → `x`, `/x` → `x`, "Claude analyzes" → "The assistant analyzes"). `npm test` runs `sync-prompts.js --check` and fails on drift. Write anything platform-specific platform-neutrally in `SKILL.md` itself.
16
+ >
17
+ > **The output contract is enforced.** `scripts/check-skill-contract.js` (in `npm test`) fails if any analysis skill lacks the Data Verification gate, the `Data & Sources` header, a Thesis Invalidation section, the signal block, or the disclaimer. Output tools, aliases, and meta skills are exempt via `scripts/lib/skill-registry.js`.
18
+
19
+ ---
20
+
21
+ ## Table of Contents
22
+
23
+ 1. [Understanding Skills](#understanding-skills)
24
+ 2. [File Structure](#file-structure)
25
+ 3. [Step-by-Step Walkthrough](#step-by-step-walkthrough)
26
+ 4. [Testing Your Skill](#testing-your-skill)
27
+ 5. [Platform Sync Checklist](#platform-sync-checklist)
28
+ 6. [Review Process](#review-process)
29
+
30
+ ---
31
+
32
+ ## Understanding Skills
33
+
34
+ An InvestSkill **skill** is a reusable investment analysis framework available across multiple platforms:
35
+
36
+ - **Claude Code Plugin**: `/skill-name` command with parameters
37
+ - **Cursor IDE**: `@prompts/skill-name.md` file reference in rules
38
+ - **Gemini CLI**: `@prompts/skill-name.md` file reference in GEMINI.md
39
+ - **GitHub Copilot**: Context-loaded from `.github/copilot-instructions.md`
40
+ - **Universal**: Copy-paste from `prompts/skill-name.md`
41
+
42
+ ### Skill Categories
43
+
44
+ | Category (`--category`) | Purpose | Examples |
45
+ |--------------------------|---------|----------|
46
+ | Core Stock Analysis (`core`) | Fundamental evaluation and valuation | stock-eval, stock-valuation, technical-analysis, economics-analysis |
47
+ | Financial Reports (`reports`) | Document analysis | financial-report-analyst, 10k-digest, earnings-call-analysis |
48
+ | Market Monitoring (`monitoring`) | Activity tracking | insider-trading, dividend-analysis, short-interest |
49
+ | Advanced Research (`advanced`) | Specialized evaluation | bear-case, position-ladder, thesis-tracker, industry-map |
50
+ | Meta & Output (`meta`) | Orchestration, validation, output | full-report, result-validator, chart-master, report-generator |
51
+ | Aliases | Redirect stubs — installed, **not counted as frameworks** | fundamental-analysis → stock-eval, dcf-valuation → stock-valuation, research-bundle → full-report |
52
+
53
+ The advertised framework count is derived: skill directories − output tools − aliases (`scripts/lib/skill-registry.js`). Do not hardcode it anywhere; `npm test` checks every doc that states it.
54
+
55
+ ---
56
+
57
+ ## File Structure
58
+
59
+ When adding a new skill named `my-analysis`, create these files:
60
+
61
+ ```
62
+ InvestSkill/
63
+ ├── plugins/us-stock-analysis/skills/my-analysis/
64
+ │ ├── SKILL.md ← Claude Code skill definition
65
+ │ └── ... ← Any supporting files
66
+ ├── prompts/
67
+ │ └── my-analysis.md ← Universal prompt — GENERATED by scripts/sync-prompts.js
68
+ ├── site/build/build-site.js ← Add to SKILL_CATEGORIES (new-skill.js does this)
69
+ ├── site/content/CHOOSE-A-SKILL*.md ← "goal → skill" row, both languages
70
+ ├── .cursor/rules/
71
+ │ └── invest-skill.mdc ← Update with new skill reference
72
+ ├── .github/
73
+ │ └── copilot-instructions.md ← Update with new skill
74
+ ├── GEMINI.md ← Update with new skill
75
+ ├── README.md ← Update features list
76
+ ├── README-*.md ← Update platform-specific guides
77
+ └── CHANGELOG.md ← Record the addition
78
+ ```
79
+
80
+ ---
81
+
82
+ ## Step-by-Step Walkthrough
83
+
84
+ ### Step 1: Create Skill Directory
85
+
86
+ ```bash
87
+ mkdir -p plugins/us-stock-analysis/skills/my-analysis
88
+ cd plugins/us-stock-analysis/skills/my-analysis
89
+ ```
90
+
91
+ ### Step 2: Create SKILL.md File
92
+
93
+ Create `SKILL.md` with this structure:
94
+
95
+ ```markdown
96
+ ---
97
+ description: Brief one-line description of the skill
98
+ ---
99
+
100
+ # My Analysis Skill
101
+
102
+ ## Overview
103
+ [2-3 sentences explaining what this skill does and when to use it]
104
+
105
+ ## Framework
106
+
107
+ ### Phase 1: [Phase Name]
108
+ [Describe the first analysis phase]
109
+
110
+ ### Phase 2: [Phase Name]
111
+ [Describe the second phase]
112
+
113
+ ## Inputs Required
114
+
115
+ - **Stock Ticker**: AAPL, MSFT, etc.
116
+ - **Optional Data**: [Any additional data needed]
117
+
118
+ ## Output Format
119
+
120
+ All analyses include:
121
+
122
+ 1. **Executive Summary** — Key findings (2-3 sentences)
123
+ 2. **Quantitative Analysis** — Specific metrics and numbers
124
+ 3. **Qualitative Assessment** — Market dynamics, competitive factors
125
+ 4. **Investment Signal Block** — Standard signal box
126
+
127
+ ### Investment Signal Block
128
+
129
+ ```
130
+ ╔══════════════════════════════════════════════╗
131
+ ║ INVESTMENT SIGNAL ║
132
+ ╠══════════════════════════════════════════════╣
133
+ ║ Signal: BULLISH / NEUTRAL / BEARISH ║
134
+ ║ Confidence: HIGH / MEDIUM / LOW ║
135
+ ║ Horizon: SHORT / MEDIUM / LONG-TERM ║
136
+ ║ Score: X.X / 10 ║
137
+ ╠══════════════════════════════════════════════╣
138
+ ║ Action: BUY / HOLD / SELL ║
139
+ ║ Conviction: STRONG / MODERATE / WEAK ║
140
+ ╚══════════════════════════════════════════════╝
141
+ ```
142
+
143
+ ## Example
144
+
145
+ > Analyze Apple (AAPL) using the [skill name] framework
146
+
147
+ [Provide a realistic example output matching the signal block format]
148
+
149
+ ## Notes
150
+
151
+ - [Any important caveats or assumptions]
152
+ - [Limitations of the framework]
153
+ - [When to use vs. when to use other skills]
154
+
155
+ ---
156
+
157
+ **Framework Version**: 1.0
158
+ **Last Updated**: [Date]
159
+ **Status**: Active
160
+ ```
161
+
162
+ ### Step 3: Generate prompts/my-analysis.md
163
+
164
+ ```bash
165
+ node scripts/sync-prompts.js my-analysis
166
+ ```
167
+
168
+ The universal prompt is **generated** from `SKILL.md` — never edit it by hand. `npm test` runs `sync-prompts.js --check` and fails if the two drift. The generator strips the frontmatter and rewrites Claude Code syntax (`/us-stock-analysis:x` → `x`, `/x` → `x`); anything else platform-specific must be written platform-neutrally in `SKILL.md`.
169
+
170
+ ### Step 4: Manifests
171
+
172
+ Skills are **auto-discovered** from `plugins/us-stock-analysis/skills/` — there is no `skills[]` array to edit in `plugin.json`. The version is bumped at release time (`npm run release`), in all three manifests at once (`plugin.json`, `.claude-plugin/marketplace.json`, `package.json`); see the Release Timing Rule in `CLAUDE.md`. If you do bump in the branch, keep all three equal — `npm test` checks parity.
173
+
174
+ ### Step 5: Update the site
175
+
176
+ Add the skill to `SKILL_CATEGORIES` in `site/build/build-site.js` (otherwise it renders under "Other"), and add a "goal → skill" row to `site/content/CHOOSE-A-SKILL.md` **and** `CHOOSE-A-SKILL-zh-TW.md`. `new-skill.js` does both. Update the skill counts in `site/content/COOKBOOK.md` and `COOKBOOK-zh-TW.md` ("N available skills") — `npm test` checks them.
177
+
178
+ ### Step 6: Update .cursor/rules/invest-skill.mdc
179
+
180
+ Add a reference to the new skill in the rules file. Find the section listing all frameworks and add:
181
+
182
+ ```
183
+ @prompts/my-analysis.md for My Analysis Skill — [brief description]
184
+ ```
185
+
186
+ ### Step 7: Update .github/copilot-instructions.md
187
+
188
+ Add the skill to the framework list:
189
+
190
+ ```markdown
191
+ ## Available Frameworks
192
+
193
+ ### [Category Name] (N)
194
+ - My Analysis Skill (`@prompts/my-analysis.md`) — [description]
195
+ ```
196
+
197
+ ### Step 8: Update GEMINI.md
198
+
199
+ Add to the appropriate section:
200
+
201
+ ```markdown
202
+ @prompts/my-analysis.md for My Analysis Skill — [brief description]
203
+ ```
204
+
205
+ ### Step 9: Update README.md
206
+
207
+ 1. Add to features list
208
+ 2. Add skill to appropriate section
209
+ 3. Add usage example
210
+ 4. Update the skill/framework count to the new total (in every header and intro that states it)
211
+
212
+ ### Step 10: Update Platform-Specific README Files
213
+
214
+ Update each of these:
215
+ - `README-claude-code.md` — Add `/my-analysis` command and example
216
+ - `README-cursor.md` — Add to skill table
217
+ - `README-gemini.md` — Add to framework list
218
+
219
+ ### Step 11: Update CHANGELOG.md
220
+
221
+ Add to the `[Unreleased]` section:
222
+
223
+ ```markdown
224
+ ## [Unreleased]
225
+
226
+ ### Added
227
+ - New `/my-analysis` skill for [description]
228
+ - [Key feature 1]
229
+ - [Key feature 2]
230
+ - [Key feature 3]
231
+ ```
232
+
233
+ ### Step 12: Commit Changes
234
+
235
+ ```bash
236
+ git add -A
237
+ git commit -m "feat: add my-analysis skill for [description]
238
+
239
+ - New SKILL.md with [key features]
240
+ - Universal prompt: prompts/my-analysis.md
241
+ - Registered in all platforms: Claude Code, Cursor, Gemini, Copilot
242
+ - Platform docs updated: README*.md
243
+
244
+ Total skills: N → N+1"
245
+ ```
246
+
247
+ ---
248
+
249
+ ## Testing Your Skill
250
+
251
+ ### 1. Run Unit Tests
252
+
253
+ ```bash
254
+ npm test
255
+ ```
256
+
257
+ `npm test` runs four suites: structure and counts (`test-skills.js`), the skill contract (`check-skill-contract.js`), prompt sync (`sync-prompts.js --check`), and the install script (`test-install.js`). All must pass; the exact check count grows with each skill, so no number is stated here.
258
+
259
+ To check that the skill *behaves* — not just that it is shaped right — run the opt-in behavioural eval against the fictional fixture: `EVAL_CMD='claude -p' node scripts/eval-skills.js --skills my-analysis` (see `scripts/eval-skills.js` and `data/fixtures/ZEPH.md`).
260
+
261
+ ### 2. Verify File Structure
262
+
263
+ ```bash
264
+ # Check SKILL.md exists
265
+ ls plugins/us-stock-analysis/skills/my-analysis/SKILL.md
266
+
267
+ # Check prompts/ sync
268
+ ls prompts/my-analysis.md
269
+
270
+ # Check frontmatter removed from prompts version
271
+ head -1 prompts/my-analysis.md # Should NOT start with ---
272
+ ```
273
+
274
+ ### 3. Validate JSON Manifests
275
+
276
+ ```bash
277
+ jq empty plugins/us-stock-analysis/.claude-plugin/plugin.json
278
+ jq empty .claude-plugin/marketplace.json
279
+ echo "✅ JSON valid"
280
+ ```
281
+
282
+ ### 4. Test Signal Block Format
283
+
284
+ The SKILL.md must include a properly formatted signal block at the end:
285
+
286
+ ```bash
287
+ grep -A 10 "INVESTMENT SIGNAL" plugins/us-stock-analysis/skills/my-analysis/SKILL.md
288
+ ```
289
+
290
+ ### 5. Test Across Platforms (Manual)
291
+
292
+ **Claude Code:**
293
+ ```bash
294
+ claude
295
+ /plugin list | grep my-analysis
296
+ /us-stock-analysis:my-analysis AAPL
297
+ ```
298
+
299
+ **Cursor:**
300
+ ```bash
301
+ cursor .
302
+ # In AI Chat:
303
+ @prompts/my-analysis.md Analyze AAPL
304
+ ```
305
+
306
+ **Gemini CLI:**
307
+ ```bash
308
+ cd /path/to/InvestSkill
309
+ gemini
310
+ > @prompts/my-analysis.md Analyze AAPL
311
+ ```
312
+
313
+ ---
314
+
315
+ ## Platform Sync Checklist
316
+
317
+ Use this checklist to ensure your skill is available across all platforms:
318
+
319
+ ```
320
+ Claude Code Plugin
321
+ ☐ Registered in plugins/us-stock-analysis/.claude-plugin/plugin.json
322
+ ☐ SKILL.md file created with frontmatter
323
+ ☐ Tested with /us-stock-analysis:my-analysis
324
+ ☐ Appears in /plugin list
325
+
326
+ Cursor IDE Rules
327
+ ☐ Added to .cursor/rules/invest-skill.mdc
328
+ ☐ Referenced with @prompts/my-analysis.md
329
+ ☐ Tested in Cursor AI Chat (Cmd+K)
330
+
331
+ Gemini CLI
332
+ ☐ Added to GEMINI.md
333
+ ☐ Referenced with @prompts/my-analysis.md
334
+ ☐ prompts/my-analysis.md exists (no frontmatter)
335
+ ☐ Tested with > @prompts/my-analysis.md
336
+
337
+ GitHub Copilot
338
+ ☐ Added to .github/copilot-instructions.md
339
+ ☐ Works in VS Code / JetBrains
340
+
341
+ Universal Access
342
+ ☐ prompts/my-analysis.md created (AI-agnostic)
343
+ ☐ No slash commands or platform-specific syntax
344
+ ☐ Compatible with ChatGPT, Claude.ai, etc.
345
+
346
+ Documentation
347
+ ☐ README.md updated
348
+ ☐ README-claude-code.md updated
349
+ ☐ README-cursor.md updated
350
+ ☐ README-gemini.md updated
351
+ ☐ CHANGELOG.md updated
352
+
353
+ Quality
354
+ ☐ Frontmatter in SKILL.md only (not in prompts/)
355
+ ☐ Signal block at end of both files
356
+ ☐ npm test passes (270+ tests)
357
+ ☐ No JSON validation errors
358
+ ```
359
+
360
+ ---
361
+
362
+ ## Review Process
363
+
364
+ ### Before Submitting PR
365
+
366
+ 1. **Run pre-release validation**:
367
+ ```bash
368
+ npm run pre-release
369
+ ```
370
+
371
+ 2. **Check test coverage**:
372
+ ```bash
373
+ npm test 2>&1 | tail -20
374
+ ```
375
+
376
+ 3. **Verify version bumps**:
377
+ ```bash
378
+ jq '.version' plugins/us-stock-analysis/.claude-plugin/plugin.json
379
+ jq '.metadata.version' .claude-plugin/marketplace.json
380
+ # Both should match (e.g., 1.5.0)
381
+ ```
382
+
383
+ 4. **Test locally across platforms** (if possible)
384
+
385
+ 5. **Lint markdown**:
386
+ ```bash
387
+ # Check for common markdown issues
388
+ grep -r "^---" prompts/my-analysis.md # Should be empty
389
+ ```
390
+
391
+ ### PR Checklist
392
+
393
+ When submitting your PR, include:
394
+
395
+ - [ ] New skill file: `plugins/us-stock-analysis/skills/my-analysis/SKILL.md`
396
+ - [ ] Universal prompt: `prompts/my-analysis.md` (no frontmatter)
397
+ - [ ] Registration: Updated `plugin.json`, `marketplace.json`
398
+ - [ ] Platform sync: Updated `.cursor/`, `.github/`, `GEMINI.md`
399
+ - [ ] Documentation: Updated all README files
400
+ - [ ] Changelog: Added to `CHANGELOG.md`
401
+ - [ ] Tests pass: `npm test` shows 270+ passed
402
+ - [ ] No JSON errors: `npm run validate` passes
403
+ - [ ] Version bumped: Both manifest files updated
404
+
405
+ ### Merge Criteria
406
+
407
+ Your PR will be merged when:
408
+
409
+ ✅ All tests pass
410
+ ✅ Platform sync complete (5/5 platforms)
411
+ ✅ Documentation updated (all guides)
412
+ ✅ Changelog entry added
413
+ ✅ Version consistency verified
414
+
415
+ ---
416
+
417
+ ## Common Patterns
418
+
419
+ ### Pattern 1: Valuation Skills
420
+
421
+ Skills that estimate stock fair value:
422
+
423
+ ```markdown
424
+ ## Output Format
425
+
426
+ 1. **Valuation Summary** — Fair value range ($X - $Y)
427
+ 2. **Methodology** — How the range was calculated
428
+ 3. **Scenarios** — Bull/Base/Bear cases
429
+ 4. **Sensitivity Analysis** — How sensitive to key assumptions
430
+ 5. **Margin of Safety** — Discount to fair value at current price
431
+ 6. **Investment Signal Block** — BUY/HOLD/SELL recommendation
432
+ ```
433
+
434
+ ### Pattern 2: Quality Assessment Skills
435
+
436
+ Skills that evaluate company fundamentals:
437
+
438
+ ```markdown
439
+ ## Scoring Framework
440
+
441
+ - **Metric A**: 0-30 points
442
+ - **Metric B**: 0-30 points
443
+ - **Metric C**: 0-40 points
444
+ - **Total**: 0-100 with letter grade (A/B/C/D/F)
445
+
446
+ ## Risk Factors
447
+
448
+ [List the top risks to the investment thesis]
449
+ ```
450
+
451
+ ### Pattern 3: Technical/Market Monitoring Skills
452
+
453
+ Skills that analyze charts, insider activity, or market signals:
454
+
455
+ ```markdown
456
+ ## Key Indicators
457
+
458
+ 1. **Indicator A** — What it means, how to interpret
459
+ 2. **Indicator B** — What it means, how to interpret
460
+ 3. **Indicator C** — What it means, how to interpret
461
+
462
+ ## Signal Interpretation
463
+
464
+ - **Green flags**: When to be bullish
465
+ - **Red flags**: When to be bearish
466
+ - **Neutral**: When the signal is unclear
467
+ ```
468
+
469
+ ---
470
+
471
+ ## Troubleshooting
472
+
473
+ ### "npm test" fails after adding skill
474
+
475
+ **Problem**: Tests fail with "skill not registered" or similar
476
+
477
+ **Solution**:
478
+ 1. Verify `plugin.json` has your skill name
479
+ 2. Verify SKILL.md file exists
480
+ 3. Verify frontmatter is present in SKILL.md (not in prompts/)
481
+ 4. Run: `jq '.skills' plugins/us-stock-analysis/.claude-plugin/plugin.json | grep my-analysis`
482
+
483
+ ### Signal block not rendering in GitHub/Cursor
484
+
485
+ **Problem**: Signal block appears broken in some platforms
486
+
487
+ **Solution**:
488
+ 1. Ensure it's the last section of SKILL.md and prompts/*.md
489
+ 2. Verify box-drawing characters are UTF-8 encoded
490
+ 3. Test in raw text editor (not markdown preview)
491
+
492
+ ### Prompts file has frontmatter
493
+
494
+ **Problem**: `prompts/my-analysis.md` starts with `---`
495
+
496
+ **Solution**:
497
+ ```bash
498
+ # Remove lines 1-3 (the YAML frontmatter)
499
+ tail -n +4 plugins/us-stock-analysis/skills/my-analysis/SKILL.md > prompts/my-analysis.md
500
+ ```
501
+
502
+ ### Skill not available in Cursor/Gemini
503
+
504
+ **Problem**: `@prompts/my-analysis.md` not recognized
505
+
506
+ **Solution**:
507
+ 1. Verify `prompts/my-analysis.md` exists
508
+ 2. Verify added to `.cursor/rules/invest-skill.mdc`
509
+ 3. Verify added to `GEMINI.md`
510
+ 4. Restart IDE/CLI
511
+ 5. Check file permissions: `chmod 644 prompts/my-analysis.md`
512
+
513
+ ---
514
+
515
+ ## Example: Real Skill Addition
516
+
517
+ See the v1.3.0 release for a real-world example:
518
+
519
+ - **Stock Valuation Skill**: PR adding `/stock-valuation`
520
+ - Multi-method valuation (DCF, CCA, EV/EBITDA, P/E, residual income)
521
+ - Football field summary
522
+ - Risk-adjusted expected return
523
+ - Registered across all 5 platforms
524
+
525
+ Review the commit to see all the changes needed:
526
+
527
+ ```bash
528
+ git log --oneline | grep "stock-valuation"
529
+ # Find the commit and run: git show <commit-hash>
530
+ ```
531
+
532
+ ---
533
+
534
+ ## Support
535
+
536
+ Need help?
537
+
538
+ - 📖 [Check PLATFORM-COMPATIBILITY.md](PLATFORM-COMPATIBILITY.md) for platform-specific details
539
+ - 💬 [Open a GitHub Discussion](https://github.com/yennanliu/InvestSkill/discussions)
540
+ - 🐛 [File an issue](https://github.com/yennanliu/InvestSkill/issues)
541
+
542
+ ---
543
+
544
+ **Last Updated**: 2026-07-05
545
+ **Total Skills**: 27 skill directories (26 advertised frameworks + `report-generator` output tool)
546
+ **Next Review**: When adding new skill