> ## Documentation Index
> Fetch the complete documentation index at: https://financecontext.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Debug Model Command

> Audit a financial model for errors -- learn why model integrity matters and how to systematically find formula errors, balance sheet breaks, and logic issues.

# `/debug-model` -- Financial Model Audit

Financial models are living documents that get edited by multiple people over weeks or months. Each edit creates an opportunity for error: a formula gets pasted over with a hardcoded number, a SUM range misses a newly inserted row, or a balance sheet that once balanced now has a \$2M gap that nobody noticed. These silent errors can lead to incorrect valuations, flawed investment decisions, or embarrassing moments in front of clients.

Model auditing is the systematic process of checking a financial model for formula errors, logic issues, and structural problems. This command runs the deepest audit level -- covering both formula-level checks and financial model-specific integrity checks.

For a deep dive into Excel auditing methodology, see the [Audit XLS Skill](/en/financial-analysis/skills/audit-xls) page.

## Command Syntax

```
/debug-model [path to .xlsx model file]
```

**Examples:**

```bash theme={null}
/debug-model ./models/LBO_Model_v3.xlsx
/debug-model ./Project_Atlas_DCF.xlsx
/debug-model
```

If no file path is provided, Claude will ask for the model to review.

<Warning>
  Claude reports findings but does not edit the model without being asked. Review the findings report first, then request specific fixes.
</Warning>

## What It Produces

A structured findings report with severity levels (Critical, Warning, Info), organized by category (Formula, Balance, Logic, Formatting). Each finding includes the sheet, cell/range, issue description, and suggested fix.

## Audit Scope

<CardGroup cols={2}>
  <Card title="Formula-Level Checks" icon="function">
    Formula errors (#REF!, #VALUE!, #DIV/0!), hardcoded values inside formulas, inconsistent formula patterns, off-by-one ranges, pasted-over formulas, and broken cross-sheet links.
  </Card>

  <Card title="Balance Sheet Integrity" icon="scale-balanced">
    Assets = Liabilities + Equity for every period. If the BS does not balance, the gap is quantified per period and the break point is traced.
  </Card>

  <Card title="Cash Flow Integrity" icon="dollar-sign">
    CF Ending Cash = BS Cash (every period). D\&A, CapEx, and working capital changes have correct signs and tie to source schedules.
  </Card>

  <Card title="Model-Type-Specific Bugs" icon="bug">
    DCF: discount rate application, terminal value. LBO: debt paydown mechanics, PIK accrual. Merger: accretion/dilution share counts. 3-statement: WC signs, depreciation schedule.
  </Card>
</CardGroup>

## How to Customize for Your Firm

```bash theme={null}
claude plugin install financial-analysis@financial-services-plugins
```

Edit `skills/audit-xls/SKILL.md` to add firm-specific checks, tolerance thresholds, or model conventions.

## Related

* [Audit XLS Skill](/en/financial-analysis/skills/audit-xls) -- Full audit methodology across all scope levels (selection, sheet, model)
* [`/check-deck` Command](/en/financial-analysis/commands/check-deck) -- QC PowerPoint presentations
* [3-Statement Model Skill](/en/financial-analysis/skills/3-statement-model) -- Model integrity checks and cross-statement validation
