From kasas — financial planning & review
When the user asks "how's my cash flow", "income vs spending", "am I saving", or "what's my monthly burn" — analyze income vs expenses and net cash-flow over a period with month-by-month charts and a savings rate.
How this skill is triggered — by the user, by Claude, or both
Slash command
/kasas:cash-flow [period, e.g. 'last 6 months' or '2024'][period, e.g. 'last 6 months' or '2024']This skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Income vs. expense and net cash-flow over a period. Use this for "how's my cash flow", "income vs spending", "am I saving each month", or "what's my monthly burn". Read-only: this skill never writes to the ledger.
Income vs. expense and net cash-flow over a period. Use this for "how's my cash flow", "income vs spending", "am I saving each month", or "what's my monthly burn". Read-only: this skill never writes to the ledger.
Default to the last 6 full months if the user gives no period. Map the request to a date: filter for the search query language (today is the reference point):
date:>=<6 months ago, 1st of month>date:2024 • "this year" → date:<current year> • "Q1 2024" → date:2024-01..2024-03date:YYYY-MM-DD..YYYY-MM-DDCall list_accounts. Cash-flow math is only valid within ONE currency. If accounts span multiple currencies, you MUST run steps 3-5 once per currency (filter the txns by the account_ids of that currency) and present each currency in its own section. Never sum or convert across currencies; state that FX is not converted.
Call search_transactions with q = your date filter. To drop internal transfers between the user's own accounts so they don't inflate both income and expenses, append a label/relationship filter IF the user marks them — e.g. date:2024 -label:transfer or date:2024 -rel:transfer_of. Tell the user which exclusion you applied (or that none was applied, so transfers may appear on both sides). Page with limit/offset until you have all rows (total is in the response). Outflows are NEGATIVE, inflows POSITIVE.
Save the returned transaction array to a temp file, then build the charts. Reference scripts with the literal ${CLAUDE_PLUGIN_ROOT}/scripts/ prefix.
Income vs. Expenses by month (two auto-colored series, green/red):
# /tmp/kasas_cashflow.json holds the JSON array of transactions
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/kasas_aggregate.py /tmp/kasas_cashflow.json \
--group-by month --split-sign --currency USD --exclude-pending \
--as-chart stacked-bar --title "Cash Flow" --subtitle "Income vs Expenses by month" \
| python3 ${CLAUDE_PLUGIN_ROOT}/scripts/kasas_chart.py - -o /tmp/kasas_cashflow.html
Net cash-flow line (signed sum per month — blue):
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/kasas_aggregate.py /tmp/kasas_cashflow.json \
--group-by month --metric net --currency USD --exclude-pending \
--as-chart line --title "Net Cash Flow" --subtitle "Net per month" \
| python3 ${CLAUDE_PLUGIN_ROOT}/scripts/kasas_chart.py - -o /tmp/kasas_net.html
Get the totals (income, expense, net, count) decimal-safely from the JSON form (no --as-chart):
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/kasas_aggregate.py /tmp/kasas_cashflow.json \
--group-by month --split-sign --currency USD --exclude-pending -o /tmp/kasas_cf_data.json
Read /tmp/kasas_cf_data.json: each group carries income, expense, net; total carries the period sums. Compute the savings rate exactly: savings_rate = total.net / total.income (guard against income == 0). Then tell the user the .html paths and offer to open them — on macOS open /tmp/kasas_cashflow.html /tmp/kasas_net.html. Use bar instead of stacked-bar if the user prefers side-by-side bars.
Aggregate the numbers yourself, treating each amount as an exact decimal to 2 dp (do NOT use floats): for each calendar month bucket, sum positive amounts → income, sum the magnitudes of negative amounts → expenses, and net = income - expenses. Optionally exclude pending:true rows. Then render an interactive HTML/React Artifact with grouped or stacked bars (Income green, Expenses red) plus a Net line, matching the same numbers. Compute savings_rate = net / income for the period.
In BOTH environments, always show the underlying numbers as a compact markdown table — never the chart alone:
| Month | Income | Expenses | Net |
|---|---|---|---|
| 2024-01 | 5,200.00 | 4,180.30 | +1,019.70 |
| … | … | … | … |
| Total | … | … | … |
Then state: total income, total expenses, total net, and the savings rate (net / income as a %). Follow with 2-3 plain observations, e.g. months that ran negative (expenses > income), the expense trend (rising/falling), or an unusually high/low month. Keep currency symbols/labels per account currency; if you ran multiple currencies, repeat the table + charts + observations per currency and remind the user the sections are not comparable (FX not converted).
kasas-setup / trigger_sync to pull data.--exclude-pending in Code; skip pending:true on Desktop) for a settled view; mention you did, and that including them would shift recent months.transfer) or link them so the -label:transfer / -rel:transfer_of exclusion in step 3 can drop them.spending-breakdown; for account totals over time see net-worth; for ad-hoc charts see kasas-charts.Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
npx claudepluginhub paulmeier/kasas-skill --plugin kasas