audit-xls
The audit-xls skill examines spreadsheets for formula errors, hardcoded values, inconsistent patterns, and broken references across a selected range, single sheet, or entire workbook. Use it when formulas aren't calculating correctly, a financial model won't balance, or before sharing spreadsheets with stakeholders to catch logic flaws, circular references, unit mismatches, and structural integrity issues in DCF, LBO, or three-statement models.
git clone --depth 1 https://github.com/fivetaku/claude-office-skills /tmp/audit-xls && cp -r /tmp/audit-xls/claude-in-excel/audit-xls ~/.claude/skills/audit-xlsSKILL.md
# Audit Spreadsheet Audit formulas and data for accuracy and mistakes. Scope determines depth, from quick formula checks on a selection up to full financial-model integrity audits. ## Preflight: Dependency Check Before starting, verify required libraries are installed and install any that are missing. ```bash python3 -c "import pandas" 2>/dev/null || python3 -m pip install pandas python3 -c "import openpyxl" 2>/dev/null || python3 -m pip install openpyxl ``` **Important**: Do not skip this step — the workflow below will fail without these libraries. ## Step 1: Determine scope If the user already gave a scope, use it. Otherwise ask: > What scope do you want me to audit? > - **selection** — just the currently selected range > - **sheet** — the current active sheet only > - **model** — the whole workbook, including financial-model integrity checks (BS balance, cash tie-out, roll-forwards, logic sanity) The **model** scope is the deepest. Use it for DCF, LBO, 3-statement, merger, comps, or any integrated financial model before sending to a client or IC. ## Step 2: Formula-level checks (all scopes) Run these regardless of scope: | Check | What to look for | |---|---| | Formula errors | `#REF!`, `#VALUE!`, `#N/A`, `#DIV/0!`, `#NAME?` | | Hardcodes inside formulas | `=A1*1.05` where the `1.05` should be a cell reference | | Inconsistent formulas | A formula that breaks the pattern of its neighbors in a row or column | | Off-by-one ranges | `SUM` or `AVERAGE` that misses the first or last row | | Pasted-over formulas | A cell that looks like a formula location but is actually a hardcoded value | | Circular references | Intentional or accidental | | Broken cross-sheet links | References to cells that moved or were deleted | | Unit or scale mismatches | Thousands mixed with millions, or percentages stored as whole numbers | | Hidden rows or tabs | Could contain overrides or stale calculations | ## Step 3: Model-integrity checks (model scope only) If scope is **model**, identify the model type: DCF, LBO, 3-statement, merger, comps, or custom, then run the appropriate checks. ### 3a. Structural review | Check | What to look for | |---|---| | Input/formula separation | Are inputs clearly separated from calculations? | | Color convention | Blue=input, black=formula, green=link, or the model's equivalent, applied consistently | | Tab flow | Logical order such as Assumptions -> IS -> BS -> CF -> Valuation | | Date headers | Consistent across all tabs | | Units | Consistent: thousands vs millions vs actuals | ### 3b. Balance Sheet | Check | Test | |---|---| | BS balances | Total Assets = Total Liabilities + Equity for every period | | RE rollforward | Prior RE + Net Income - Dividends = Current RE | | Goodwill/intangibles | Flow from acquisition assumptions if M&A applies | If the balance sheet does not balance, quantify the gap per period and trace where it breaks. Nothing else matters until that is fixed. ### 3c. Cash Flow Statement | Check | Test | |---|---| | Cash tie-out | CF Ending Cash = BS Cash for every period | | CF sums | CFO + CFI + CFF = Delta Cash | | D&A match | D&A on CF = D&A on IS | | CapEx match | CapEx on CF matches PP&E rollforward on BS | | WC changes | Signs match BS movements for AR, AP, and Inventory | ### 3d. Income Statement | Check | Test | |---|---| | Revenue build | Ties to segment or product detail | | Tax | Tax expense = Pre-tax income x tax rate, allowing for deferred tax adjustments | | Share count | Ties to dilution schedule: options, converts, buybacks | ### 3e. Circular references - Interest -> debt balance -> cash -> interest is a common intentional circularity in LBO and 3-statement models. - If intentional, verify the iteration toggle exists and works. - If unintentional, trace the loop and flag how to break it. ### 3f. Logic and reasonableness | Check | Flag if | |---|---| | Growth rates | Greater than 100% revenue growth without explanation | | Margins | Outside industry norms | | Terminal value dominance | TV > about 75% of DCF EV | | Hockey-stick | Projections ramp unrealistically in out-years | | Compounding | EBITDA compounds to absurd levels by Year 10 | | Edge cases | Model breaks at 0% or negative growth, negative EBITDA, or negative leverage | ### 3g. Model-type-specific bugs **DCF** - Discount rate applied to the wrong period: mid-year vs end-of-year - Terminal value not discounted back - WACC uses book values instead of market values - FCF includes interest expense when it should be unlevered - Tax shield double-counted **LBO** - Debt paydown does not match cash sweep mechanics - PIK interest does not accrue to principal - Management rollover is not reflected in returns - Exit multiple applied to the wrong EBITDA period: LTM vs NTM - Fees or expenses not deducted from Day 1 equity **Merger** - Accretion/dilution uses the wrong share count: pre- vs post-deal - Synergies not phased in - Purchase price allocation does not balance - Foregone interest on cash not included - Transaction fees not in sources and uses **3-statement** - Working capital changes have the wrong sign - Depreciation does not match the PP&E schedule - Debt maturity schedule does not match principal payments - Dividends exceed net income without explanation ## Step 4: Report Output a findings table: | # | Sheet | Cell/Range | Severity | Category | Issue | Suggested Fix | |---|---|---|---|---|---|---| Severity: - **Critical** — wrong output: BS does not balance, formula is broken, or cash does not tie - **Warning** — risky: hardcodes, inconsistent formulas, edge-case failures - **Info** — style or best-practice items: color coding, layout, naming For **model** scope, prepend a summary line: > Model type: [DCF/LBO/3-stmt/...] — Overall: [Clean / Minor Issues / Major Issues] — [N] critical, [N] warnings, [N] info Do not change anything without asking. Report first, fix on request. ## Notes - BS balance first. If it does not balance, everything dow
Complete, populate and fill out 3-statement financial model templates (Income Statement, Balance Sheet, Cash Flow Statement). Use when asked to fill out model templates, complete existing model frameworks, populate financial models with data, complete a partially filled IS/BS/CF framework, or link integrated financial statements within an existing template structure. Triggers include requests to fill in, complete, or populate a 3-statement model template
Clean up messy spreadsheet data — trim whitespace, fix inconsistent casing, convert numbers-stored-as-text, standardize dates, remove duplicates, and flag mixed-type columns. Use when data is messy, inconsistent, or needs prep before analysis. Triggers on "clean this data", "clean up this sheet", "normalize this data", "fix formatting", "dedupe", "standardize this column", and "this data is messy".
Build institutional-grade comparable company analyses with operating metrics, valuation multiples, and statistical benchmarking in Excel/spreadsheet format.
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.
This skill should be used when completing LBO (Leveraged Buyout) model templates in Excel for private equity transactions, deal materials, or investment committee presentations. The skill fills in formulas, validates calculations, and ensures professional formatting standards that adapt to any template structure.
Framework for building competitive landscape decks — market positioning, competitor deep-dives, comparative analysis, strategic synthesis. Use when the user asks for a competitive landscape, competitor analysis, peer comparison, market positioning assessment, strategic review, or investment memo deck. Also triggers on "who are the competitors to X", "benchmark X against peers", "build a market map", or any request to systematically evaluate competitive dynamics across an industry.
Updates a presentation with new numbers — quarterly refreshes, earnings updates, comp rolls, rebased market data. Use whenever the user asks to "update the deck with Q4 numbers", "refresh the comps", "roll this forward", "swap in the new earnings", "change all the $485M to $512M", or any request to swap figures across an existing deck without rebuilding it.
Investment banking presentation quality checker. Reviews a pitch deck or client-ready presentation for (1) number consistency across slides, (2) data-narrative alignment, (3) language polish against IB standards, (4) visual and formatting QC. Use whenever the user asks to review, check, QC, proof, or do a final pass on a deck, pitch, or client materials — including requests like "check my numbers", "reconcile figures across slides", "is this client-ready", or "what am I missing before I send this out".