@v587d/capital-generation 2.7.0 → 2.7.2

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 (92) hide show
  1. package/CHANGELOG.md +77 -1
  2. package/LICENSE +1 -1
  3. package/README.md +10 -9
  4. package/THIRD_PARTY_NOTICES.md +14 -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 +3 -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 +589 -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
  81. package/selected-skills/peter-lynch-skill/LICENSE +21 -0
  82. package/selected-skills/peter-lynch-skill/README.md +305 -0
  83. package/selected-skills/peter-lynch-skill/UPSTREAM.md +71 -0
  84. package/selected-skills/peter-lynch-skill/skills/peter-lynch-skill/SKILL.md +142 -0
  85. package/selected-skills/peter-lynch-skill/skills/peter-lynch-skill/references/deep/methodology.md +587 -0
  86. package/selected-skills/peter-lynch-skill/skills/peter-lynch-skill/references/deep/system-prompt.md +102 -0
  87. package/selected-skills/peter-lynch-skill/skills/peter-lynch-skill/references/deep/web-research.md +471 -0
  88. package/selected-skills/peter-lynch-skill/skills/peter-lynch-skill/references/disclaimer.md +2 -0
  89. package/selected-skills/peter-lynch-skill/skills/peter-lynch-skill/references/filing-rules.md +64 -0
  90. package/selected-skills/peter-lynch-skill/skills/peter-lynch-skill/references/quick/methodology.md +195 -0
  91. package/selected-skills/peter-lynch-skill/skills/peter-lynch-skill/references/quick/system-prompt.md +72 -0
  92. package/selected-skills/peter-lynch-skill/skills/peter-lynch-skill/references/quick/web-research.md +379 -0
@@ -0,0 +1,857 @@
1
+ ---
2
+ name: report-generator
3
+ description: Generate professional HTML/PDF investment reports with interactive visualizations
4
+ ---
5
+
6
+ # Report Generator
7
+
8
+ Generate exportable HTML/PDF reports with interactive charts and visualizations from investment analysis data.
9
+
10
+ ## Report Templates
11
+
12
+ 1. **Executive Summary Report**
13
+ - High-level overview (1-2 pages)
14
+ - Key metrics and investment thesis
15
+ - Critical charts only
16
+ - Ideal for stakeholder presentations
17
+
18
+ 2. **Comprehensive Analysis Report**
19
+ - Full detailed analysis (5-10 pages)
20
+ - All data sections and visualizations
21
+ - Methodology and assumptions
22
+ - Complete investment case
23
+
24
+ 3. **Portfolio Review Report**
25
+ - Multi-stock comparison
26
+ - Portfolio allocation charts
27
+ - Risk metrics and diversification analysis
28
+ - Performance attribution
29
+
30
+ ## Visualization Components
31
+
32
+ ### Financial Charts
33
+ - **Line Charts**: Revenue/earnings trends, price history
34
+ - **Bar Charts**: Quarterly comparisons, segment breakdowns
35
+ - **Stacked Area**: Balance sheet composition, revenue mix
36
+ - **Waterfall Charts**: Cash flow analysis, earnings bridges
37
+ - **Pie Charts**: Geographic/product segment revenue split
38
+
39
+ ### Valuation Charts
40
+ - **Comparison Charts**: P/E, P/B, EV/EBITDA vs. peers and historical averages
41
+ - **DCF Sensitivity Tables**: Value ranges under different scenarios
42
+ - **Multiple Expansion/Contraction**: Historical valuation bands
43
+
44
+ ### Technical Charts
45
+ - **Price Charts**: Candlesticks with moving averages overlay
46
+ - **Volume Bars**: Trading volume patterns
47
+ - **Indicator Panels**: RSI, MACD, Bollinger Bands
48
+ - **Support/Resistance**: Key price levels annotated
49
+
50
+ ## HTML Report Structure
51
+
52
+ Generate standalone HTML file with the following structure:
53
+
54
+ ```html
55
+ <!DOCTYPE html>
56
+ <html lang="en">
57
+ <head>
58
+ <meta charset="UTF-8">
59
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
60
+ <title>Investment Analysis Report - [TICKER] - [DATE]</title>
61
+
62
+ <script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.0/dist/chart.umd.min.js"></script>
63
+
64
+ <style>
65
+ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;600&display=swap');
66
+
67
+ :root {
68
+ --navy: #0F172A;
69
+ --navy-mid: #1E293B;
70
+ --sky: #0284C7;
71
+ --sky-light: #E0F2FE;
72
+ --teal: #0D9488;
73
+ --teal-light: #CCFBF1;
74
+ --emerald: #059669;
75
+ --emerald-light: #D1FAE5;
76
+ --red: #DC2626;
77
+ --red-light: #FEE2E2;
78
+ --amber: #D97706;
79
+ --amber-light: #FEF3C7;
80
+ --slate: #64748B;
81
+ --slate-light: #F1F5F9;
82
+ --border: #E2E8F0;
83
+ --text-primary: #0F172A;
84
+ --text-secondary:#475569;
85
+ --text-muted: #94A3B8;
86
+ --grad-hero: linear-gradient(135deg, #0F172A 0%, #1E3A5F 55%, #0284C7 100%);
87
+ --grad-accent: linear-gradient(90deg, #0284C7, #0D9488);
88
+ --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
89
+ --shadow-md: 0 4px 16px rgba(0,0,0,.08), 0 2px 8px rgba(0,0,0,.04);
90
+ }
91
+
92
+ * { margin: 0; padding: 0; box-sizing: border-box; }
93
+
94
+ body {
95
+ font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
96
+ line-height: 1.6;
97
+ color: var(--text-primary);
98
+ background: #F8FAFC;
99
+ }
100
+
101
+ /* ── HERO ── */
102
+ .report-hero {
103
+ background: var(--grad-hero);
104
+ padding: 56px 48px 48px;
105
+ position: relative;
106
+ overflow: hidden;
107
+ }
108
+ .report-hero::before {
109
+ content: '';
110
+ position: absolute; top: -80px; right: -80px;
111
+ width: 420px; height: 420px; border-radius: 50%;
112
+ background: rgba(2,132,199,.12);
113
+ }
114
+ .report-hero::after {
115
+ content: '';
116
+ position: absolute; bottom: -60px; left: -40px;
117
+ width: 300px; height: 300px; border-radius: 50%;
118
+ background: rgba(13,148,136,.10);
119
+ }
120
+ .hero-inner { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; }
121
+ .hero-badge {
122
+ display: inline-flex; align-items: center; gap: 6px;
123
+ background: rgba(2,132,199,.18);
124
+ border: 1px solid rgba(2,132,199,.35);
125
+ color: #7DD3FC;
126
+ font-size: 11px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase;
127
+ padding: 4px 14px; border-radius: 20px; margin-bottom: 22px;
128
+ }
129
+ .hero-ticker {
130
+ font-size: 72px; font-weight: 800; color: #fff;
131
+ letter-spacing: -2px; line-height: 1;
132
+ font-family: 'JetBrains Mono', monospace;
133
+ }
134
+ .hero-company { font-size: 19px; font-weight: 400; color: rgba(255,255,255,.65); margin-top: 8px; }
135
+ .hero-rule {
136
+ width: 48px; height: 3px;
137
+ background: var(--grad-accent); border-radius: 2px;
138
+ margin: 24px 0;
139
+ }
140
+ .hero-meta { display: flex; flex-wrap: wrap; gap: 28px; }
141
+ .hero-meta-item { display: flex; flex-direction: column; gap: 3px; }
142
+ .hero-meta-label {
143
+ font-size: 9px; font-weight: 700; letter-spacing: 1.2px;
144
+ text-transform: uppercase; color: rgba(255,255,255,.38);
145
+ }
146
+ .hero-meta-value { font-size: 13px; font-weight: 500; color: rgba(255,255,255,.82); }
147
+
148
+ /* ── BODY ── */
149
+ .report-body { max-width: 1100px; margin: 0 auto; padding: 40px 24px 80px; }
150
+
151
+ /* ── TABLE OF CONTENTS ── */
152
+ .toc {
153
+ background: #fff; border: 1px solid var(--border);
154
+ border-radius: 12px; padding: 28px 32px;
155
+ margin-bottom: 32px; box-shadow: var(--shadow-sm);
156
+ }
157
+ .toc-label {
158
+ font-size: 10px; font-weight: 700; letter-spacing: 1.6px;
159
+ text-transform: uppercase; color: var(--text-muted); margin-bottom: 14px;
160
+ }
161
+ .toc-grid {
162
+ list-style: none;
163
+ display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px 24px;
164
+ }
165
+ .toc-grid a {
166
+ font-size: 13px; font-weight: 500; color: var(--sky);
167
+ text-decoration: none; display: flex; align-items: center; gap: 6px;
168
+ }
169
+ .toc-grid a::before { content: '›'; font-size: 14px; color: var(--text-muted); }
170
+ .toc-grid a:hover { color: var(--teal); }
171
+
172
+ /* ── SECTION CARD ── */
173
+ .section {
174
+ background: #fff; border: 1px solid var(--border);
175
+ border-radius: 12px; padding: 32px;
176
+ margin-bottom: 20px; box-shadow: var(--shadow-sm);
177
+ page-break-inside: avoid;
178
+ }
179
+ .section-head {
180
+ display: flex; align-items: center; gap: 12px;
181
+ margin-bottom: 24px; padding-bottom: 18px;
182
+ border-bottom: 1px solid var(--border);
183
+ }
184
+ .section-icon {
185
+ width: 36px; height: 36px; border-radius: 8px;
186
+ background: var(--sky-light);
187
+ display: flex; align-items: center; justify-content: center;
188
+ font-size: 17px; flex-shrink: 0;
189
+ }
190
+ .section-title { font-size: 18px; font-weight: 700; color: var(--navy); letter-spacing: -.3px; }
191
+ .section-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
192
+ .section-num {
193
+ margin-left: auto;
194
+ font-size: 11px; font-weight: 600;
195
+ font-family: 'JetBrains Mono', monospace;
196
+ color: var(--text-muted);
197
+ background: var(--slate-light);
198
+ padding: 2px 9px; border-radius: 4px;
199
+ }
200
+
201
+ /* ── METRIC CARDS ── */
202
+ .metrics-grid {
203
+ display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
204
+ gap: 16px; margin: 24px 0;
205
+ }
206
+ .metric-card {
207
+ background: var(--slate-light); border: 1px solid var(--border);
208
+ border-radius: 10px; padding: 20px;
209
+ transition: box-shadow .2s;
210
+ }
211
+ .metric-card:hover { box-shadow: var(--shadow-md); }
212
+ .metric-card.positive { border-top: 3px solid var(--emerald); }
213
+ .metric-card.negative { border-top: 3px solid var(--red); }
214
+ .metric-card.neutral { border-top: 3px solid var(--sky); }
215
+ .metric-card.warning { border-top: 3px solid var(--amber); }
216
+ .metric-label {
217
+ font-size: 10px; font-weight: 600; letter-spacing: .8px;
218
+ text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px;
219
+ }
220
+ .metric-value {
221
+ font-size: 26px; font-weight: 800; color: var(--navy);
222
+ letter-spacing: -.5px;
223
+ font-family: 'JetBrains Mono', monospace;
224
+ }
225
+ .metric-delta {
226
+ font-size: 11px; font-weight: 600; margin-top: 6px;
227
+ display: flex; align-items: center; gap: 3px;
228
+ }
229
+ .metric-delta.up { color: var(--emerald); }
230
+ .metric-delta.down { color: var(--red); }
231
+ .metric-delta.flat { color: var(--text-muted); }
232
+ .metric-ctx { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
233
+
234
+ /* ── CHART CONTAINER ── */
235
+ .chart-wrap {
236
+ background: #fff; border: 1px solid var(--border);
237
+ border-radius: 10px; padding: 24px; margin: 20px 0;
238
+ box-shadow: var(--shadow-sm);
239
+ }
240
+ .chart-label {
241
+ font-size: 11px; font-weight: 600; letter-spacing: .6px;
242
+ text-transform: uppercase; color: var(--text-muted); margin-bottom: 16px;
243
+ }
244
+ .chart-canvas { position: relative; height: 320px; }
245
+
246
+ /* ── TABLES ── */
247
+ .table-scroll { overflow-x: auto; border-radius: 8px; border: 1px solid var(--border); margin: 16px 0; }
248
+ table { width: 100%; border-collapse: collapse; font-size: 13px; }
249
+ thead th {
250
+ background: var(--navy); color: rgba(255,255,255,.80);
251
+ padding: 11px 14px; text-align: left;
252
+ font-size: 10px; font-weight: 600; letter-spacing: .7px; text-transform: uppercase;
253
+ white-space: nowrap;
254
+ }
255
+ tbody tr:nth-child(even) { background: var(--slate-light); }
256
+ tbody tr:hover { background: var(--sky-light); }
257
+ tbody td { padding: 10px 14px; border-bottom: 1px solid var(--border); }
258
+ tbody tr:last-child td { border-bottom: none; }
259
+ .td-pos { color: var(--emerald); font-weight: 600; }
260
+ .td-neg { color: var(--red); font-weight: 600; }
261
+ .td-mono { font-family: 'JetBrains Mono', monospace; font-size: 12px; }
262
+
263
+ /* ── CALLOUT / HIGHLIGHT ── */
264
+ .callout {
265
+ border-left: 4px solid var(--sky); background: var(--sky-light);
266
+ border-radius: 0 8px 8px 0; padding: 14px 18px;
267
+ margin: 14px 0; font-size: 14px; color: var(--text-secondary);
268
+ }
269
+ .callout.warn { border-color: var(--amber); background: var(--amber-light); }
270
+ .callout.danger { border-color: var(--red); background: var(--red-light); }
271
+ .callout.success { border-color: var(--emerald); background: var(--emerald-light); }
272
+
273
+ /* ── TAGS ── */
274
+ .tag { display: inline-block; padding: 2px 9px; border-radius: 4px; font-size: 11px; font-weight: 600; }
275
+ .tag-buy { background: var(--emerald-light); color: var(--emerald); }
276
+ .tag-sell { background: var(--red-light); color: var(--red); }
277
+ .tag-hold { background: var(--amber-light); color: var(--amber); }
278
+ .tag-info { background: var(--sky-light); color: var(--sky); }
279
+
280
+ /* ── INVESTMENT SIGNAL BOX ── */
281
+ .signal-box {
282
+ background: var(--navy); border-radius: 12px;
283
+ padding: 32px 36px; margin: 32px 0;
284
+ position: relative; overflow: hidden;
285
+ }
286
+ .signal-box::before {
287
+ content: '';
288
+ position: absolute; top: 0; left: 0; right: 0; height: 3px;
289
+ background: var(--grad-accent);
290
+ }
291
+ .signal-box.bullish .signal-watermark { color: rgba( 52,211,153,.07); }
292
+ .signal-box.bearish .signal-watermark { color: rgba(248,113,113,.07); }
293
+ .signal-box.neutral .signal-watermark { color: rgba(148,163,184,.07); }
294
+ .signal-watermark {
295
+ position: absolute; right: 28px; top: 50%;
296
+ transform: translateY(-50%);
297
+ font-size: 108px; font-weight: 800; letter-spacing: -4px;
298
+ font-family: 'JetBrains Mono', monospace;
299
+ pointer-events: none; user-select: none;
300
+ }
301
+ .signal-eyebrow {
302
+ font-size: 9px; font-weight: 700; letter-spacing: 2px;
303
+ text-transform: uppercase; color: rgba(255,255,255,.35);
304
+ margin-bottom: 10px;
305
+ }
306
+ .signal-verdict {
307
+ font-size: 44px; font-weight: 800; letter-spacing: -1.5px;
308
+ font-family: 'JetBrains Mono', monospace;
309
+ margin-bottom: 24px;
310
+ }
311
+ .signal-verdict.bullish { color: #34D399; }
312
+ .signal-verdict.bearish { color: #F87171; }
313
+ .signal-verdict.neutral { color: #94A3B8; }
314
+ .signal-stats {
315
+ display: flex; flex-wrap: wrap; gap: 20px 36px;
316
+ }
317
+ .signal-stat { display: flex; flex-direction: column; gap: 4px; }
318
+ .signal-stat-label {
319
+ font-size: 9px; font-weight: 700; letter-spacing: 1.2px;
320
+ text-transform: uppercase; color: rgba(255,255,255,.35);
321
+ }
322
+ .signal-stat-val { font-size: 14px; font-weight: 700; color: rgba(255,255,255,.88); }
323
+ .score-track {
324
+ background: rgba(255,255,255,.12);
325
+ border-radius: 3px; height: 5px; margin-top: 7px; overflow: hidden;
326
+ }
327
+ .score-fill {
328
+ height: 100%; border-radius: 3px;
329
+ background: var(--grad-accent);
330
+ }
331
+
332
+ /* ── FOOTER ── */
333
+ .report-footer {
334
+ border-top: 1px solid var(--border);
335
+ padding-top: 24px; margin-top: 48px;
336
+ display: flex; gap: 20px; align-items: flex-start;
337
+ }
338
+ .footer-disc {
339
+ font-size: 11px; color: var(--text-muted); line-height: 1.75; flex: 1;
340
+ }
341
+ .footer-brand {
342
+ font-size: 11px; font-weight: 600; color: var(--text-muted);
343
+ white-space: nowrap; text-align: right; line-height: 1.6;
344
+ }
345
+
346
+ /* ── PRINT ── */
347
+ @media print {
348
+ body { background: #fff; }
349
+ .report-hero { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
350
+ .section { box-shadow: none; }
351
+ .chart-canvas { height: 260px; }
352
+ }
353
+
354
+ /* ── RESPONSIVE ── */
355
+ @media (max-width: 768px) {
356
+ .report-hero { padding: 36px 24px 32px; }
357
+ .hero-ticker { font-size: 48px; }
358
+ .report-body { padding: 24px 16px 48px; }
359
+ .section { padding: 20px; }
360
+ .metrics-grid { grid-template-columns: repeat(2, 1fr); }
361
+ .signal-watermark { display: none; }
362
+ }
363
+ </style>
364
+ </head>
365
+ <body>
366
+
367
+ <!-- HERO HEADER -->
368
+ <div class="report-hero">
369
+ <div class="hero-inner">
370
+ <div class="hero-badge">&#9679;&nbsp; Investment Analysis Report</div>
371
+ <div class="hero-ticker">[TICKER]</div>
372
+ <div class="hero-company">[Company Full Name] &nbsp;·&nbsp; [Exchange]</div>
373
+ <div class="hero-rule"></div>
374
+ <div class="hero-meta">
375
+ <div class="hero-meta-item">
376
+ <span class="hero-meta-label">Report Date</span>
377
+ <span class="hero-meta-value">[DATE]</span>
378
+ </div>
379
+ <div class="hero-meta-item">
380
+ <span class="hero-meta-label">Report Type</span>
381
+ <span class="hero-meta-value">[TYPE]</span>
382
+ </div>
383
+ <div class="hero-meta-item">
384
+ <span class="hero-meta-label">Analyst</span>
385
+ <span class="hero-meta-value">InvestSkill Investment Analysis</span>
386
+ </div>
387
+ <div class="hero-meta-item">
388
+ <span class="hero-meta-label">Price at Report</span>
389
+ <span class="hero-meta-value">$[PRICE]</span>
390
+ </div>
391
+ </div>
392
+ </div>
393
+ </div>
394
+
395
+ <div class="report-body">
396
+
397
+ <!-- Table of Contents -->
398
+ <div class="toc">
399
+ <div class="toc-label">Contents</div>
400
+ <ul class="toc-grid">
401
+ <li><a href="#summary">Executive Summary</a></li>
402
+ <li><a href="#financials">Financial Performance</a></li>
403
+ <li><a href="#valuation">Valuation Analysis</a></li>
404
+ <li><a href="#technical">Technical Analysis</a></li>
405
+ <li><a href="#risks">Risk Factors</a></li>
406
+ <li><a href="#signal">Investment Signal</a></li>
407
+ </ul>
408
+ </div>
409
+
410
+ <!-- 01 Executive Summary -->
411
+ <div class="section" id="summary">
412
+ <div class="section-head">
413
+ <div class="section-icon">📋</div>
414
+ <div>
415
+ <div class="section-title">Executive Summary</div>
416
+ <div class="section-sub">Key investment thesis and highlights</div>
417
+ </div>
418
+ <span class="section-num">01</span>
419
+ </div>
420
+
421
+ [Summary content]
422
+
423
+ <div class="metrics-grid">
424
+ <div class="metric-card positive">
425
+ <div class="metric-label">Revenue (TTM)</div>
426
+ <div class="metric-value">$[X]B</div>
427
+ <div class="metric-delta up">▲ [X]% YoY</div>
428
+ </div>
429
+ <div class="metric-card positive">
430
+ <div class="metric-label">Net Income</div>
431
+ <div class="metric-value">$[X]B</div>
432
+ <div class="metric-delta up">▲ [X]% YoY</div>
433
+ </div>
434
+ <div class="metric-card neutral">
435
+ <div class="metric-label">P/E Ratio</div>
436
+ <div class="metric-value">[X]x</div>
437
+ <div class="metric-ctx">vs sector [X]x</div>
438
+ </div>
439
+ <div class="metric-card neutral">
440
+ <div class="metric-label">Market Cap</div>
441
+ <div class="metric-value">$[X]T</div>
442
+ <div class="metric-ctx">[Exchange]</div>
443
+ </div>
444
+ </div>
445
+ </div>
446
+
447
+ <!-- 02 Financial Performance -->
448
+ <div class="section" id="financials">
449
+ <div class="section-head">
450
+ <div class="section-icon">📊</div>
451
+ <div>
452
+ <div class="section-title">Financial Performance</div>
453
+ <div class="section-sub">Revenue, earnings, and margin trends</div>
454
+ </div>
455
+ <span class="section-num">02</span>
456
+ </div>
457
+
458
+ <div class="chart-wrap">
459
+ <div class="chart-label">Revenue &amp; Net Income — Annual ($B)</div>
460
+ <div class="chart-canvas">
461
+ <canvas id="revenueChart"></canvas>
462
+ </div>
463
+ </div>
464
+
465
+ [Analysis content]
466
+ </div>
467
+
468
+ <!-- 03 Valuation -->
469
+ <div class="section" id="valuation">
470
+ <div class="section-head">
471
+ <div class="section-icon">💰</div>
472
+ <div>
473
+ <div class="section-title">Valuation Analysis</div>
474
+ <div class="section-sub">DCF, multiples, and comparable companies</div>
475
+ </div>
476
+ <span class="section-num">03</span>
477
+ </div>
478
+ [Valuation content]
479
+ </div>
480
+
481
+ <!-- 04 Technical Analysis -->
482
+ <div class="section" id="technical">
483
+ <div class="section-head">
484
+ <div class="section-icon">📈</div>
485
+ <div>
486
+ <div class="section-title">Technical Analysis</div>
487
+ <div class="section-sub">Price action, indicators, and key levels</div>
488
+ </div>
489
+ <span class="section-num">04</span>
490
+ </div>
491
+ [Technical content]
492
+ </div>
493
+
494
+ <!-- 05 Risk Factors -->
495
+ <div class="section" id="risks">
496
+ <div class="section-head">
497
+ <div class="section-icon">⚠️</div>
498
+ <div>
499
+ <div class="section-title">Risk Factors</div>
500
+ <div class="section-sub">Key risks and mitigating considerations</div>
501
+ </div>
502
+ <span class="section-num">05</span>
503
+ </div>
504
+ [Risk content]
505
+ </div>
506
+
507
+ <!-- Investment Signal -->
508
+ <div class="signal-box bullish" id="signal">
509
+ <div class="signal-watermark">BULLISH</div>
510
+ <div class="signal-eyebrow">Investment Signal</div>
511
+ <div class="signal-verdict bullish">BULLISH</div>
512
+ <div class="signal-stats">
513
+ <div class="signal-stat">
514
+ <span class="signal-stat-label">Confidence</span>
515
+ <span class="signal-stat-val">HIGH</span>
516
+ </div>
517
+ <div class="signal-stat">
518
+ <span class="signal-stat-label">Time Horizon</span>
519
+ <span class="signal-stat-val">LONG-TERM</span>
520
+ </div>
521
+ <div class="signal-stat">
522
+ <span class="signal-stat-label">Action</span>
523
+ <span class="signal-stat-val">BUY</span>
524
+ </div>
525
+ <div class="signal-stat">
526
+ <span class="signal-stat-label">Conviction</span>
527
+ <span class="signal-stat-val">STRONG</span>
528
+ </div>
529
+ <div class="signal-stat">
530
+ <span class="signal-stat-label">Score</span>
531
+ <span class="signal-stat-val">8.4 / 10</span>
532
+ <div class="score-track">
533
+ <div class="score-fill" style="width: 84%"></div>
534
+ </div>
535
+ </div>
536
+ </div>
537
+ </div>
538
+
539
+ <!-- Footer -->
540
+ <div class="report-footer">
541
+ <div class="footer-disc">
542
+ <strong>Disclaimer:</strong> This report is generated by an AI assistant for informational purposes only
543
+ and does not constitute financial advice, a solicitation, or an offer to buy or sell any security.
544
+ Past performance is not indicative of future results. All investments carry risk.
545
+ Consult a licensed financial advisor before making investment decisions.
546
+ </div>
547
+ <div class="footer-brand">
548
+ InvestSkill<br>Investment Analysis
549
+ </div>
550
+ </div>
551
+
552
+ </div><!-- /.report-body -->
553
+
554
+ <script>
555
+ // Revenue & Earnings combo chart
556
+ const revenueCtx = document.getElementById('revenueChart').getContext('2d');
557
+ new Chart(revenueCtx, {
558
+ type: 'bar',
559
+ data: {
560
+ labels: ['2020', '2021', '2022', '2023', '2024'],
561
+ datasets: [
562
+ {
563
+ label: 'Revenue ($B)',
564
+ data: [100, 120, 145, 175, 210],
565
+ backgroundColor: 'rgba(2,132,199,.75)',
566
+ borderRadius: 4,
567
+ order: 2
568
+ },
569
+ {
570
+ label: 'Net Income ($B)',
571
+ data: [22, 28, 35, 44, 56],
572
+ type: 'line',
573
+ borderColor: '#0D9488',
574
+ backgroundColor: 'rgba(13,148,136,.10)',
575
+ borderWidth: 2.5,
576
+ pointRadius: 4,
577
+ pointBackgroundColor: '#0D9488',
578
+ tension: 0.35,
579
+ fill: true,
580
+ order: 1,
581
+ yAxisID: 'y1'
582
+ }
583
+ ]
584
+ },
585
+ options: {
586
+ responsive: true,
587
+ maintainAspectRatio: false,
588
+ interaction: { mode: 'index', intersect: false },
589
+ plugins: {
590
+ legend: {
591
+ position: 'top',
592
+ labels: { font: { family: 'Inter', size: 11 }, usePointStyle: true, boxWidth: 8 }
593
+ },
594
+ tooltip: {
595
+ backgroundColor: '#0F172A',
596
+ titleColor: '#94A3B8',
597
+ bodyColor: '#FFFFFF',
598
+ borderColor: '#334155',
599
+ borderWidth: 1,
600
+ padding: 10,
601
+ cornerRadius: 6
602
+ }
603
+ },
604
+ scales: {
605
+ x: {
606
+ grid: { display: false },
607
+ ticks: { font: { family: 'Inter', size: 11 }, color: '#94A3B8' }
608
+ },
609
+ y: {
610
+ grid: { color: '#F1F5F9' },
611
+ ticks: { font: { family: 'Inter', size: 11 }, color: '#94A3B8' },
612
+ title: { display: true, text: 'Revenue ($B)', color: '#94A3B8', font: { size: 10 } }
613
+ },
614
+ y1: {
615
+ position: 'right',
616
+ grid: { display: false },
617
+ ticks: { font: { family: 'Inter', size: 11 }, color: '#0D9488' },
618
+ title: { display: true, text: 'Net Income ($B)', color: '#0D9488', font: { size: 10 } }
619
+ }
620
+ }
621
+ }
622
+ });
623
+ </script>
624
+ </body>
625
+ </html>
626
+ ```
627
+
628
+ ## Chart Data Format
629
+
630
+ When receiving analysis data, structure chart data as follows:
631
+
632
+ ```javascript
633
+ // Line chart data structure
634
+ {
635
+ chartType: 'line',
636
+ title: 'Revenue Growth Trend',
637
+ xAxis: ['2020', '2021', '2022', '2023', '2024'],
638
+ datasets: [
639
+ {
640
+ label: 'Revenue ($B)',
641
+ data: [100, 120, 145, 175, 210],
642
+ color: '#0284C7' // sky — primary series
643
+ }
644
+ ]
645
+ }
646
+
647
+ // Bar chart with multiple series
648
+ {
649
+ chartType: 'bar',
650
+ title: 'Quarterly Earnings Comparison',
651
+ xAxis: ['Q1', 'Q2', 'Q3', 'Q4'],
652
+ datasets: [
653
+ {
654
+ label: '2023',
655
+ data: [1.2, 1.5, 1.8, 2.1],
656
+ color: '#0284C7' // sky — primary
657
+ },
658
+ {
659
+ label: '2024',
660
+ data: [1.5, 1.8, 2.2, 2.5],
661
+ color: '#0D9488' // teal — secondary
662
+ }
663
+ ]
664
+ }
665
+ ```
666
+
667
+ ## PDF Export Instructions
668
+
669
+ To export the generated HTML report to PDF:
670
+
671
+ ### Method 1: Browser Print-to-PDF
672
+ 1. Open the HTML file in a web browser
673
+ 2. Press Ctrl+P (Cmd+P on Mac) or File → Print
674
+ 3. Select "Save as PDF" or "Microsoft Print to PDF"
675
+ 4. Adjust settings: margins, orientation, scale
676
+ 5. Save the PDF file
677
+
678
+ ### Method 2: wkhtmltopdf (Command Line)
679
+ ```bash
680
+ # Install wkhtmltopdf
681
+ # macOS: brew install wkhtmltopdf
682
+ # Linux: apt-get install wkhtmltopdf
683
+
684
+ # Convert HTML to PDF
685
+ wkhtmltopdf \
686
+ --page-size A4 \
687
+ --margin-top 15mm \
688
+ --margin-bottom 15mm \
689
+ --enable-local-file-access \
690
+ report.html report.pdf
691
+ ```
692
+
693
+ ### Method 3: Playwright/Puppeteer (Node.js)
694
+ ```javascript
695
+ const { chromium } = require('playwright');
696
+
697
+ (async () => {
698
+ const browser = await chromium.launch();
699
+ const page = await browser.newPage();
700
+ await page.goto('file:///path/to/report.html');
701
+ await page.pdf({
702
+ path: 'report.pdf',
703
+ format: 'A4',
704
+ printBackground: true
705
+ });
706
+ await browser.close();
707
+ })();
708
+ ```
709
+
710
+ ## Integration with Other Skills
711
+
712
+ ### Input Formats Accepted
713
+
714
+ 1. **Structured JSON Data**
715
+ ```json
716
+ {
717
+ "ticker": "AAPL",
718
+ "companyName": "Apple Inc.",
719
+ "analysisType": "fundamental",
720
+ "metrics": {...},
721
+ "charts": [...]
722
+ }
723
+ ```
724
+
725
+ 2. **Markdown Analysis Output**
726
+ - Parse markdown from fundamental-analysis, technical-analysis, or portfolio-review
727
+ - Extract tables, metrics, and key findings
728
+ - Generate appropriate visualizations
729
+
730
+ 3. **Custom Data Tables**
731
+ - CSV-formatted financial data
732
+ - Excel/spreadsheet data ranges
733
+ - Database query results
734
+
735
+ ### Workflow Examples
736
+
737
+ **Example 1: Fundamental Analysis Report**
738
+ ```
739
+ User: /stock-eval AAPL
740
+ [Assistant generates analysis]
741
+
742
+ User: /report-generator --type comprehensive --format html
743
+ [Claude generates HTML report with embedded fundamental analysis and charts]
744
+ ```
745
+
746
+ **Example 2: Portfolio Review with Custom Data**
747
+ ```
748
+ User: /report-generator --type portfolio --data [paste portfolio data]
749
+ [Claude generates multi-stock comparison report with allocation charts]
750
+ ```
751
+
752
+ ## Output
753
+
754
+ Generate a complete, standalone HTML file containing:
755
+
756
+ 1. **File Metadata**
757
+ - Filename format: `investment-report-[TICKER]-[YYYYMMDD]-[HHMMSS].html`
758
+ - File size indication
759
+ - Estimated PDF size after export
760
+
761
+ 2. **Report Contents**
762
+ - Professional header with company name, ticker, date
763
+ - Table of contents (for comprehensive reports)
764
+ - All analysis sections with appropriate formatting
765
+ - Interactive charts with Chart.js
766
+ - Data tables with styling
767
+ - Key metrics highlighted in cards
768
+ - Footer with disclaimer and generation info
769
+
770
+ 3. **Technical Details**
771
+ - Inline CSS (no external dependencies except CDN for Chart.js)
772
+ - Responsive design (mobile and desktop)
773
+ - Print-optimized styling for PDF export
774
+ - Cross-browser compatible (Chrome, Firefox, Safari, Edge)
775
+
776
+ 4. **Export Instructions**
777
+ - Step-by-step guide for converting to PDF
778
+ - Command-line examples for automated workflows
779
+ - Browser settings recommendations
780
+
781
+ ## Usage Notes
782
+
783
+ - The HTML file is fully self-contained except for Chart.js CDN (can be inlined if needed)
784
+ - Charts are interactive in HTML (hover for data points, zoom, pan)
785
+ - PDF export flattens charts to static images
786
+ - For large portfolios (>20 stocks), consider pagination or summary views
787
+ - Color scheme follows professional financial report standards (blue for primary, green for positive, red for negative)
788
+ - All monetary values should be formatted with proper thousands separators and currency symbols
789
+
790
+ ## Integration with Signal Format
791
+
792
+ When generating reports from other skills, the report MUST prominently display each skill's Investment Signal block in a styled box. Use the following HTML (matches the CSS in the template above):
793
+
794
+ ```html
795
+ <!-- Bullish signal example — swap class to "bearish" or "neutral" as needed -->
796
+ <div class="signal-box bullish">
797
+ <div class="signal-watermark">BULLISH</div>
798
+ <div class="signal-eyebrow">Investment Signal</div>
799
+ <div class="signal-verdict bullish">BULLISH</div>
800
+ <div class="signal-stats">
801
+ <div class="signal-stat">
802
+ <span class="signal-stat-label">Confidence</span>
803
+ <span class="signal-stat-val">HIGH</span>
804
+ </div>
805
+ <div class="signal-stat">
806
+ <span class="signal-stat-label">Time Horizon</span>
807
+ <span class="signal-stat-val">LONG-TERM</span>
808
+ </div>
809
+ <div class="signal-stat">
810
+ <span class="signal-stat-label">Action</span>
811
+ <span class="signal-stat-val">BUY</span>
812
+ </div>
813
+ <div class="signal-stat">
814
+ <span class="signal-stat-label">Conviction</span>
815
+ <span class="signal-stat-val">STRONG</span>
816
+ </div>
817
+ <div class="signal-stat">
818
+ <span class="signal-stat-label">Score</span>
819
+ <span class="signal-stat-val">X.X / 10</span>
820
+ <div class="score-track">
821
+ <div class="score-fill" style="width: XX%"></div>
822
+ </div>
823
+ </div>
824
+ </div>
825
+ </div>
826
+ ```
827
+
828
+ Design notes:
829
+ - `.signal-box` class: deep navy background with teal/sky gradient top border
830
+ - Add `bullish`, `bearish`, or `neutral` modifier class to both `.signal-box` and `.signal-verdict` to apply the correct verdict color and watermark tint
831
+ - Score progress bar uses the `score-fill` width as a percentage (e.g. `style="width: 84%"` for 8.4/10)
832
+ - Large ghost watermark text (`.signal-watermark`) reinforces the verdict at a glance
833
+
834
+ For multi-skill bundle reports (like /full-report), show a composite signal summary at the top of the report with individual skill scores in a row of `.signal-stat` items inside a single `.signal-box`.
835
+
836
+ ---
837
+
838
+ When this skill generates or embeds a signal in an HTML report, the signal block MUST follow this standardized format:
839
+
840
+ ```
841
+ ╔══════════════════════════════════════════════╗
842
+ ║ INVESTMENT SIGNAL ║
843
+ ╠══════════════════════════════════════════════╣
844
+ ║ Signal: BULLISH / NEUTRAL / BEARISH ║
845
+ ║ Confidence: HIGH / MEDIUM / LOW ║
846
+ ║ Horizon: SHORT / MEDIUM / LONG-TERM ║
847
+ ║ Score: X.X / 10 ║
848
+ ╠══════════════════════════════════════════════╣
849
+ ║ Action: BUY / HOLD / SELL ║
850
+ ║ Conviction: STRONG / MODERATE / WEAK ║
851
+ ╚══════════════════════════════════════════════╝
852
+ ```
853
+
854
+ Score Guide: 8.0–10.0 Strongly Bullish | 6.0–7.9 Moderately Bullish | 4.0–5.9 Neutral | 2.0–3.9 Moderately Bearish | 0.0–1.9 Strongly Bearish
855
+
856
+ **Disclaimer:** Educational analysis only. Not financial advice.
857
+