/cpa-skills:audit-samplingfrom cpa-skills
Selects audit samples from a population using monetary unit (PPS), stratified, or random attribute sampling with derived sample sizes, recorded random seeds, and prepared testing worksheets. Runs fully local.
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.
Sampling is where audit files are most often indefensible, and almost never because the sample was too small. It is because the basis was never written down. A reviewer three years later cannot tell why 40 items were chosen, how they were chosen, whether the population was complete, or what the result implies about the balance as a whole.
This skill produces a selection that can be re-performed exactly and a worksheet that states its own basis. Everything else is secondary.
No selection is produced unless:
Sample sizes depend on firm methodology. This skill computes what can be computed and requires you to supply what is a matter of methodology.
-ln(risk of incorrect acceptance) — mathematics, not a remembered table.--expansion-factor. The script will not invent one, and says so on the
workpaper if none was given.If your firm has sampling tables, use them and enter the resulting size with
--sample-size — the script will still perform the selection, the reproducibility, and the
projection, and will document that the size came from firm tables.
| Method | Use when | Watch out for |
|---|---|---|
MUS / PPS (mus) | Testing for overstatement of a balance made of many positive items — receivables, inventory, additions, disbursements. The default for substantive testing. | Cannot handle negative balances. Poor at detecting understatement. Zero balances have no chance of selection. |
Stratified (stratified) | The population has a few large items and many small ones — most real populations. Reduces sample size for the same assurance. | Strata boundaries must be stated and justified. |
Random attribute (attribute) | Testing whether a control operated, not a dollar amount — approvals, matching, authorization. | The conclusion is a deviation rate, not a dollar projection. Do not project dollars from an attribute sample. |
MUS examines every item at or above the sampling interval with certainty. That property is why it is preferred for substantive testing: the largest items are not left to chance, and the sample naturally concentrates where the money is.
python3 scripts/select_sample.py --population pop.csv \
--control-total 4128455.19 --validate-only
Reports population count, total, negative and zero items, the largest items, and whether the total agrees to the control total. Resolve any difference before selecting.
Negative balances in a MUS population are a genuine professional problem, not a data issue. Credit balances in receivables, credit memos in disbursements, and contra items cannot be sampled proportionally to size. Handle them one of three ways, and record which:
The script requires an explicit --negatives choice and refuses to guess.
python3 scripts/select_sample.py \
--population pop.csv \
--control-total 4128455.19 \
--method mus \
--tolerable-misstatement 125000 \
--expected-misstatement 25000 \
--expansion-factor 1.6 \
--risk 0.05 \
--negatives separate \
--seed 20260729 \
--client "Harbour Freight Systems Inc" \
--assertion "Existence of trade receivables at 12/31/2025" \
--out "Harbour Freight - AR Existence Sample.xlsx"
The seed is yours to choose and must be recorded before selection — not after. Choosing a seed after seeing results is not random selection. Use the engagement date or any documented value.
Fill in the worksheet: for each selected item record the evidence examined, the audited amount, and the difference. Then:
python3 scripts/select_sample.py --project results.csv \
--population pop.csv --control-total 4128455.19 \
--method mus --tolerable-misstatement 125000 --risk 0.05 \
--seed 20260729 \
--out "Harbour Freight - AR Existence Conclusion.xlsx"
For MUS the projection uses tainting: an item examined in full (at or above the interval)
projects its actual difference; an item below the interval projects
(difference ÷ book value) × sampling interval. The script reports projected misstatement and
compares it to tolerable misstatement.
The comparison is the conclusion, and it is not a formality. Projected misstatement below tolerable supports the balance. Projected misstatement approaching tolerable means the balance may be materially misstated even though every individual difference looked small — that is precisely the situation sampling exists to reveal, and the one most often waved away.
Basic precision and an allowance for sampling risk depend on methodology; supply your firm's factors or compute the upper limit under your own approach. The script reports the components so either can be applied, and states which were supplied.
Workbook tabs:
Worth checking before you rely on the result:
Fully local: standard library plus openpyxl. No network calls, no uploads, no telemetry. The
population file is read-only and hashed for reproducibility, never transmitted. Output filenames
carry client name and assertion only.
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./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-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./bank-rec-reviewAudit a bank reconciliation that someone else prepared — independently recompute it, verify every reconciling item against the bank statement and the subsequent-period statement, confirm each item actually cleared, and detect plugs, stale items rolled forward, and reconciling items that exist only on the reconciliation. Use this whenever the user mentions reviewing or testing a bank reconciliation, auditing a client's reconciliation, verifying reconciling items, whether a reconciliation is supported, an outstanding check that never cleared, a suspicious reconciling item, or cash audit procedures. Also trigger on "review the client's bank rec," "test this reconciliation," "did these items clear," "is this reconciliation supported," "audit cash," or when a prepared reconciliation is provided alongside a bank statement. Distinct from preparing a reconciliation — for that, see bank-rec-to-gl. Runs fully local — no client cash data leaves the machine.npx claudepluginhub adoptai/cpa-skills --plugin cpa-skillsOther plugins' skills for the same job