Skip to content

Commit 5ee835f

Browse files
committed
Initial commit: IB Deck Engine Claude Code plugin
A Claude Code plugin that ships a 14-template investment banking slide library with a JSON spec → deterministic pixel rendering architecture. Includes: - 7 slash commands: /ib-deck, /ib-extract, /ib-financial, /ib-football, /ib-comps, /ib-sources-uses, /ib-sensitivity - Master skill (SKILL.md) with template catalog and workflow rules - Bundled Python library (IBRenderer) with 14 templates - Reference docs: template catalog, JSON schemas, working examples - Plugin manifest and marketplace.json for installation Solves four critical failure modes that exist in the financial-services-plugins: 1. Cross-model desync (DCF vs LBO inconsistency) — single source of truth JSON 2. openpyxl corruption (Excel recovery dialogs) — defaults to xlsxwriter 3. Spatial execution failures (right-alignment, proportional bars) — JSON spec architecture 4. Generic titles — SKILL.md enforces action titles Companion to standalone library at github.com/gorajing/ib-deck-engine.
0 parents  commit 5ee835f

22 files changed

Lines changed: 4380 additions & 0 deletions

.claude-plugin/marketplace.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "ib-deck-plugin",
3+
"owner": {
4+
"name": "gorajing"
5+
},
6+
"metadata": {
7+
"description": "Investment banking slide template library for Claude Code. JSON spec → deterministic pixel rendering. Solves cross-model desync, openpyxl corruption, and spatial execution failures.",
8+
"version": "0.1.0"
9+
},
10+
"plugins": [
11+
{
12+
"name": "ib-deck-engine",
13+
"source": ".",
14+
"description": "14-template IB slide library. Build pitch decks, football fields, financial summaries, sensitivity grids, sources & uses, trading comps via /ib-deck and friends.",
15+
"category": "investment-banking",
16+
"tags": ["investment-banking", "powerpoint", "financial-models", "dcf", "lbo", "templates"]
17+
}
18+
]
19+
}

.claude-plugin/plugin.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"name": "ib-deck-engine",
3+
"version": "0.1.0",
4+
"description": "Investment banking slide template library with JSON spec → deterministic pixel rendering. Solves cross-model desync, openpyxl corruption, and spatial execution failures by separating content reasoning from layout execution.",
5+
"author": {
6+
"name": "gorajing"
7+
}
8+
}

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
__pycache__/
2+
*.py[cod]
3+
*.so
4+
.DS_Store
5+
.idea/
6+
.vscode/
7+
*.swp
8+
venv/
9+
env/
10+
.venv/
11+
*.tmp
12+
.cache/

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 IB Deck Engine contributors
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
# IB Deck Engine — Claude Code Plugin
2+
3+
> A Claude Code plugin that ships a 14-template investment banking slide library with a JSON spec → deterministic pixel rendering architecture.
4+
5+
**Why this exists:** Other AI slide tools ask the LLM to write spatial code (`Inches(2.5), Pt(11)`). That's why their output has misaligned tables, disproportional bar charts, and reference label collisions. This plugin separates content reasoning (LLM's strength) from spatial rendering (deterministic code's strength). Right-alignment is guaranteed by the template, not hoped for.
6+
7+
## Installation
8+
9+
```bash
10+
claude plugin marketplace add gorajing/ib-deck-plugin
11+
claude plugin install ib-deck-engine@ib-deck-plugin
12+
```
13+
14+
Or install directly:
15+
16+
```bash
17+
git clone https://github.com/gorajing/ib-deck-plugin ~/.claude/plugins/local/ib-deck-plugin
18+
```
19+
20+
Verify installation:
21+
22+
```bash
23+
claude plugin list | grep ib-deck
24+
```
25+
26+
## Available commands
27+
28+
| Command | Purpose |
29+
|---------|---------|
30+
| `/ib-deck [TICKER]` | Build a complete 14-slide IB pitch deck for a public company |
31+
| `/ib-extract [TICKER]` | Pull a 10-K from SEC EDGAR into a structured JSON master file |
32+
| `/ib-financial [COMPANY]` | Build a single financial summary table slide |
33+
| `/ib-football [COMPANY]` | Build a football field valuation summary slide |
34+
| `/ib-comps [TARGET]` | Build a trading comparables peer multiples table |
35+
| `/ib-sources-uses [DEAL]` | Build an LBO Sources & Uses table |
36+
| `/ib-sensitivity [COMPANY]` | Build a DCF sensitivity grid (WACC × TGR) |
37+
38+
## Quick start
39+
40+
```bash
41+
# In Claude Code, after installing the plugin:
42+
/ib-deck ADUS
43+
```
44+
45+
Claude will:
46+
1. Pull Addus HomeCare's most recent 10-K from SEC EDGAR via `edgartools`
47+
2. Extract financials into a structured JSON master file
48+
3. Fill JSON specs for 14 slide templates
49+
4. Render a pixel-perfect PPTX using the IBRenderer
50+
5. Save to `ADUS_pitch_deck.pptx`
51+
52+
The entire pipeline takes one prompt.
53+
54+
## What this plugin solves that the existing financial-services-plugins doesn't
55+
56+
I built this after analyzing the source code of `anthropics/financial-services-plugins`. Here are the specific gaps it fills:
57+
58+
### 1. Cross-model desync ✗ → ✓
59+
The existing plugins build DCF and LBO independently. There's nothing guaranteeing both use the same revenue, EBITDA, share count, or tax rate. In a Medpace case study, the DCF used 15% effective tax and the LBO used 21% statutory with no documentation.
60+
61+
**This plugin's fix:** `/ib-extract` produces a single master JSON. Every downstream model and slide references it. A `cross_audit` function verifies consistency across DCF, LBO, and slides.
62+
63+
### 2. openpyxl corruption ✗ → ✓
64+
The existing DCF skill (line 21) defaults to openpyxl for standalone xlsx generation. This produces files that trigger Excel's "We found a problem" recovery dialog.
65+
66+
**This plugin's fix:** Uses `xlsxwriter` by default for new file creation. openpyxl is only for reading existing files.
67+
68+
### 3. Spatial execution ceiling ✗ → ✓
69+
The existing skills tell the LLM to write `python-pptx` code directly. The LLM has to remember `Inches(2.5), Pt(11)` for every cell. Failures: right-alignment inconsistent, bar heights not proportional, reference labels overlapping titles.
70+
71+
**This plugin's fix:** The LLM never writes spatial code. It picks a template (`render_financial_summary`) and fills a JSON spec. The IBRenderer guarantees:
72+
- Right-alignment on all numeric columns
73+
- Proportional bar heights (`value / max_value × chart_height`)
74+
- Tables are real PowerPoint table objects (not text with tabs)
75+
- Reference labels never overlap (collision detection built-in)
76+
- Source text dynamically positioned below content
77+
78+
### 4. Generic titles ✗ → ✓
79+
The existing plugins don't enforce action titles. You get "Financial Summary" instead of "Consistent Revenue Growth With Expanding EBITDA Margin Expansion".
80+
81+
**This plugin's fix:** SKILL.md explicitly requires action titles on every slide and gives examples.
82+
83+
### 5. No template library ✗ → ✓
84+
The existing plugins make Claude generate slides from scratch each time. No reusable patterns.
85+
86+
**This plugin's fix:** 14 pre-built templates for the most common IB slide types, each with a documented JSON schema.
87+
88+
## The 14 templates
89+
90+
| # | Template | Pattern | Reference |
91+
|---|----------|---------|-----------|
92+
| 1 | `render_cover` | Cover with confidential mark + bank badge | GS board pres format |
93+
| 2 | `render_section_divider` | Full navy bg with section title | GS / Moelis style |
94+
| 3 | `render_toc` | Numbered agenda with light blue bands | GS agenda slides |
95+
| 4 | `render_exec_summary` | Blue callout + ■ / — bullet hierarchy | GS executive summary |
96+
| 5 | `render_investment_highlights` | 4-card 2×2 grid with numbered headers | GS / GS analyst format |
97+
| 6 | `render_financial_summary` | Historical P&L with bold subtotals | Standard IB financials |
98+
| 7 | `render_stacked_bar_table` | Stacked bars + data table below | Moelis revenue by segment |
99+
| 8 | `render_dual_chart` | Two bar charts side by side with CAGR | GS dual analysis |
100+
| 9 | `render_football_field` | Valuation methodologies with range bars | Evercore / Moelis |
101+
| 10 | `render_sensitivity` | WACC × TGR grid with base case highlight | Standard DCF sensitivity |
102+
| 11 | `render_sources_uses` | LBO capital structure (two-column) | Standard LBO |
103+
| 12 | `render_trading_comps` | Peer multiples with target highlighted | Standard comps table |
104+
105+
See `skills/ib-deck-engine/reference/template-catalog.md` for the full pattern catalog and JSON schemas.
106+
107+
## Architecture
108+
109+
```
110+
┌─────────────────────────────────────┐
111+
│ CONTENT REASONING (Claude) │
112+
│ │
113+
│ - Pick the right template │
114+
│ - Write the action title │
115+
│ - Select the data │
116+
│ - Cite the source │
117+
└────────────────┬────────────────────┘
118+
119+
│ Output: structured JSON
120+
121+
122+
┌─────────────────────────────────────┐
123+
│ JSON SPEC │
124+
│ { │
125+
│ "title": "...", │
126+
│ "headers": [...], │
127+
│ "rows": [...] │
128+
│ } │
129+
└────────────────┬────────────────────┘
130+
131+
│ Pure data, no coordinates
132+
133+
134+
┌─────────────────────────────────────┐
135+
│ DETERMINISTIC RENDERER │
136+
│ - Right-alignment ALWAYS │
137+
│ - Proportional bars by math │
138+
│ - Real table objects │
139+
│ - Pixel-perfect by construction │
140+
└────────────────┬────────────────────┘
141+
142+
143+
output.pptx
144+
```
145+
146+
This is the same architecture used by Beautiful.ai, Gamma, Pitch, UpSlide, and Macabacus. The LLM never touches pixels.
147+
148+
## Companion repo
149+
150+
The standalone Python library (without the plugin packaging) is at:
151+
**https://github.com/gorajing/ib-deck-engine**
152+
153+
It includes a complete worked example for Addus HomeCare Corp (ADUS) — DCF model, LBO model, master JSON, and rendered 14-slide deck.
154+
155+
## Disclaimer
156+
157+
This is a learning case study and template library. Models are simplified. Numbers in the example case study are illustrative. Always verify financial data against primary sources before relying on it for investment decisions.
158+
159+
## License
160+
161+
MIT — see [LICENSE](LICENSE).

commands/ib-comps.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
description: Build a trading comparables (peer multiples) table slide
3+
argument-hint: "[target company]"
4+
---
5+
6+
# IB Trading Comps
7+
8+
Build a trading comparables table showing peer companies' valuation multiples with the
9+
target company highlighted. Uses the `render_trading_comps` template.
10+
11+
Load the `ib-deck-engine` skill and use `render_trading_comps`.
12+
13+
## What this slide shows
14+
15+
A peer comparables table with:
16+
- 5-10 peer companies in the same sector as the target
17+
- Standard multiples: Market Cap, EV, Revenue, EBITDA, EV/Rev, EV/EBITDA, Growth
18+
- Target company highlighted with yellow background
19+
- Mean and Median summary rows in light gray
20+
- Right-aligned numeric columns
21+
- Source line at bottom
22+
23+
## Workflow
24+
25+
If a target company is provided as $1, ask:
26+
- "Which peer companies should I include?" (or suggest based on sector)
27+
- "Which financial metrics?" (default: Market Cap, EV, Rev, EBITDA, EV/Rev, EV/EBITDA, Growth)
28+
- "What's the source for the data?" (FactSet, Capital IQ, Bloomberg)
29+
30+
## Critical rules
31+
32+
- **Action title** — "[Target] Trades at a Discount/Premium to Sector Peers Despite [Differentiation]"
33+
- **Target row highlighted** — set `"target_row": 0` (zero-indexed) to highlight in yellow
34+
- **Summary rows** — use `"summary": True` for Mean/Median rows (gray background, bold)
35+
- **Right-aligned numbers** — automatic, don't override
36+
- **Source citation** — always include date: "Source: FactSet. Market data as of April 2026."
37+
38+
## Example spec
39+
40+
```python
41+
r.render_trading_comps({
42+
"title": "Addus Trades at a Discount to Home Care Services Peers Despite Superior Growth and Margins",
43+
"header_text": "Selected Home Care Services Trading Comparables",
44+
"headers": ["Company", "Ticker", "Market Cap ($M)", "EV ($M)", "Rev ($M)", "EBITDA ($M)", "EV/Rev", "EV/EBITDA", "Rev Growth"],
45+
"rows": [
46+
{"company": "Addus HomeCare", "values": ["ADUS", "1,781", "1,820", "1,565", "175", "1.2x", "10.4x", "10.0%"]},
47+
{"company": "BrightSpring", "values": ["BTSG", "5,820", "8,400", "11,200", "530", "0.8x", "15.8x", "12.5%"]},
48+
{"company": "Pennant Group", "values": ["PNTG", "3,940", "4,200", "765", "82", "5.5x", "51.2x", "18.2%"]},
49+
{"company": "Mean", "values": ["", "", "", "", "", "1.8x", "18.5x", "8.9%"], "summary": True},
50+
{"company": "Median", "values": ["", "", "", "", "", "1.1x", "12.7x", "8.4%"], "summary": True},
51+
],
52+
"target_row": 0,
53+
"source": "Source: FactSet, Capital IQ. Market data as of April 2026."
54+
})
55+
```

commands/ib-deck.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
---
2+
description: Build a complete investment banking pitch deck for a public company
3+
argument-hint: "[company ticker or name]"
4+
---
5+
6+
# IB Deck — Full Pitch Book
7+
8+
Build a complete 14-slide IB pitch deck for the specified company using the IB Deck Engine
9+
template library. The architecture: extract data → fill JSON specs → deterministic rendering.
10+
11+
## Workflow
12+
13+
Load the `ib-deck-engine` skill to access the template library and follow this workflow:
14+
15+
### Step 1: Confirm the deal
16+
17+
If a company name/ticker is provided as $1, use it. Otherwise ask:
18+
- "What company would you like to build a pitch deck for?"
19+
- "Sell-side or buy-side mandate?"
20+
- "Any specific assumptions to use (or should I use reasonable defaults)?"
21+
22+
### Step 2: Extract financial data
23+
24+
For public US companies, use `edgartools` to pull the most recent 10-K:
25+
- Revenue, COGS, gross profit, operating income, EBITDA, net income (3 years)
26+
- Balance sheet (cash, AR, debt, equity)
27+
- Cash flow statement (CFO, CapEx, financing)
28+
- Segment revenue if available
29+
- Diluted share count
30+
- Save as `{ticker}_master.json` — single source of truth
31+
32+
### Step 3: Build the 14-slide deck
33+
34+
Use the IBRenderer templates in this order:
35+
36+
1. **Cover** (`render_cover`) — Project codename + bank name + date
37+
2. **Table of Contents** (`render_toc`) — 4 numbered agenda items
38+
3. **Executive Summary** (`render_exec_summary`) — Blue callout + 3 main points with sub-bullets
39+
4. **Investment Highlights** (`render_investment_highlights`) — 4-card 2×2 grid
40+
5. **Section Divider** (`render_section_divider`) — "Review of Financial Performance"
41+
6. **Financial Summary** (`render_financial_summary`) — Historical P&L with margins
42+
7. **Revenue by Segment** (`render_stacked_bar_table`) — Stacked bars + data table
43+
8. **Revenue + EBITDA** (`render_dual_chart`) — Side-by-side bar charts with CAGR
44+
9. **Section Divider** (`render_section_divider`) — "Preliminary Valuation Analysis"
45+
10. **Football Field** (`render_football_field`) — Valuation methodologies with range bars
46+
11. **Sensitivity** (`render_sensitivity`) — WACC × Terminal Growth grid
47+
12. **Trading Comps** (`render_trading_comps`) — Peer multiples table
48+
13. **Section Divider** (`render_section_divider`) — "LBO Analysis"
49+
14. **Sources & Uses** (`render_sources_uses`) — Capital structure with balance check
50+
51+
### Step 4: Verify and deliver
52+
53+
- Confirm 14 slides generated
54+
- Verify source text on each content slide
55+
- Save as `{ticker}_pitch_deck.pptx`
56+
- Report the file path to the user
57+
58+
## Critical rules
59+
60+
- **Action titles only** — never "Financial Summary," always "Consistent Revenue Growth With Expanding Margins"
61+
- **Every number sourced** — trace each value to a source file or note "Estimated"
62+
- **Cross-model consistency** — DCF and LBO must use the same revenue, EBITDA, share count
63+
- **Right-alignment automatic** — handled by templates, don't override
64+
65+
## Example: ADUS
66+
67+
```
68+
/ib-deck ADUS
69+
```
70+
71+
Builds a complete 14-slide pitch book for Addus HomeCare Corp using SEC EDGAR data.
72+
See `skills/ib-deck-engine/reference/examples/full_deck.py` for the full worked example.

0 commit comments

Comments
 (0)