Extract PDF statement transactions and verify balance tie-outs
Extract bank and card statement PDFs into CSV or XLSX, check balances and totals, and return a reconciliation report with unresolved rows.
npx skills add agentskillexchange/skills --skill extract-pdf-statement-transactions-and-verify-balance-tie-outs
Invoke Statement Extract and Prove when an agent must convert a bank or credit-card statement PDF into transaction rows with an explicit reconciliation report, especially when ordinary PDF conversion drops rows, reverses signs, or misreads decimal separators. The operator supplies the local PDF, account type, locale and independently printed opening/closing balances where needed. The workflow extracts rows from the text layer, checks arithmetic and reports unresolved discrepancies.
What this skill actually does
Install the complete statement-extract-and-prove directory from OneWave AI’s Claude Skills repository, retaining its scripts and references. Use a dedicated Python environment with python -m pip install pdfplumber openpyxl; openpyxl is only needed for XLSX. From that skill directory, run python scripts/extract_statement.py statement.pdf --out out/stmt --xlsx --account-type bank. Use --account-type card for credit cards and set --decimal dot or --decimal comma and --date-order mdy or --date-order dmy when the document establishes those conventions. Do not infer them from the operator’s location.
The extractor emits out/stmt.csv, out/stmt.meta.json and optional out/stmt.xlsx, with page coordinates and parsing flags. Run python scripts/prove.py out/stmt.csv --meta out/stmt.meta.json. Supply --opening, --closing and --stated-count using values actually printed on the statement when automatic detection is incomplete. The checker tests balance tie-out, available running balances, page continuity, summary totals, printed row counts and number formats. Its default report directory is out/stmt_proof, containing proof_report.md, proof.json and low_confidence.csv. Exit 0 reports PROVEN; exit 1 reports NOT PROVEN. Read the individual checks and caveats rather than treating the verdict as a guarantee of document accuracy.
If the extractor reports NO TEXT LAYER, perform OCR using the upstream OCR reference and retry. For an arithmetic failure, inspect the reported page or row span, confirm the actual PDF values, adjust documented column bands or parsing flags, and rerun extraction and proof. Never invent a balancing transaction, silently drop a row or change an amount merely to force agreement. Independently verify an opening balance derived from the first transaction; retain flags for values read visually. Split combined statements by period before checking them.
Deliver the CSV or XLSX, reconciliation report and low-confidence rows with an explicit status and remaining gaps. This scope ends at extracting statement rows and documenting their consistency: transaction categorization, posting to QuickBooks or Xero, ledger close, payments and financial advice are separate workflows. The upstream Agent Skills instructions and local Python commands are portable across compatible agent runtimes, supporting a Multi-Framework mapping. Repository identity, source files and invocation metadata were inspected; runtime behavior and security have not been certified.