dcf-model
What it does
This skill guides the AI agent to estimate what a company is worth using discounted cash flow. It is for analysts and investors who want a valuation backed by a full spreadsheet.
When to use it
- βWhen you want to value a company using discounted cash flow.
- βWhen you need to know how sensitive a valuation is to growth or discount rate changes.
- βWhen you want an intrinsic value estimate with an executive summary.
Skill link
https://github.com/anthropics/financial-services/blob/main/plugins/agent-plugins/model-builder/skills/dcf-model/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βBuild a DCF model for this company with five-year projections, a WACC, and sensitivity tables.β
5 new skills a week. 1 minute to read.
How it works
The agent gathers financial data, projects cash flows, and calculates a discount rate. It then discounts everything to a present value and shows sensitivity tables, all in a spreadsheet.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
DCF Model Builder
Overview
This skill creates institutional-quality DCF models for equity valuation following investment banking standards. Each analysis produces a detailed Excel model (with sensitivity analysis included at the bottom of the DCF sheet).
Tools
- Default to using all of the information provided by the user and MCP servers available for data sourcing.
Critical Constraints - Read These First
These constraints apply throughout all DCF model building. Review before starting:
Environment: Office JS vs Python/openpyxl:
- If running inside Excel (Office Add-in / Office JS environment): Use Office JS directly β do NOT use Python/openpyxl. Write formulas via
range.formulas = [["=D19*(1+$B$8)"]]. No separate recalc step needed; Excel calculates natively. Userange.format.*for styling. The same formulas-over-hardcodes rule applies: set.formulas, never.valuesfor derived cells. - If generating a standalone .xlsx file (no live Excel session): Use Python/openpyxl as described below, then run
recalc.pybefore delivery. - The rest of this skill uses openpyxl examples β translate to Office JS API calls when in that environment, but all principles (formula strings, cell comments, section checkpoints, sensitivity table loops) apply identically.
β οΈ Office JS merged cell pitfall: When building section headers with merged cells, do NOT call .merge() then set .values on the merged range β Office JS still reports the range's original dimensions and will throw InvalidArgument: The number of rows or columns in the input array doesn't match the size or dimensions of the range. Instead, write the value to the top-left cell alone, then merge and format the full range:
// WRONG β throws InvalidArgument:
const hdr = ws.getRange("A7:H7");
hdr.merge();
hdr.values = [["MARKET DATA & KEY INPUTS"]]; // 1Γ1 array vs 1Γ8 range β fails
// CORRECT β value first on single cell, then merge + format the range:
ws.getRange("A7").values = [["MARKET DATA & KEY INPUTS"]];
const hdr = ws.getRange("A7:H7");
hdr.merge();
hdr.format.fill.color = "#1F4E79";
hdr.format.font.bold = true;
hdr.format.font.color = "#FFFFFF";
This applies to every merged section header in the DCF (market data, scenario blocks, cash flow projection, terminal value, valuation summary, sensitivity tables).
Formulas Over Hardcodes (NON-NEGOTIABLE):
- Every projection, margin, discount factor, PV, and sensitivity cell MUST be a live Excel formula β never a value computed in Python and written as a number
- When using openpyxl:
ws["D20"] = "=D19*(1+$B$8)"is correct;ws["D20"] = calculated_revenueis WRONG - The only hardcoded numbers permitted are: (1) raw historical inputs, (2) assumption drivers (growth rates, WACC inputs, terminal g), (3) current market data (share price, debt balance)
- If you catch yourself computing something in Python and writing the result β STOP. The model must flex when the user changes an assumption.
Verify Step-by-Step With the User (DO NOT build end-to-end):
- After data retrieval β show the user the raw inputs block (revenue, margins, shares, net debt) and confirm before projecting
- After revenue projections β show the projected top line and growth rates, confirm before building margin build
- After FCF build β show the full FCF schedule, confirm logic before computing WACC
- After WACC β show the calculation and inputs, confirm before discounting
- After terminal value + PV β show the equity bridge (EV β equity value β per share), confirm before sensitivity tables
- Catch errors at each stage β a wrong margin assumption discovered after sensitivity tables are built means rebuilding everything downstream
Sensitivity Tables:
- Use an ODD number of rows and columns (standard: 5Γ5, sometimes 7Γ7) β this guarantees a true center cell
- Center cell = base case. Build the axis values so the middle row header and middle column header exactly equal the model's actual assumptions (e.g., if base WACC = 9.0%, the middle row is 9.0%; if terminal g = 3.0%, the middle column is 3.0%). The center cell's output must therefore equal the model's actual implied share price β this is the sanity check that the table is built correctly.
- Highlight the center cell with the medium-blue fill (
#BDD7EE) + bold font so it's immediately visible which cell is the base case. - Populate ALL cells (typically 3 tables Γ 25 cells = 75) with full DCF recalculation formulas
- Use open
FAQ
Where does the financial data come from?
The skill uses the data you provide and connected sources, with SEC filings among the sources it can use.
Does it include sensitivity tables?
Yes. The sensitivity tables appear at the bottom of the DCF sheet.
Can it work inside Excel?
Yes. It can work in an open Excel add-in or produce a standalone spreadsheet file.
Details
Original description by the author
Real DCF (Discounted Cash Flow) model creation for equity valuation. Retrieves financial data from SEC filings and analyst reports, builds comprehensive cash flow projections with proper WACC calculations, performs sensitivity analysis, and outputs professional Excel models with executive summaries. Use when users need to value a company using DCF methodology, request intrinsic value analysis, or ask for detailed financial modeling with growth projections and terminal value calculations.
Popularity
- GitHub stars
- 41k
- Ranking position
- #6582
- License
- Apache-2.0
- Updated
- 10/28/2026
Comments
- β¦
More skills from this repository
audit-xls
41kHelps your agent check a spreadsheet for formula errors, typed-in numbers, and broken links, for a range, a sheet, or a whole model.
earnings-analysis
41kHelps your agent write a short earnings update on a company's quarterly results, covering beat or miss, key numbers, and the revised view.
earnings-preview
41kHelps your agent prepare before a company reports earnings, with metrics to watch, bull and bear scenarios, and key catalysts.
model-update
41kHelps your agent update a financial model with new results, guidance, or assumptions, then flag the changes that matter most.
Similar skills
gitcrawl
394kLets your agent search a saved archive of GitHub issues and pull requests, group duplicates, and check their current status on GitHub.
slacrawl
394kLets your agent search and count messages in a local Slack archive, check how fresh that archive is, and refresh it when needed.
goplaces
394kHelps your agent search for places, get their details and reviews, and resolve place names using Google Places, with JSON output for scripts.