After all forms are filled, performs a comprehensive cross-check of the entire tax return against source documents before submission. Catches cross-form errors, math mistakes, withholding mismatches, and missing documents that session-by-session filing misses. Triggers on: 'audit my return', 'final check', 'am I ready to file', 'check everything', 'cross-check my forms', 'verify my return', 'pre-filing review', 'review before I file', 'double check my taxes', 'did I miss anything'.
Comprehensive pre-filing audit — cross-checks the entire completed tax return against source documents in analysis/tax-doc-summary.csv. Verifies all math through Python scripts, checks for missing forms and common pitfalls. This should be the last step before filing, run after all forms are filled using /tax-cheatsheet.
Every conversation starts here:
analysis/tax-doc-summary.csv exists/tax-prep first to extract your document values, then fill your forms with /tax-cheatsheet, and come back here for the final audit."1040 Line 1 wages: $85,000
1040 Line 2b interest: $1,200
1040 Line 11 AGI: $98,500
1040 Line 15 taxable income: $67,000
1040 Line 16 tax: $7,582
1040 Line 25a withholding: $12,400
MD 502 Line 1: $98,500
MD 502 Line 40: $3,200
federal_values and state_values dicts from the user's input (see Input Schema Reference below)| # | Category | What It Verifies | Script | Reference File(s) |
|---|---|---|---|---|
| 1 | Internal Consistency | Wages, interest, dividends match source docs | cross_check.py | 1040-line-by-line.md |
| 2 | Internal Consistency | Total income = sum of income lines | cross_check.py | 1040-line-by-line.md |
| 3 | Internal Consistency | AGI = total income - adjustments | cross_check.py | 1040-line-by-line.md |
| 4 | Internal Consistency | Taxable income = AGI - deductions | cross_check.py | 1040-line-by-line.md |
| 5 | Math Verification | Tax computed correctly for bracket and filing status | cross_check.py | 2025-tax-numbers.md |
| 6 | Withholding Match | Federal withholding on 1040 = sum of W-2 Box 2 | cross_check.py | 1040-line-by-line.md |
| 7 | Withholding Match | State withholding on MD 502 = sum of W-2 Box 17 | cross_check.py | maryland-502-guide.md |
| 8 | Cross-Return Consistency | Federal AGI matches MD 502 Line 1 | cross_check.py | maryland-502-guide.md |
| 9 | Document Completeness | Every CSV document reflected in filed forms | completeness_check.py | All |
| 10 | Missing Forms | Required schedules filed based on income types | completeness_check.py | investment-income.md, schedule-c-guide.md, additional-medicare-tax.md |
| 11 | Common Mistakes | 10 known pitfalls verified | Manual review | docs/KNOWN-PITFALLS.md |
| 12 | Estimated Payments | Entered amounts match actual payments | Manual review |
Load analysis/tax-doc-summary.csv and count documents. Collect the user's federal form values (federal_values dict), state form values (state_values dict), filing status, and list of completed forms. See Input Schema Reference for the exact keys needed.
Invoke cross_check.py to verify internal consistency, withholding match, cross-return consistency, and tax bracket verification.
python .claude/skills/tax-audit/scripts/cross_check.py '{"csv_path": "analysis/tax-doc-summary.csv", "federal_values": {...}, "state_values": {...}, "filing_status": "MFJ"}'
Parse the JSON output. Each check returns: check_name, status (pass/fail/warning), expected, actual, difference, and detail.
Invoke completeness_check.py to verify document coverage and required forms.
python .claude/skills/tax-audit/scripts/completeness_check.py '{"csv_path": "analysis/tax-doc-summary.csv", "forms_filed": ["1040", "Schedule A", ...], "filing_status": "MFJ"}'
Parse the JSON output. Check document_coverage for unmapped documents, required_forms for missing schedules, and orphaned_documents for unrecognized types.
Read docs/KNOWN-PITFALLS.md and walk through each of the 10 pitfalls against the user's values:
cross_check.py (check fed_state_agi_match). (Source: maryland-502-guide.md, Line 1)For each pitfall, determine: PASS (verified correct), WARNING (could not verify — needs user confirmation), or FAIL (confirmed incorrect).
Ask the user: "Did you make estimated tax payments during the year?"
Merge all results from Steps 2–5 into the output format below. Apply the verdict logic:
Present the audit results in this format:
## Tax Audit Report
Audited against `analysis/tax-doc-summary.csv` (N documents, M values).
Filing status: [status]. Forms reviewed: [list].
### 1. Internal Consistency
| Check | Status | Expected | Actual | Diff | Detail |
|-------|--------|----------|--------|------|--------|
| Wages match W-2 | PASS/FAIL | $X | $Y | $Z | ... |
| Interest match 1099-INT | ... | ... | ... | ... | ... |
| Dividends match 1099-DIV | ... | ... | ... | ... | ... |
| Total income sum | ... | ... | ... | ... | ... |
| AGI calculation | ... | ... | ... | ... | ... |
| Taxable income | ... | ... | ... | ... | ... |
### 2. Math Verification
| Check | Status | Expected | Actual | Diff | Detail |
|-------|--------|----------|--------|------|--------|
| Tax bracket verify | PASS/FAIL/WARN | $X | $Y | $Z | ... |
### 3. Withholding Match
| Check | Status | Expected | Actual | Diff | Detail |
|-------|--------|----------|--------|------|--------|
| Federal withholding | ... | ... | ... | ... | ... |
| State withholding | ... | ... | ... | ... | ... |
### 4. Cross-Return Consistency
| Check | Status | Expected | Actual | Diff | Detail |
|-------|--------|----------|--------|------|--------|
| Federal AGI = State AGI | ... | ... | ... | ... | ... |
### 5. Document Completeness
| Document | Type | Status | Maps To |
|----------|------|--------|---------|
| W-2 (Name - Employer) | W-2 | Mapped | 1040, Schedule A |
| ... | ... | ... | ... |
### 6. Missing Forms
| Form | Status | Reason | Filed? |
|------|--------|--------|--------|
| Schedule B | Required | Interest > $1,500 | Yes/No |
| ... | ... | ... | ... |
### 7. Common Mistakes Review
| # | Pitfall | Status | Detail |
|---|---------|--------|--------|
| 1 | AGI includes all income | PASS | Verified: AGI = wages + interest + dividends + ... |
| ... | ... | ... | ... |
### 8. Estimated Payments
| Check | Status | Detail |
|-------|--------|--------|
| Federal estimated (Line 26) | PASS/N/A | ... |
| State estimated (Line 41) | PASS/N/A | ... |
---
### Verdict
**[VERDICT]**
[Summary paragraph]
- Total checks: N
- Passed: N
- Warnings: N
- Failed: N
---
*Disclaimer: This audit assists with tax return preparation. It does not constitute tax advice. Verify all results against source documents. Consult a qualified tax professional for your specific situation.*
Verdict values:
Collect these key 1040 line values from the user:
| Key | Form Line | Description |
|---|---|---|
line_1_wages | 1040 Line 1 | Total wages from all W-2s |
line_2b_interest | 1040 Line 2b | Taxable interest |
line_3b_dividends | 1040 Line 3b | Ordinary dividends |
line_7_capital_gain | 1040 Line 7 | Capital gain or loss |
line_8_other_income | 1040 Line 8 | Other income (Schedule 1) |
line_9_total_income | 1040 Line 9 | Total income |
line_10_adjustments | 1040 Line 10 | Adjustments to income |
line_11_agi | 1040 Line 11 | Adjusted gross income |
line_12a_deduction | 1040 Line 12a | Standard or itemized deduction |
line_13a_qbi | 1040 Line 13a | QBI deduction |
line_13b_sched1a | 1040 Line 13b | Schedule 1-A deductions |
line_14_total_deductions | 1040 Line 14 | Total deductions |
line_15_taxable_income | 1040 Line 15 | Taxable income |
line_16_tax | 1040 Line 16 | Tax |
line_25a_w2_withholding | 1040 Line 25a | W-2 withholding |
Collect these key MD 502 line values:
| Key | Form Line | Description |
|---|---|---|
line_1_agi | MD 502 Line 1 | Federal adjusted gross income |
line_40_withholding | MD 502 Line 40 | Maryland tax withheld |
Additional state values are helpful but not required for the core checks.
A list of form names the user has completed. Common values:
["1040", "Schedule A", "Schedule B", "Schedule C", "Schedule D", "Form 8949", "Schedule 1", "Schedule 1-A", "Schedule 2", "Form 8959", "Form 8995", "MD 502"]
reference/curated/ — format: (Source: filename.md, section)| Script | Purpose | Location |
|---|---|---|
cross_check.py | Federal vs state, withholding vs W-2, AGI math, tax bracket verification | .claude/skills/tax-audit/scripts/ |
completeness_check.py | Document coverage, required forms, orphaned documents | .claude/skills/tax-audit/scripts/ |
Also available from /tax-cheatsheet (do not modify):
| Script | Purpose | Location |
|---|---|---|
form_line_lookup.py | Query CSV by document type and box | .claude/skills/tax-cheatsheet/scripts/ |
standard_vs_itemized.py | Compare standard vs itemized deduction | .claude/skills/tax-cheatsheet/scripts/ |
salt_cap_calculator.py | SALT cap with MAGI phase-out | .claude/skills/tax-cheatsheet/scripts/ |
/tax-prep — Extract document values into CSV (run first)/tax-cheatsheet — Line-by-line form filling help (run before this skill)/tax-advisor — Next-year tax planning based on this year's data (run after filing)1040-line-by-line.md |