cash-flow-tieout
Skill8 starsChanged 4 months agoMITView on GitHub
Build or verify an indirect-method statement of cash flows and prove it — the net change in cash must equal the movement in the balance sheet cash accounts, each section must tie to the underlying balance sheet changes, and every non-cash and reclassifying adjustment must be named. Use this whenever the user mentions the cash flow statement, statement of cash flows, indirect method, operating investing and financing activities, working capital changes, a cash flow that does not tie or does not foot, free cash flow build-up, or monthly cash flow analysis. Also trigger on "build the cash flow statement," "why doesn't our cash flow tie," "reconcile cash flow to the balance sheet," "cash flow by month," "check the cash flow statement," or when a balance sheet and income statement for two periods are provided together. Runs fully local — no client financial data leaves the machine.
- Installs packages
In this repository44 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- accrual-proposalsSkill
- ar-aging-tie-outSkill
- arr-waterfallSkill
- audit-samplingSkill
- audit-workpaperSkill
- balance-sheet-recon-packSkill
- bank-rec-reviewSkill
- bank-rec-to-glSkill
- bank-statement-to-excelSkill
- board-package-builderSkill
- budget-vs-actualSkill
- cash-applicationSkill
- commission-recalcSkill
- consolidation-rollupSkill
- cutoff-and-unrecorded-liabilitiesSkill
- debt-covenant-checkSkill
- deferred-revenue-waterfallSkill
- depreciation-tie-outSkill
- dunning-draftsSkill
- duplicate-payment-scanSkill
- expense-policy-testingSkill
- filing-diffSkill
- flux-narrativeSkill
- fx-revaluationSkill
- intercompany-reconSkill
- invoice-codingSkill
- journal-entry-anomaly-scanSkill
- k1-extract-summarizeSkill
- lease-schedule-tie-outSkill
- month-end-close-checklistSkill
- payroll-tax-reconciliationSkill
- pbc-assemblerSkill
- prepaid-amortizationSkill
- receipts-to-expenseSkill
- return-yoy-varianceSkill
- revenue-trace-to-sourceSkill
- sales-tax-reconciliationSkill
- tax-return-reviewSkill
- thirteen-week-cash-forecastSkill
- three-way-matchSkill
- trial-balance-integritySkill
- vendor-statement-reconSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 23
No clean statement unless:
- Distinctive: line 31
There is no unexplained residual: If a difference exists it appears as an explicit "UNEXPLAINED — DO NOT PLUG" line rather than being …
- Distinctive: line 36
Every difference must be attributed to a named cause.
- Distinctive: line 50
If a difference cannot be placed in one of those buckets, it is not explained.
- Distinctive: line 160
An account that feeds no section: Every balance sheet movement goes somewhere.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Cash Flow Statement Tie-Out
The statement of cash flows is the only primary statement that must reconcile to another one by construction. Net income plus adjustments plus working capital movements, across all three sections, has to equal the change in cash on the balance sheet. There is no judgment in that requirement — it either foots or it does not.
Which is exactly why it is so often wrong. It is usually prepared last, under time pressure, by plugging whichever line nobody will question. The plug hides inside "changes in other assets and liabilities" or "other operating activities," and it survives review because reviewers check that the bottom line agrees to cash rather than checking that each line agrees to the balance sheet.
So this skill derives each working capital movement from the balance sheet itself and compares it to what the statement claims, rather than accepting the statement's own numbers.
The gate
No clean statement unless:
- Net change in cash equals the balance sheet movement. Operating + investing + financing (+ FX effect) = closing cash − opening cash, per the balance sheet, to the cent.
- Every working capital line agrees to the balance sheet movement for that account, or carries a named non-cash adjustment explaining the difference.
- The balance sheet balances in both periods. Assets = liabilities + equity. A cash flow built on an unbalanced balance sheet is meaningless, so this is checked first.
- There is no unexplained residual. If a difference exists it appears as an explicit "UNEXPLAINED — DO NOT PLUG" line rather than being absorbed into an "other" caption.
Standing rule on the plug
Every difference must be attributed to a named cause. The legitimate reasons a working capital movement differs from the raw balance sheet change are finite and knowable:
- Non-cash additions and disposals — assets acquired under a lease, an asset received in a non-monetary exchange, capitalised interest
- Acquisitions and disposals of businesses, which move balance sheet accounts without an operating cash flow
- Foreign currency translation on balance sheet accounts of foreign operations, which belongs in the FX effect line and not in working capital
- Reclassifications between captions, including current/non-current reclassification
- Non-cash write-offs — bad debt written off against the allowance, inventory written down
- Accrued but unpaid amounts moving between accrual accounts
- Stock compensation, deferred tax, and other non-cash charges in net income
If a difference cannot be placed in one of those buckets, it is not explained. Report it. The script will not let it disappear into a caption.
Inputs
- Balance sheet, both periods — account level or at least caption level, with the cash and cash-equivalent accounts identified.
- Income statement for the period.
- Known non-cash items — depreciation, amortisation, stock compensation, deferred tax, gains and losses on disposal, impairment, bad debt expense.
- Investing and financing detail — capital expenditure, proceeds from disposals, debt drawn and repaid, equity issued, dividends and distributions paid.
- The client's own cash flow statement, if one exists and you are verifying rather than building. The comparison against your derived figures is the point of the exercise.
Step 1 — Prove the balance sheet, then derive
python3 scripts/cash_flow.py \
--balance-sheet bs.csv \
--income-statement is.csv \
--noncash noncash.csv \
--investing-financing invfin.csv \
--adjustments adjustments.csv \
--client "Latham Industrial Group" --period "FY2025" \
--out "Latham - FY2025 Cash Flow Tie-Out.xlsx"Six tests:
- Test 1 — Balance sheet balances in both periods. Runs before anything else. An unbalanced balance sheet makes every downstream figure meaningless.
- Test 2 — Cash movement identified. Opening and closing cash per the accounts flagged as cash and equivalents, and the resulting change.
- Test 3 — Working capital derived from the balance sheet. Each operating asset and liability account's movement computed and signed correctly. This is where the derivation replaces trust.
- Test 4 — The statement foots. Operating + investing + financing + FX = change in cash.
- Test 5 — Every adjustment named. Each difference between a derived movement and the amount presented must be attributed to a cause in the list above.
- Test 6 — Comparison to the client's statement, where supplied, line by line.
Step 2 — Get the signs right
Sign errors are the second most common failure after plugging, and they are easy to get wrong because the logic inverts between assets and liabilities:
| Account moves | Cash effect |
| Operating asset increases (AR, inventory, prepaid) | Outflow — cash was consumed |
| Operating asset decreases | Inflow |
| Operating liability increases (AP, accruals, deferred revenue) | Inflow — payment deferred |
| Operating liability decreases | Outflow |
The script applies this from each account's declared type, so a misclassified account produces a sign error you can trace rather than a mystery. Check the account types before reading the result — an account typed as a liability when it is a contra-asset will flip its contribution and the statement will still foot, because the error is inside the section.
A doubled sign error is the nastiest case: two accounts wrong in opposite directions leave the statement footing perfectly while both sections are misstated. Test 3's line-by-line derivation is what surfaces it.
Step 3 — Read the classification questions
Section classification is judgment in a handful of recurring places, and the script flags them rather than deciding:
- Interest paid — operating under most frameworks, but presentation varies and disclosure may be required
- Dividends received — operating or investing depending on framework and policy
- Capitalised interest — investing, though the expense ran through operating
- Overdrafts — financing, or part of cash and equivalents, depending on the arrangement
- Bank debt with a revolving facility — gross versus net presentation of draws and repayments
- Restricted cash — whether it belongs in cash and equivalents at all
- Book overdrafts versus bank overdrafts — these are different and are treated differently
These are flagged as judgment items with the amounts involved, for the person signing.
Step 4 — Deliver
Workbook tabs:
- Cash Flow Statement — the derived statement in proper form, with the foot to the change in
cash shown, and the unexplained line reading
0.00. The signable page. - Proof — the six tests with amounts and differences.
- Working Capital Derivation — every operating account: opening balance, closing balance, raw movement, named adjustments, and the cash flow effect with its sign. The tab that catches the plug.
- Balance Sheet Movement — every account, both periods, movement, and the section it feeds. Nothing is allowed to feed no section.
- Comparison — where the client's statement was supplied, line by line against the derived figures, with differences.
- Judgment Items — the classification questions above, with amounts, deliberately not concluded.
- Monthly Analysis — where monthly balance sheets are supplied, the cash flow by month with unusual movements flagged.
Then, in chat: whether it foots, the change in cash, the three sections, and any line where the derived figure disagrees with what was presented. Lead with the disagreement — that is the finding, not the total.
What to escalate
- A statement that foots only because of an "other" line. Report the size of that line relative to the sections. A material unexplained "other" is a plug regardless of its label.
- Operating cash flow persistently below net income while revenue grows — the classic earnings-quality signal. Report the relationship across periods; do not characterise it.
- Capital expenditure with no corresponding fixed asset movement, or vice versa.
- Debt movements that do not agree to the debt schedule or to interest expense at any plausible rate.
- An account that feeds no section. Every balance sheet movement goes somewhere. An account excluded from all three sections is the definition of a hidden plug, and the script refuses to let it be silent.
- Restricted cash included in cash and equivalents without disclosure.
- A large FX effect in an entity with no foreign operations.
Security posture
Fully local: standard library plus openpyxl. No network calls, no uploads, no telemetry.
Dependencies
pip install openpyxlBuilt by Adopt AI — free to use and modify.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

