/cpa-skills:cash-applicationfrom cpa-skills
Matches bank credits and remittance advices to open AR invoices using configurable rules (remittance detail, embedded invoice numbers, exact and lump-sum amount matching). Flags unapplied cash, short-pays, and overpayments in an exception queue for human review rather than force-applying to the nearest invoice.
Ships in cpa-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.
Read when SKILL.md points to them; scripts run unread.
Applying cash is the act of saying which invoice a payment settles. The mechanical part - matching a deposit amount to an open invoice balance, or to several that sum to it - is something a script should do, every time, the same way. The part that is not mechanical is deciding why a payment is $42 short, or who a payment with no recognizable name belongs to. That distinction is the whole design of this skill: apply what ties exactly, and refuse to guess at anything else.
A deposit is APPLIED or RESOLVED, and the batch is not COMPLETE, unless:
unidentified_payer
is the one classification that never clears the gate - naming a payer "unidentified" states
the finding, it does not resolve it. See AGENTS.md rule 4.--manual-applications.aliases.csv entry, or an
invoice number embedded in the bank reference - never from "this name looks close enough." Two
customers sharing a display name are never resolved from the name alone; they require an
aliases.csv entry.deposit_id, date, amount, reference, payer_name, description. If you only have a
PDF statement, run it through bank-statement-to-excel first and filter to credits.customer_id, customer_name, invoice_number, invoice_date, due_date, original_amount, open_balance.deposit_id, deposit_reference, customer_id, invoice_number, amount_applied, deduction_code, deduction_reason.payer_alias, customer_id.Confirm before running: the invoice list is open balances as of the same date the deposits cover (a payment for an invoice already cleared in a prior batch will otherwise look unmatched), and the deposits file is credits only, not the full statement.
Remittance advices and emails are not machine-uniform, so this is a judgment step, not a script.
For scanned or text-layer remittance PDFs, reuse the extractor from bank-statement-to-excel:
python3 ../bank-statement-to-excel/scripts/extract_text.py --input remittances/ --out work/
For email remittances, read the .eml/.txt body directly. Either way, build
remittances.csv by hand from what you read: one row per invoice line, with the amount applied
and any deduction code/reason stated on the advice. Never infer an invoice number or amount
that isn't printed on the remittance - a line you can't read becomes a row with the invoice
number blank and a note, which the matching script will surface as an exception rather than
silently drop.
If no remittance was received for a payment, skip this step for that deposit - it is not an error, just a payment the matcher has to work out from the bank reference and amount alone.
python3 scripts/cash_apply.py \
--deposits deposits.csv --invoices invoices.csv \
--remittances remittances.csv --aliases aliases.csv \
--control-total 184250.00 --as-of 2026-10-20 \
--client "Acme Inc" --period "2026-10" \
--out "Acme Inc - 2026-10 Cash Application.xlsx"
For each deposit, the script runs this cascade, strongest evidence first, and an invoice leaves the pool once fully consumed so a weaker rule can never steal it from a stronger one:
| Pass | Rule | Notes |
|---|---|---|
| 1 | Remittance detail | Applies exactly what the advice says; any leftover after remittance lines carries forward to the next passes. |
| 2 | Invoice number embedded in bank reference/description | Only when the number uniquely identifies one open invoice for the resolved customer and the amount ties exactly. |
| 3 | Exact amount match | Deposit (or leftover) equals exactly one open invoice's remaining balance. More than one tie is ambiguous and is not guessed. |
| 4 | Lump sum (subset match) | Several open invoices for the same customer sum exactly to the deposit - common with batched customer payment runs. |
Customer identity for passes 2-4 comes only from remittance detail, aliases.csv, or a unique
invoice-number match in the reference text - never from approximate name matching.
Anything that doesn't resolve through this cascade becomes a row in the Exception Queue with candidate invoices and a suggested (not confirmed) cause.
Open cash_app_exceptions.csv (same rows as the workbook's Exception Queue tab) and classify
each one:
short_pay_discount - an authorized early-payment or trade discount; legitimate and
expected to recur with this customer.short_pay_deduction - a deduction for damages, returns, or a chargeback. Usually needs
a credit memo.short_pay_dispute - the customer disputes the invoice and the shortfall is unresolved.
Needs follow-up, not a write-off.overpayment_credit_balance - hold the excess as a credit on the customer's account.overpayment_refund_due - the customer is owed a refund.unidentified_payer - the one you must never bury. Escalate regardless of amount; stating
it is not resolving it.data_error - wrong invoice, wrong amount, or a duplicate remittance line.misc_resolved - resolved by preparer judgment not covered above; state why in notes.Feed the completed file back in:
python3 scripts/cash_apply.py ... --manual-applications cash_app_manual.csv --out "..."
manual-applications.csv can both apply cash to a specific invoice (fill invoice_number and
amount_applied) and/or record a classification for the deposit's remaining leftover - a pure
refund or an unidentified payer has no invoice to apply to, only a classification.
unidentified_payer item aging past the period belongs on the month-end close
checklist, not carried silently - unapplied cash overstates true AR collectability if the
underlying invoice is actually settled.Workbook tabs:
Then, in chat: total deposits and whether they tie to the control total, applied vs.
resolved vs. exception dollars, the exception count, and anything that needs the AR team to
chase before next period (lead with any unidentified_payer amount).
unidentified_payer item, regardless of size.Fully local: standard library plus openpyxl (and pdfplumber, only if reusing the PDF
extractor from bank-statement-to-excel in Step 1). No network calls, no uploads, no telemetry.
Bank account details and customer data never leave the machine.
pip install openpyxl
Built by Adopt AI — free to use and modify.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub adoptai/cpa-skills --plugin cpa-skills43 skills in this plugin
/accrual-proposalsPropose month-end accruals from open POs received but not yet invoiced (GRNI), recurring vendor spend patterns, and preparer-supplied one-time items, cross-checked against the AP register so nothing is double-booked, with every line carrying a stated basis and an auto-reversal flag for reviewer approval. Never books anything - output is a proposed JE batch for a Controller to approve before it posts to the GL. Use whenever the user mentions month-end accruals, accrual proposals, what should we accrue this month, GRNI, goods received not invoiced, a recurring accrual estimate, or the accrual JE batch for close. Also trigger on "propose accruals," "draft the accrual entries," "what are we missing on the accrual side," or when an open PO report, AP register, or vendor spend history is supplied together at month end. Inverts cutoff-and-unrecorded-liabilities: that proves a search for what was missed is complete; this proposes what to book. Runs fully local - no client data leaves the machine./ar-aging-tie-outTie the accounts receivable aging to the general ledger control account and test it properly — recomputing every ageing bucket from the invoice date rather than trusting the report, grossing up netted credit balances, and flagging stale balances, unapplied cash, and cutoff errors. Use this whenever the user mentions AR aging, accounts receivable aging, tying the aging to the GL, an AR subledger that does not agree to the control account, stale or uncollectible receivables, the allowance for doubtful accounts, unapplied cash or credits, or receivable confirmations. Also trigger on "does our AR aging tie," "reconcile accounts receivable," "which receivables are old," "check the allowance," "why is AR off," "review the aging," or when an AR aging report and a trial balance are provided together. Runs fully local — no customer or receivable data leaves the machine./arr-waterfallBuilds the ARR/MRR movement waterfall (new, expansion, contraction, churn) from a subscription export and the prior period's ending ARR, closes the arithmetic identity between beginning and ending ARR, and ties ending ARR to recognized revenue — refusing to deliver when the waterfall doesn't close or ending ARR doesn't tie to the GL. Use this whenever the user mentions the ARR waterfall, MRR movement, new/expansion/contraction/churn classification, the SaaS board metric, or ARR rollforward. Also trigger on "build the ARR waterfall," "what's our net revenue retention," "classify these customers as new/expansion/churn," "tie ARR to revenue," or when current and prior-period subscription exports are supplied together. Commonly paired with `deferred-revenue-waterfall` (customer ARR movement vs. the GL deferred balance) and `revenue-trace-to-source`. Runs fully local./audit-samplingSelect an audit sample from a population using monetary unit (PPS), stratified, or random attribute sampling — with the sample size derived from stated parameters, a recorded random seed so the selection can be re-performed exactly, and a prepared testing worksheet. Use this whenever the user mentions audit sampling, selecting a sample, sample size, MUS or PPS or monetary unit sampling, statistical sampling, haphazard selection, stratifying a population, testing a sample of transactions, projecting misstatement, or asks how many items to test. Also trigger on "pick a sample of invoices," "select items for testing," "how big should my sample be," "select 40 disbursements," "sample the AR balances," "extrapolate the error," or when a population export is provided for testing. Runs fully local — no client population data leaves the machine./audit-workpaperBuild an audit workpaper that documents the objective, the population and how it was obtained, the procedures performed, the evidence examined, the exceptions found, and a conclusion — and validate that the conclusion is actually supported by what was documented, refusing to accept "no exceptions noted" when exceptions exist or a conclusion reached with no evidence recorded. Use this whenever the user mentions audit workpapers, working papers, audit documentation, a workpaper template, documenting a procedure, evidence and conclusions, tickmarks, workpaper review notes, sign-off, or preparing documentation for inspection or peer review. Also trigger on "write up this workpaper," "document this procedure," "build a workpaper," "does this workpaper support the conclusion," "prepare this for review," or when procedure results need to be turned into documentation. Runs fully local — no client data leaves the machine./balance-sheet-recon-packBuild the balance sheet reconciliation pack across the full chart, not just cash — for every asset, liability, and equity account, prove GL balance equals supporting schedule plus itemized items, with an unexplained difference that must be zero and a sign-off requiring a named preparer and reviewer before an account counts as reconciled. Use this whenever the user mentions a balance sheet reconciliation pack, the rec pack, the close binder or tie-out binder, reconciling every balance sheet account, which accounts are reconciled this month, or asks which accounts still need a schedule or a sign-off. Also trigger on "build the rec pack," "reconcile the whole balance sheet," "tie every account to its schedule," or when a trial balance and account-level schedules are provided together. For deep transaction matching on one cash account, use bank-rec-to-gl instead — this pack assembles that result, and every other account's, into one full-chart proof. Runs fully local — no client data leaves the machine.Other plugins' skills for the same job