/thinking-frameworks-skills:cash-flow-forecasterfrom thinking-frameworks-skills
Projects 30-90 day daily cash flow per account using current balance, scheduled recurring transactions, and 6-month discretionary spend average. Flags days below configurable safety floor for overdraft detection and forward planning.
Ships in thinking-frameworks-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.
None: SKILL.md is the whole skill.
A monthly average tells you nothing about whether your rent will clear on the third when your paycheck lands on the fifth. This skill projects daily ending balance for each cash account over the forecast horizon by combining:
next_expected_date in the window.It surfaces the days where projected balance dips below a configurable safety floor, and the trough day for each account.
The caller provides:
accounts — array of cash accounts: {id, type, current_balance_cents, balance_as_of, safety_floor_cents}.recurring — recurring.json filtered to status: active.transactions — categorized transactions plus explicit account coverage for the historical window (up to 180 days); recurring entries must identify the contributing transaction IDs.today — ISO date of the common closed-day forecast anchor. Each opening balance must be reconciled through that day; a stale/intraday balance without covered roll-forward is not a current closed-day balance.horizon_days — default 60.category_overrides (optional) — {id, date, account_id, amount_cents, reason, replaces_occurrence?} with an exact date, cash account and signed integer cents. Positive means inflow; negative means outflow. A month-only calendar estimate is not a scheduled transaction.Forecast Progress:
- [ ] Step 1: Initialize daily ledger per account with current balance
- [ ] Step 2: Project recurring flows in the horizon window
- [ ] Step 3: Compute discretionary tail (rolling 6-month average)
- [ ] Step 4: Spread discretionary across days
- [ ] Step 5: Apply category_overrides
- [ ] Step 6: Compute daily ending balance
- [ ] Step 7: Flag below-floor days; identify trough
- [ ] Step 8: Report supported uncertainty scenarios or an explicit unavailable range
Require a positive integer horizon. Record the reconciled closing balance at today as the anchor, without applying today's already-booked flows again. Project exactly horizon_days future days from today + 1 through today + horizon_days, inclusive. If balance_as_of is earlier, roll it forward only with complete observed transaction coverage; otherwise return that account unassessed with the missing dates. Never relabel an old snapshot as today's balance.
For active recurring entries belonging to the cash account, walk their stored calendar recurrence from next_expected_date through the horizon, keeping only dates after the anchor. Add signed amount_cents_typical once per occurrence: negative bills lower cash, positive paychecks raise it. Give each occurrence a stable (recurring_id, date) identity. Credit-card purchases do not directly reduce checking; project the supported checking payment instead, without counting both.
Apply weekend/holiday shifts only from a supplied employer/bank or bill rule. Earlier versus later processing is not universal; if unknown, retain the stated date with a timing uncertainty or return alternate scenarios. Do not assert a next-weekday rule by default.
For each account, compute:
discretionary_total_180d = Σ amount_cents over last 180 days
where category NOT IN
{ financial.transfers_internal, savings_investment.*,
income.* }
and tx_id not in any recurring cluster
Use the number of fully covered calendar days, up to 180, as the denominator; include covered zero-spend days. Do not divide a partial import by 180. For expense categories, purchases are negative and refunds positive; report the net signed amount and any net-refund anomaly rather than forcing a negative sign. Missing recurring transaction linkage or coverage makes this component unassessed, not zero.
Add the signed daily average as a discretionary flow on each future day. For example, −180000 cents across 180 covered days gives −1000 cents/day; starting at 10000 cents yields 9000 after one otherwise empty day. Subtracting that negative value would incorrectly increase cash. Store integer cents: distribute rounding residuals deterministically so daily discretionary allocations sum to the rounded horizon total.
A better approach when day-of-week patterns matter: compute per-DOW averages (Mondays differ from Fridays) and apply by day-of-week. Default to the simple approach unless transactions has at least 90 days of data and the per-DOW variance is materially different.
Validate each override's ID, date, account and signed amount before adding it. Reject/return unassessed entries missing an exact date/account. Skip duplicate IDs. A calendar item referencing an already projected recurring occurrence is informational, not a second flow; an explicit replaces_occurrence substitutes for that occurrence exactly once. A genuinely incremental payment uses a distinct ID. Name any baseline discretionary spend being replaced so it is not counted twice.
balance[t] = balance[t-1] + Σ flows on day t
Track running balance per account.
For each account, find days where balance[t] < safety_floor_cents. Identify:
trough_balance_cents — minimum balance over horizon.trough_date — when it occurs.first_breach_date — first day below floor.breach_days — count of days below floor.If supported daily residual data and an explicit independence model are available, balance ± 1.5 × daily_residual_stddev × √elapsed_days may be reported as a heuristic sensitivity band, without a confidence/coverage claim. Monthly spend variability cannot be substituted for daily residual standard deviation. Serial dependence or timing uncertainty needs its own stated model/scenarios. If no supported range is available, return trough_band_cents: null and the limitation; do not manufacture endpoints or label the heuristic calibrated.
Default: simple daily average over 180 days, all spend not in recurring or transfers/investments/income.
Refinements (apply only when supported by data):
Document any refinement in the output's methodology field so the user can see exactly what was assumed.
A complete synthetic two-day forecast (the usual horizon may be longer):
{
"horizon": {
"start": "2026-04-26",
"end": "2026-04-27",
"days": 2
},
"accounts": [
{
"account_id": "acc_chk_001",
"starting_balance_cents": 10000,
"ending_balance_cents": 6401,
"trough_balance_cents": 6401,
"trough_date": "2026-04-27",
"trough_band_cents": null,
"first_breach_date": "2026-04-27",
"breach_days": 1,
"safety_floor_cents": 8000
}
],
"daily": [
{
"date": "2026-04-26",
"balances": {
"acc_chk_001": 9000
},
"flows": [
{
"account_id": "acc_chk_001",
"amount_cents": -1000,
"label": "Discretionary estimate",
"type": "discretionary"
}
]
},
{
"date": "2026-04-27",
"balances": {
"acc_chk_001": 6401
},
"flows": [
{
"account_id": "acc_chk_001",
"amount_cents": -1000,
"label": "Discretionary estimate",
"type": "discretionary"
},
{
"account_id": "acc_chk_001",
"amount_cents": -1599,
"label": "Recurring bill",
"type": "recurring"
}
]
}
],
"alerts": [
{
"type": "projected_below_floor",
"account_id": "acc_chk_001",
"first_breach_date": "2026-04-27",
"trough_balance_cents": 6401
}
],
"methodology": "Synthetic two-day example with a reconciled April 25 closing balance; -180000 cents over 180 covered days gives -1000 cents/day. No supported uncertainty model; range unavailable."
}
When a breach is detected:
{
"alerts": [
{
"severity": "high",
"type": "projected_below_floor",
"account_id": "acc_chk_001",
"first_breach_date": "2026-05-15",
"trough_balance_cents": -42000,
"trough_date": "2026-05-30",
"drivers": [
{ "date": "2026-05-15", "amount_cents": -350000, "label": "Property tax (annual)" }
],
"suggested_actions": [
"Compute the transfer needed to reach the configured safety floor from the signed trough; check the source account can fund it",
"Evaluate a dated, quantified discretionary reduction and rerun the forecast"
]
}
]
}
category_override. Do not project extra principal.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub lyndonkl/claude --plugin thinking-frameworks-skills270 skills in this plugin
/abstraction-concrete-examplesBuilds structured abstraction ladders that translate high-level principles into concrete, actionable examples across 3-5 levels. Bridges communication gaps, reveals hidden assumptions, and tests whether abstract ideas work in practice. Use when explaining concepts at different expertise levels, moving between abstract principles and concrete implementation, identifying edge cases by testing ideas against scenarios, designing layered documentation, decomposing complex problems into actionable steps, or bridging strategy-execution gaps./academic-letter-architectGuides the creation of evidence-based academic recommendation letters, reference letters, and award nominations that combine concrete examples, meaningful comparisons, and genuine enthusiasm. Use when writing recommendation letters for students, postdocs, or colleagues, or when user mentions recommendation letter, reference, nomination, letter of support, endorsement, or needs help with strong advocacy and comparative statements./adr-architectureDocuments significant architectural and technical decisions with full context, alternatives considered, trade-offs analyzed, and consequences understood. Creates a decision trail that helps teams understand why decisions were made. Use when choosing between technology options, making infrastructure decisions, establishing standards, migrating systems, or when user mentions ADR, architecture decision, technical decision record, or decision documentation./adverse-selection-priorProduces a Bayesian prior probability that an offered transaction is +EV for the recipient, given that the counterparty chose to propose it. Applies Akerlof market-for-lemons logic -- if they offered it, they believe it is +EV for them, so the prior that it is +EV for us is materially below 50%. Reusable across trade evaluation, waiver drops (another team dropping a player is also adverse selection), job-offer analysis, M&A, and any "someone offered me this" situation. Use when you receive an unsolicited trade/offer/proposal, analyzing incoming trade prior, evaluating why a counterparty proposed a deal, or when user mentions adverse selection, market for lemons, why did they offer this, incoming trade prior, they proposed it, Bayesian adjustment on received offer./advisory-editA strict advisory-only editing discipline for a writer who dictates ("speaks out") essays and wants help WITHOUT having their voice changed. The editor directs structure, flags grammar, and suggests strategic language — but never modifies the writer's text unless the writer explicitly says "apply" / "make that change" / "rewrite this." Produces a line-referenced, suggestion-only critique where every item is marked the writer's call. Four passes — structural, line (grammar/clarity), voice, pre-publish. Use when reviewing a draft, critiquing a spoken-out article, or doing a pre-publish check. The companion to learning-in-public-voice and the operating manual for the biostat-editor agent./alignment-values-north-starCreates actionable alignment frameworks that give teams a shared North Star (direction), values (guardrails), and decision tenets (behavioral standards). Enables autonomous decision-making while maintaining organizational coherence. Use when starting new teams, scaling organizations, defining culture, establishing product vision, resolving misalignment, creating strategic clarity, or when user mentions North Star, team values, mission, principles, guardrails, decision framework, or cultural alignment.Other plugins' skills for the same job