SKILL.md
Excel Model Skill
A model is only useful if it's live — change an assumption and everything recalculates. A markdown
table can't do that; a real .xlsx with cell formulas can. This skill builds an actual Excel workbook by
writing and running an openpyxl script: a clean inputs sheet, calculation sheets that reference
those inputs with real = formulas, and sensible formatting — so the user gets a file they can drive,
not a snapshot.
Environment: this produces a binary file, so it needs a place to run code — Claude Code, the Anthropic API code-execution tool, or Claude.ai (with the analysis/code tool). In the browser playground (no code execution), use the markdown output as the spec instead.
Required Inputs
Ask for these only if they aren't already provided:
- What the model is — financial model, budget, forecast, pricing model, scenario planner, etc.
- The inputs/assumptions — the driver variables (and rough values) the user will change.
- The outputs — what it should compute (revenue, burn, margins, totals, a P&L, etc.).
- Structure — periods (months/years), tiers/segments, and any required layout.
Process
- Design before coding — lay out the sheets (Inputs · Calculations · Output/Summary), and which cells are inputs vs. formulas. Confirm the calculation logic with the user if non-trivial.
- Write an
openpyxlscript that:- Puts all driver assumptions on an Inputs sheet (one source of truth), labelled and formatted.
- Builds calculation cells as real formulas referencing the input cells (e.g.
=Inputs!B2*Inputs!B3), never hard-coded results — so the model is live. - Adds formatting: headers, number/currency/percent formats, column widths, and light cell styling for readability.
- Saves to a clearly named
.xlsx.
