/cpa-skills:three-way-matchfrom cpa-skills
Performs three-way matching between purchase orders, vendor invoices, and receiving records for accounts payable testing. Detects duplicate invoices, over-billing, and price/quantity variances against configurable tolerances.
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.
A three-way match asks whether the company ordered it, received it, and was billed correctly for it. The control is old and well understood; what makes testing it valuable is that the failures are almost never random.
Duplicate payments cluster around the same handful of vendors, because the cause is a process defect — an invoice submitted twice under slightly different numbers, a credit memo never applied, a PO closed and reopened. Price variances cluster too, because someone is invoicing off a stale price list. So the pattern matters more than the individual exception, and the output is organized to make patterns visible rather than to produce a long flat list.
The population is proven before it is analysed:
Ask for all three, plus the control total:
Where the client has no written tolerance policy, that is itself a finding. Use zero tolerance, say that you did, and note the absence of a policy as a control observation.
python3 scripts/three_way_match.py \
--invoices inv.csv --pos po.csv --receipts rec.csv \
--control-total 8412990.55 --validate-only
Reports counts and totals for each file, invoices with no PO reference, POs with no invoices, receipts with no PO, and whether the invoice population ties to the control total. Resolve differences first — in particular, ask what the export excluded. A receiving file limited to one warehouse will manufacture hundreds of false "invoiced not received" exceptions and bury the real ones.
python3 scripts/three_way_match.py \
--invoices inv.csv --pos po.csv --receipts rec.csv \
--control-total 8412990.55 \
--qty-tolerance-pct 2 --price-tolerance-pct 1 --de-minimis 50 \
--client "Cascade Industrial Supply" --period "FY2025" \
--out "Cascade - FY2025 Three-Way Match.xlsx"
Matching runs on PO number and line where available, falling back to PO plus item. Each invoice line receives one of these outcomes, and every outcome is reported:
| Outcome | Meaning |
|---|---|
matched | Quantity and price within tolerance against both PO and receipt |
price variance | Billed unit price outside tolerance of the PO price |
quantity variance | Billed quantity outside tolerance of quantity received |
over-PO | Billed quantity exceeds quantity ordered |
over-received | Billed quantity exceeds quantity received — billed for goods not received |
not received | Invoice matched to a PO with no receiving record at all |
no PO | Invoice with no purchase order — the control was bypassed |
PO not found | Invoice references a PO that does not exist in the file |
duplicate | See below |
Duplicate detection runs on four patterns, because duplicates rarely repeat exactly:
The third and fourth patterns find the ones that matter. An invoice resubmitted as INV-4471
and INV4471, or a PO line billed on two invoices a month apart, will pass an exact-match check
and has to be caught structurally.
The workbook aggregates by vendor before it lists by invoice, because that is the order in which the findings are actionable.
Workbook tabs:
Then, in chat: population and whether it ties, the three or four vendor-level patterns that matter, quantified recovery opportunity, the GRNI accrual figure, and control observations. Lead with recoverable dollars — that is what funds the next engagement.
State these as attributes with the supporting documents. Do not conclude on intent.
Fully local: standard library plus openpyxl. No network calls, no uploads, no telemetry. Vendor
master data and bank details, if present in the inputs, are never transmitted and are excluded
from output beyond what the exception requires.
pip install openpyxl
Built by Adopt AI — free to use and modify.
What SKILL.md sets; muted values are Claude Code's defaults
43 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.npx claudepluginhub adoptai/cpa-skills --plugin cpa-skillsOther plugins' skills for the same job