skills/cash-flow-forecaster/SKILL.md
Projects 30-90 days of daily cash flow per cash account by combining current balance, scheduled recurring inflows and outflows from recurring.json, and a 6-month rolling average of discretionary spend, then flags days where projected balance falls below a configurable safety floor. Use for forward planning, detecting upcoming overdrafts, sizing pre-funding for sinking funds, or when user mentions cash flow projection, runway, balance forecast, or upcoming bills coverage.
npx skillsauth add lyndonkl/claude cash-flow-forecasterInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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, safety_floor_cents}.recurring — recurring.json filtered to status: active.transactions — last 180 days of categorized transactions for each cash account.today — ISO date.horizon_days — default 60.category_overrides (optional) — explicit one-time outflows the user knows about (e.g., upcoming travel deposit).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: Compute confidence interval around projection
For each account, create ledger[account_id][day] = 0 for each day in [today, today + horizon_days]. Set ledger[account_id][today].opening = current_balance_cents.
For each active recurring entry, walk forward from next_expected_date adding by cadence until past the horizon. For each occurrence, push amount_cents_typical to ledger[recurring.account_id][occurrence_date].flows.
Handle weekends/holidays for paychecks: most direct deposits land on weekdays. If next_expected_date falls on a weekend, advance to the next weekday for inflows; outflows stay on the calendar date.
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
discretionary_daily_avg = discretionary_total_180d / 180 (this is negative — discretionary spend).
The simplest approach: subtract discretionary_daily_avg from every day in the horizon for that account.
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.
For each entry in category_overrides, add the explicit {date, account_id, amount_cents, reason} to that day's flows.
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.The discretionary spread carries variance. Compute the 30-day rolling stddev of discretionary spend and express the projection as a band: balance ± 1.5σ × √days_from_today. Surface lower_balance_cents and upper_balance_cents on the trough day so the user sees the range, not a false-precision point estimate.
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.
{
"horizon": { "start": "2026-04-25", "end": "2026-06-24", "days": 60 },
"accounts": [
{
"account_id": "acc_chk_001",
"starting_balance_cents": 1247500,
"ending_balance_cents": 932100,
"trough_balance_cents": 124300,
"trough_date": "2026-05-30",
"trough_band_cents": [82100, 166500],
"first_breach_date": null,
"breach_days": 0,
"safety_floor_cents": 100000
}
],
"daily": [
{ "date": "2026-04-25", "balances": { "acc_chk_001": 1247500 }, "flows": [] },
{ "date": "2026-05-01", "balances": { "acc_chk_001": 1093200 },
"flows": [
{ "account_id": "acc_chk_001", "amount_cents": -273500, "label": "Mortgage P&I", "type": "recurring" },
{ "account_id": "acc_chk_001", "amount_cents": -78000, "label": "Mortgage escrow", "type": "recurring" }
]
}
],
"alerts": [],
"methodology": "Daily discretionary derived from 180-day rolling average across 23 non-recurring categories; 1.5σ confidence band; weekend-adjusted paychecks; no seasonal multiplier in this horizon."
}
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": [
"Move $50,000 from savings before 2026-05-14",
"Defer discretionary spend by $20,000 across the next 3 weeks"
]
}
]
}
category_override. Do not project extra principal.development
--- name: zettel-note description: The note-writing discipline for this vault's evergreen knowledge graph, modeled on a Zettelkasten reading companion and governed by the vault conventions. Enforces declarative-claim titles, one claim per note (atomicity), own-words prose with no block quotes, the piped [[slug|Title]] link form, the labeled link-relationship vocabulary (Confirms/Contradicts/Extends/Context/Prerequisite/Builds-on/Applies/Example-of/Contrasts-with), 3-6 links per note, and search-
development
Plans between-round FIFA World Cup Fantasy transfers — budgets the round's free transfer(s), forces out players whose nation has been eliminated, chases fixture-swing drops, upgrades on value, and decides when a rebuild is large enough to fire the Wildcard instead of spending free transfers one at a time. Ranks candidate in/out pairs by EV gain over each player's remaining survival horizon (delta xEV weighted by progression_carry) MINUS transfer cost (a free transfer is cheap, a points hit is real, churning the squad for marginal swings is a critic flag), and tags forced/fixture/upgrade priority. Emits a `transfer-plan` signal. Use when called by wc-squad-architect (whose transfer work this skill is the engine for) and by the strategists in the populate stage when their candidate is transfer-adjacent rather than a full rebuild.
testing
Reads and updates the FIFA World Cup Fantasy tournament state machine (footballfantasy/context/tournament-state.md) — the temporal backbone tracking phase (pre-tournament → group MD1-3 → R32 → R16 → QF → SF → final), budget ($100m group / $105m knockouts), nation cap (3 group, loosening in knockouts), chips remaining, surviving nations, each owned player's elimination-risk horizon, and deadlines. Validates state on load (count/feasibility checks), applies phase transitions, and appends to the append-only state log (never silent overwrite). Use to load state at the start of a run and to commit state changes after the manager makes a move.
development
Validates and persists FIFA World Cup Fantasy signal files to signals/YYYY-MM-DD-<type>.md. Checks the required frontmatter (type, round, date, emitted_by, confidence, source_urls), range-checks declared numeric signals, confirms every factual claim carries a source URL or "manager-provided", rejects unknown signal types, and refuses to persist a signal that fails validation (logging the failure instead). Keeps the inter-agent signal layer auditable so downstream agents can trust what they read and never re-derive it. Use whenever an agent or skill writes a signal.