filing-diff
Skill8 starsChanged 4 months agoMITView on GitHub
Compare two versions of a tax return or filing field by field and show every change — proving that every field in both versions is accounted for as changed, unchanged, added or removed, that the net numeric effect reconciles to the movement in the bottom line, and that carryforwards agree to the prior year as filed. Use this whenever the user mentions comparing two versions of a return, an amended return against the original, a superseding filing, what changed between drafts, changes made after review sign-off, validating a software conversion, or confirming that carryforwards were brought forward correctly. Also trigger on "diff these returns," "what changed from the original," "compare as-filed to amended," "did anything change after I reviewed it," "check the carryforwards came across," or when two versions of the same filing are provided together. Runs fully local — no return data leaves the machine.
- Installs packages
In this repository44 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- accrual-proposalsSkill
- ar-aging-tie-outSkill
- arr-waterfallSkill
- audit-samplingSkill
- audit-workpaperSkill
- balance-sheet-recon-packSkill
- bank-rec-reviewSkill
- bank-rec-to-glSkill
- bank-statement-to-excelSkill
- board-package-builderSkill
- budget-vs-actualSkill
- cash-applicationSkill
- cash-flow-tieoutSkill
- commission-recalcSkill
- consolidation-rollupSkill
- cutoff-and-unrecorded-liabilitiesSkill
- debt-covenant-checkSkill
- deferred-revenue-waterfallSkill
- depreciation-tie-outSkill
- dunning-draftsSkill
- duplicate-payment-scanSkill
- expense-policy-testingSkill
- flux-narrativeSkill
- fx-revaluationSkill
- intercompany-reconSkill
- invoice-codingSkill
- journal-entry-anomaly-scanSkill
- k1-extract-summarizeSkill
- lease-schedule-tie-outSkill
- month-end-close-checklistSkill
- payroll-tax-reconciliationSkill
- pbc-assemblerSkill
- prepaid-amortizationSkill
- receipts-to-expenseSkill
- return-yoy-varianceSkill
- revenue-trace-to-sourceSkill
- sales-tax-reconciliationSkill
- tax-return-reviewSkill
- thirteen-week-cash-forecastSkill
- three-way-matchSkill
- trial-balance-integritySkill
- vendor-statement-reconSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 27
No clean diff unless:
- Distinctive: line 73
Test 3 — Changes quantified: Every numeric change carries an old value, a new value, and a delta.
- Distinctive: line 99
If you are comparing an original to an amended return, two things are worth stating plainly on the workpaper:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Filing Diff
Four situations need this, and all four are places where a change slips through unnoticed:
- An amended return. The "as originally filed" column must agree to what was actually filed — not to the software's current state of the file, which may have been adjusted since. This is the single most common defect in amended-return work.
- Changes made after review sign-off. A reviewer approves a return, someone opens it again, and something moves. Firms rarely have any way to detect this, and it is a real quality-control failure.
- Carryforwards. Dropped carryforwards are the highest-frequency finding in return review, and the check is a comparison: prior-year-as-filed against what the current year carried forward. Doing it by eye is why it gets missed.
- A software conversion. The same return in two systems should produce the same numbers.
The mistake people make is diffing only the numbers they thought to look at. A diff is only useful if it accounts for every field, including the ones that appeared, vanished, or stayed put when they should have moved.
The gate
No clean diff unless:
- Every field is accounted for. Matched + added + removed must equal the union of fields across both versions. A field present in one version and silently absent from the comparison is the failure this test exists to prevent.
- Both versions are identified — which is the earlier and which the later, with dates or labels. A diff with no direction cannot be read.
- The net numeric effect reconciles. Where a total's components are identified, the sum of changes to those components must equal the change in the total. A change that does not propagate is either an error or an override.
- No change is reported without both values. A field showing a new value and no old value is an addition, not a change, and the distinction matters.
Inputs
- Two field-level extracts of the same filing — form, line, description, value. From the
return PDFs (extract with
pdfplumber) or, better, from the software's own export, which gives you the field identifiers rather than the printed labels. - Version labels and dates —
as filed 2026-03-14andamended 2026-08-02, orreviewed 2026-03-10andfiled 2026-03-14. - Optional: a totals map — which fields are the components of which total. This enables the propagation test and is worth building once per return type.
- Optional: a review timestamp, to isolate changes made after sign-off.
- Optional: the prior-year carryforward schedule as filed, for the carryforward test.
Match on field identifier where available, falling back to form plus line. Do not match on the printed description — descriptions change between software versions and years, which produces phantom additions and removals.
Step 1 — Diff
python3 scripts/filing_diff.py \
--version-a as_filed.csv --label-a "As filed 2026-03-14" \
--version-b amended.csv --label-b "Amended 2026-08-02" \
--totals-map totals.csv \
--prior-year-carryforwards py_carryforwards.csv \
--materiality 1000 \
--client "Brannon Holdings LLC" --return-type 1065 --tax-year 2025 \
--out "Brannon - 2025 1065 Amended vs Original.xlsx"Seven tests:
- Test 1 — Field accounting. Matched + added + removed = the union of fields in both versions.
- Test 2 — Versions identified and directional. Labels present, and which is later established.
- Test 3 — Changes quantified. Every numeric change carries an old value, a new value, and a delta. Non-numeric changes (names, addresses, elections, checkboxes) are reported separately because they cannot be netted and are frequently the more consequential change.
- Test 4 — Propagation. Where the totals map identifies components, the sum of component changes equals the change in the total. A total that did not move while its components did is flagged, and so is the reverse.
- Test 5 — Carryforward continuity. Each prior-year carryforward as filed against the value carried into the current year.
- Test 6 — Post-review changes. Where a review timestamp is supplied, every change made after it, listed individually regardless of amount.
- Test 7 — Suspicious stability. Fields that did not change where a dependent field did. A taxable income figure that is identical while AGI moved is either an override or an error, and no ordinary diff surfaces it.
Step 2 — Read the non-numeric changes first
The instinct is to read the largest dollar change first. Resist it. A changed identification number, filing status, entity type, address, election, or checkbox often matters more than a five-figure numeric change, because those either invalidate the filing, change the entity's tax character, or misdirect correspondence and payments. They also cannot be netted, so they will not appear anywhere in the dollar summary.
The workbook puts them on their own tab, ahead of the numeric detail, for that reason.
Step 3 — On amended returns specifically
If you are comparing an original to an amended return, two things are worth stating plainly on the workpaper:
- The "as originally filed" figures must come from the return as actually filed — a copy of the filed return or the acknowledgement, not the software file. If the software file was adjusted after filing, the amended return's comparative column will be wrong and the diff is what reveals it.
- Every affected year and every affected state needs the same treatment. A change that alters a carryforward changes subsequent years too, and those may already be filed. The script reports which changed fields feed a carryforward so the downstream years can be identified.
Whether to amend, and which years, is a decision for the person signing. This produces the evidence.
Step 4 — Deliver
Workbook tabs:
- Diff Summary — the seven tests, counts of changed, added, removed and unchanged, the net numeric effect, and the changes above materiality. The signable page.
- Non-Numeric Changes — identification, status, elections, checkboxes, names, addresses. Deliberately ahead of the numbers.
- Numeric Changes — every changed field with form, line, old value, new value, delta, and whether it exceeds materiality. Sorted by absolute delta.
- Added and Removed — fields present in only one version. A removed field with a value is usually the more serious of the two.
- Propagation — totals against the sum of their components, with any break.
- Carryforward Continuity — prior year as filed against current year carried forward.
- Post-Review Changes — where a review timestamp was supplied.
- Unchanged Detail — for completeness, so the field accounting can be re-performed.
Then, in chat: the direction of the comparison, count of changes by kind, the non-numeric changes, the net numeric effect, and anything that failed to propagate. Lead with non-numeric changes and propagation breaks — those are the findings; the largest dollar movement is usually the one everybody already knows about.
What to escalate
- A removed field that carried a value. Something stopped being reported. That is different from a value changing and is easier to miss.
- A total that did not move while its components did, or moved by a different amount. An override, an error, or a rounding convention nobody documented.
- Any change to an identification number, filing status, or entity type.
- A carryforward that does not agree to the prior year as filed.
- Any change made after review sign-off, regardless of amount. The amount is not the point; the fact that the control was bypassed is.
- A change to a field that feeds a carryforward, because subsequent years are affected and may already be filed.
- An amended return whose "as originally filed" column does not agree to the return as actually filed.
Security posture
Fully local: standard library plus openpyxl. No network calls, no uploads, no telemetry. Where
identification numbers appear as changed fields, the workbook masks all but the last four digits.
Dependencies
pip install openpyxl
# pdfplumber if extracting field values from return PDFsBuilt by Adopt AI — free to use and modify.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

