/thinking-frameworks-skills:statement-reconcilerfrom thinking-frameworks-skills
Verifies statement internal consistency by checking opening_balance + sum(transactions) = closing_balance within a tolerance. Flags missing rows, double-counted rows, sign errors, and rounding diffs. Use as a gate between PDF extraction and committing transactions.
Ships in thinking-frameworks-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A statement that doesn't reconcile needs investigation before commitment. This skill checks opening + Σ(transactions) = closing and diagnoses possible missing rows, sign flips, duplicates, or rounding differences. A passing total is necessary but does not prove every row is correct: offsetting errors can cancel. Retain source-level completeness and identity checks as well.
The caller provides the parser output:
account_id, period_start, period_end.opening_balance_cents, closing_balance_cents.transactions — array of {id, date, amount_cents, description_raw}.tolerance_cents (default 100 = $1.00).account_type — affects sign convention (see below).balance_convention: "household_ledger" — confirms that both balances and transactions use the convention below. If absent or ambiguous, stop and request the parser's normalization evidence; do not guess or flip a second time.For cash and credit accounts:
closing_balance_cents = opening_balance_cents + Σ transactions.amount_cents
Sign conventions:
| Account type | Outflow (e.g., purchase, payment, withdrawal) | Inflow (e.g., deposit, payment received) |
|---|---|---|
checking / savings | negative | positive |
credit_card (household-ledger view) | negative purchase | positive card payment |
credit_card (issuer's balance view) | positive (balance grows) | negative (balance shrinks) |
This skill expects the household-ledger view for cash and credit cards: outflows are negative, inflows are positive. Cash assets are positive (overdrafts negative); credit-card amounts owed are negative and credit balances positive. If the parser supplies an explicitly identified issuer view, return it for normalization of both balances and rows before reconciling. Do not flip only transaction signs or use the separately labeled positive amount due as the closing ledger balance.
For brokerage / 401k / HSA holdings statements and mortgage statements, this identity does not apply. Skip with an explicit not-applicable result, never ok: true. Mortgage payment totals include interest and escrow, which do not reduce principal; the bookkeeper must use a separate, source-supported principal/payment consistency check.
Reconciliation Progress:
- [ ] Step 1: Confirm account_type is in {checking, savings, credit_card}, both balance markers and all amounts are integer cents, and balance_convention is household_ledger
- [ ] Step 2: Sum signed amount_cents
- [ ] Step 3: Compute computed_closing = opening + sum
- [ ] Step 4: Compute diff = closing − computed_closing
- [ ] Step 5: If |diff| <= tolerance, return ok: true
- [ ] Step 6: Else, run diagnostics
- [ ] Step 7: Emit reconciliation report
If a required value, period, or sign convention is missing, return ok: false with a missing-input diagnostic instead of computing a partial sum. For supported complete inputs, perform the arithmetic and report the exact diff even when within tolerance.
Walk these checks in order; the first that explains the diff wins.
Diagnostic A — sign flip suspect. If |diff| / 2 matches the absolute value of any single transaction within $0.50, that transaction's sign was likely flipped during extraction. Report: sign_flip_suspect: tx_id_X.
Diagnostic B — missing transaction. If |diff| matches a "Fees" or "Interest" line summary on the statement but no matching individual transaction was extracted, the parser missed the row. Report: missing_transaction_suspect: <amount> <description>.
Diagnostic C — double-counted transaction suspect. If the same (date, amount, description) triple appears twice and |diff| matches that amount, report a candidate duplicate and re-read the source rows. Identical purchases can be legitimate. Remove a row only when source evidence confirms that one printed occurrence was extracted twice, then re-run the full reconciliation and retain the correction evidence; arithmetic agreement alone does not authorize dropping it.
Diagnostic D — fee/charge omission. If diff is small (≤ $50) and consistent with a typical fee, look for "Service Charge" / "Monthly Fee" / "Foreign Transaction Fee" lines that may have been missed.
Diagnostic E — rounding accumulation. If |diff| ≤ tolerance × N/100 for N transactions, a per-row rounding may have crept in. This is rare with integer cents but possible with foreign-currency lines. Report: rounding_drift_suspect.
Diagnostic F — period mismatch. If period_end does not match the statement's printed closing date, the wrong opening or closing was paired. Report: period_mismatch_suspect.
If no diagnostic fires, return ok: false with diagnostic: "unknown" so the bookkeeper escalates.
Default tolerance: $1.00 (100 cents).
Tighten to 0 for credit-card statements where the issuer reconciles to the cent. Loosen to $5 only when explicitly asked, and surface the exact diff so the user knows.
{
"account_id": "acc_chk_001",
"period_start": "2025-12-15",
"period_end": "2026-01-14",
"opening_balance_cents": 1124300,
"closing_balance_cents": 1247500,
"transactions_sum_cents": 123200,
"computed_closing_cents": 1247500,
"diff_cents": 0,
"tolerance_cents": 100,
"ok": true,
"diagnostic": null,
"suggestions": []
}
Failed example:
{
"account_id": "acc_cc_001",
"period_start": "2025-12-15",
"period_end": "2026-01-14",
"opening_balance_cents": 0,
"closing_balance_cents": -284300,
"transactions_sum_cents": -283100,
"computed_closing_cents": -283100,
"diff_cents": -1200,
"tolerance_cents": 100,
"ok": false,
"diagnostic": "missing_transaction_suspect",
"suggestions": [
{
"type": "missing_transaction",
"expected_amount_cents": -1200,
"hint": "statement summary lists 'Foreign Transaction Fee $12.00' but no transaction extracted with that amount",
"action": "re-parse PDF page 3, look for fee line"
}
]
}
reports/alerts/ entry, never a silent drop.diff_cents means the computed closing is higher than reported: look for a missing negative outflow, an extra positive inflow, or an outflow incorrectly made positive. A positive diff suggests the reverse. These are hypotheses to check against the source, not automatic corrections.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub lyndonkl/claude --plugin thinking-frameworks-skills270 skills in this plugin
/abstraction-concrete-examplesBuilds structured abstraction ladders that translate high-level principles into concrete, actionable examples across 3-5 levels. Bridges communication gaps, reveals hidden assumptions, and tests whether abstract ideas work in practice. Use when explaining concepts at different expertise levels, moving between abstract principles and concrete implementation, identifying edge cases by testing ideas against scenarios, designing layered documentation, decomposing complex problems into actionable steps, or bridging strategy-execution gaps./academic-letter-architectGuides the creation of evidence-based academic recommendation letters, reference letters, and award nominations that combine concrete examples, meaningful comparisons, and genuine enthusiasm. Use when writing recommendation letters for students, postdocs, or colleagues, or when user mentions recommendation letter, reference, nomination, letter of support, endorsement, or needs help with strong advocacy and comparative statements./adr-architectureDocuments significant architectural and technical decisions with full context, alternatives considered, trade-offs analyzed, and consequences understood. Creates a decision trail that helps teams understand why decisions were made. Use when choosing between technology options, making infrastructure decisions, establishing standards, migrating systems, or when user mentions ADR, architecture decision, technical decision record, or decision documentation.Other plugins' skills for the same job