skills/defeatbeta-dcf/SKILL.md
Generate a fully editable Discounted Cash Flow (DCF) valuation spreadsheet for a public company. Builds a single-sheet Excel workbook with WACC, growth estimates, 10-year FCF projections, and fair price — all wired as live formulas so users can flex discount rate or growth assumptions and see fair price update. Triggers on DCF analysis, discounted cash flow, intrinsic value, fair price estimate, build a DCF model, value [company].
npx skillsauth add defeat-beta/defeatbeta-api defeatbeta-dcfInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Build a fully editable, formula-driven DCF model for a public company. All inputs come from the defeatbeta MCP server's get_stock_dcf_analysis tool. The skill renders the data into a single-sheet .xlsx whose every projection, NPV, and fair-price cell is an Excel formula — so the user can change the discount rate, growth-rate assumptions, cash, or share count and watch fair price recalculate.
Call the MCP tool:
get_stock_dcf_analysis(symbol="<TICKER>")
If the response contains an error key (e.g. ETFs / indices without financial statements), stop and surface the error to the user.
# Pseudocode — Claude writes the dict returned by MCP to a temp file
echo "<dcf-data-as-json>" > /tmp/<TICKER>_dcf.json
Run the build script from this skill:
python <SKILL_DIR>/scripts/build_dcf_excel.py /tmp/<TICKER>_dcf.json ./<TICKER>_DCF.xlsx
{SYMBOL}_DCF.xlsx in the current working directory by default.openpyxl writes formula strings but does not evaluate them. Most spreadsheet apps recalc on open, but lightweight previewers (and Claude's file preview) need cached values:
python <SKILL_DIR>/scripts/recalc.py ./<TICKER>_DCF.xlsx
The recalc script uses libreoffice --headless --calc to evaluate every formula and write the cached value back into the file. If LibreOffice is not on PATH, the script prints a warning and exits cleanly — the workbook is still valid, it will just show blank cells in previewers until opened in Excel/Numbers/WPS.
Install LibreOffice if you want in-Claude preview to show numbers:
brew install --cask libreofficesudo apt-get install libreoffice-calcTell the user the output path and call out what is editable:
Generated
AAPL_DCF.xlsx. Editable cells (light grey fill, blue font) drive everything downstream: change the discount rate or growth rates in the DCF Template section to see fair price update.
Single sheet, four vertical sections:
NPV(discount_rate, Total Value year 1..10), plus cash and debt → equity value → fair price → margin of safety → Buy/Sell recommendation.| Element | Fill | Font |
|---|---|---|
| Section headers | Dark blue #1F4E79 | White bold |
| Column headers (year labels) | Light blue #D9E1F2 | Black bold |
| Input cells (user-editable assumptions) | Light grey #F2F2F2 | Blue #0000FF |
| Formula cells | White | Black |
| Key totals (WACC, Fair Price, MoS) | Medium blue #BDD7EE | Black bold |
The user can identify what is editable at a glance: anything in blue font on a grey background is fair game; black-on-white is a derived formula.
dcf_template.projections[0] is the TTM base (year 0). Years 1–10 are formula columns.terminal_value is non-zero only at year 10.recommendation is "Buy" or "Sell" (mixed case, not all-caps).fair_price should match dcf_value.fair_price from the MCP payload to within rounding.error (no financials): tell the user, do not generate Excel.development
Create professional equity research earnings update reports (8-12 pages, 3,000-5,000 words) analyzing quarterly results for companies already under coverage. Fast-turnaround format focusing on beat/miss analysis, key metrics, updated estimates, and revised thesis. Includes 1-3 summary tables and 8-12 charts. Use when user requests "earnings update", "quarterly update", "earnings analysis", "Q1/Q2/Q3/Q4 results", or post-earnings report.
development
Build pre-earnings analysis with estimate models, scenario frameworks, and key metrics to watch. Use before a company reports quarterly earnings to prepare positioning notes, set up bull/base/bear scenarios, and identify what will move the stock. Triggers on earnings preview, what to watch for company earnings, pre-earnings, earnings setup, or preview Q[X] for a company.
development
Professional financial analysis using 60+ market data APIs. Use for: company fundamentals (revenue, margins, EPS, balance sheet), valuation (P/E, P/B, P/S, PEG, DCF, intrinsic value), profitability (ROE, ROA, ROIC), growth trends (YoY revenue/earnings/FCF), earnings transcripts (key data, changes, guidance), industry benchmarking, segment/geography revenue breakdown, business model analysis, competitive landscape, risk analysis, investment thesis, bull/bear scenarios. Trigger on: stock tickers, company names, financial metrics, or any investment research request. DO NOT trigger for: general economics, non-public companies, crypto/commodities with no equity ticker.
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.