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.testing
Cluster a conference's event records into a small set of coarse themes with finer sub-clusters, an explicit outlier bucket, and soft (multi-membership) affinities — using the hybrid embed-then-label pipeline (embed abstracts, reduce, density-cluster, then LLM-label the clusters) when embedding libraries are available, and an LLM-reasoned hierarchical fallback when they are not. Embeddings do the grouping; the LLM only names the groups. Conference-agnostic. Use when turning structured event records into a navigable theme map for preference elicitation and scheduling, when you need 6-8 reasonable themes rather than 20 muddy ones, or when overlapping talks must belong to more than one theme. Trigger keywords - theme clustering, cluster talks, embed then label, soft membership, outlier talks, conference themes, topic map.
development
Build a personal conference schedule as a constraint-optimization problem — hard constraints (no time overlap, room-to-room travel time, capacity/registration, the attendee's own must-attends and blackouts) plus a user-owned weighted objective trading interest against breadth, pacing (maximize contiguous free time), and serendipity. Surfaces unbreakable conflicts (two high-value overlapping talks the model cannot rank) as decisions for the human rather than silently picking, and reports what each choice traded away. Conference-agnostic. Use to turn a preference profile plus a theme map into a day-by-day plan, to resolve overlapping sessions, or to balance a packed vs paced schedule. Trigger keywords - schedule optimization, conference schedule, constraint optimization, overlapping talks, contiguous free time, conflict surfacing, packed vs paced.
development
Parse a heterogeneous conference program (markdown, HTML, PDF-derived text, or JSON) into normalized event records with per-field confidence scores and independent classification axes (topic, depth, format, prerequisites, recorded, capacity). Detects the program's format before extracting, treats every inferred field as uncertain (present vs inferred vs missing), and flags thin or missing abstracts so downstream enrichment can target them. Conference-agnostic. Use when ingesting a conference or event schedule into a structured store, normalizing a talk/session list, or extracting per-session metadata with calibrated confidence. Trigger keywords - program ingestion, parse schedule, session extraction, event records, conference program, talk metadata, per-field confidence.
development
Build a personalized preference profile from a small number of well-chosen, cluster-grounded questions instead of a long survey. Represents the person's interests as an uncertainty region over the theme map, picks the single highest-information-gain choice-based question (contrasting real talks from different clusters), balances exploiting known interests against exploring uncertain ones, deliberately injects outlier probes to fight selection bias, and stops as soon as the schedule would be stable. Also elicits the user-owned objective weights and hard constraints. Interactive — runs where it can actually ask the person. Conference-agnostic. Use to turn a theme map into a preference profile, to decide what to ask a conference attendee, or to elicit scheduling priorities. Trigger keywords - preference elicitation, ask few questions, information gain, choice-based questions, selection bias probe, objective weights, attendee preferences.