SuperAPI AI Directory

cash-flow-snapshot

General & other

View repository

Updated 10-15 20:10

About this skill

Cash flow forecast

A cash gap doesn't fall on you like a bolt from the blue — it's visible weeks in advance if someone keeps a payment calendar in front of their eyes. Most often it's taxes and contributions that people forgot about that tear a hole in the cash box. This skill watches out for you: 30/60/90 days ahead, with named flags "this is where you'll come up short and here's why."

The result comes in two parts: a brief summary in chat and an XLSX workbook for download — with confidence corridors based on the percentage of deviation.

Quick start

"Will I have enough money for payroll next month?"

Claude pulls accounts receivable/payable and fixed expenses from the connected sources, calculates expected receipts and payments in 30, 60, and 90-day windows, applies confidence corridors based on the historical spread of payment timing for each client, and flags specific risks by name.


Workflow

Step 1 — Identify available data sources

Check which connectors are connected. Try in this order:

  1. ~~бухгалтерия (for example, 1C:Accounting or MoySklad) — the main source for accounts receivable (what we're owed), accounts payable (what we owe), and fixed expenses
  2. ~~платежи (for example, YuKassa, Tinkoff Kassa, SBP) — transaction history and crediting timelines
  3. Bank client (statement) — receipts and debits on the current account
  4. CSV upload — fallback if no connector is connected

If no connector is connected and no file is attached, ask the owner either to connect a source or to export a CSV (an income/expense table in any reasonable format). Note in the output which sources were used — this affects the width of the confidence corridor.

Rough mode (zero-prompt, when there's no data at all): if the owner is not ready to export a file — ask 4 numbers in plain words: "how much is currently in the account", "how much comes in on average per month", "how much goes out on average per month", "who owes how much and by roughly when". This is enough for a rough forecast with a wide range (±40–50%) and a note "estimate based on averages, without detail". A rough forecast today is better than an accurate one never.

Step 2 — Pull in the data

From ~~бухгалтерия (1C / MoySklad):

  • Accounts receivable broken down by aging: client, invoice amount, invoice date, payment due date, days overdue
  • Accounts payable: supplier, amount due, payment due date
  • Regular fixed expenses: rent, salaries, subscriptions (look for recurring transactions)

From ~~платежи (YuKassa / Tinkoff / bank statement):

  • History of credits: transaction date, amount, date the funds actually arrived in the account
  • From the crediting delay (transaction date → arrival date), calculate the average and the spread of the payment delay for each source

From the CSV export:

  • Parse as an income/expense table
  • Required columns (names are flexible): date, amount, type (income or expense), description
  • If the columns are ambiguous — show the header row and ask the owner to confirm the mapping

Tax obligations (a mandatory outflow — often forgotten):

  • Run the logic of the skill tax-calendar-proactive: based on the business profile (form, regime, turnover), determine the upcoming taxes and contributions in the 30/60/90 windows — USN advance payments (28.04/28.07/28.10), fixed individual entrepreneur contributions (28.12), additional 1% (01.07), personal income tax/contributions for employees (ENP, on the 28th).
  • Add each such payment as a scheduled payout on its date with the amount from the canon (RULES.md section 4). This is not a "fixed expense" — it is one-off large outflows that tear the cash flow apart precisely because they are forgotten.

Step 3 — Calculate historical payment terms

For each debtor client (or income source from the CSV), calculate:

  • Average payment delay — the average number of days from the invoice/transaction date to the receipt of money
  • Payment dispersion — the standard deviation of the delay over the last 6–12 payments
  • Use the dispersion for the width of the confidence corridor (see Step 4)

If a client has fewer than 3 payments — take the average across the entire database as the point estimate and apply the default corridor of ±30%. When there is enough data in the CSV (≥3 payments per source), calculate the corridor from the actual dispersion — do not substitute ±30% automatically.

Step 4 — Build a forecast for 30/60/90 days

Create three time windows: 0–30 days, 31–60 days, 61–90 days.

For each window, calculate:

Row Method
Expected receipts Receivables due within the window, adjusted for the average payment delay
Expected payments Payables due within the window + fixed expenses falling within the window
Net cash position Receipts − Payments
Confidence corridor ± weighted average payment dispersion as a % of expected receipts

Confidence corridor formula:

коридор_% = средневзв_стд_отклонение_дней / средняя_задержка_дней
низ  = чистый_поток × (1 − коридор_%)
верх = чистый_поток × (1 + коридор_%)

Round the corridor_% to one decimal place. Cap it at ±50% — a larger dispersion means there is too little data for the model; instead flag this (see Step 5).

Step 5 — Flag risks by name

Find the conditions under which the lower bound of the corridor goes negative or a cash gap arises. For each risk, give a one-line flag:

  • Overdue risk: “Client X historically pays 18 days late; this shifts their invoice of 84,000 ₽ out of the 30-day window to day 48.”
  • Payroll cash gap: “Payroll (220,000 ₽) falls on 04/15. Money in the account at the lower bound on 04/14: 192,000 ₽. Shortfall risk: 28,000 ₽.”
  • Tax cash gap: “07/28 — simplified tax system advance payment (≈150,000 ₽) and 07/01 — additional 1% contribution (77,000 ₽). Total 227,000 ₽ over two weeks. Funds at the lower bound as of 07/28: 180,000 ₽. Shortfall risk: 47,000 ₽. Advice: hold the payment to supplier X or speed up payment from client Y.”
  • Data insufficiency warning: “For client Y there are only 2 payments in the history — the corridor is set by default at ±30%.”
  • Missing connector warning: “We count only from CSV data — there is no real-time data on payables and recurring expenses. Confidence corridors are wider than usual.”

Limit to the top 5 risks by severity (largest by amount in rubles first).

Step 6 — Output the result

Summary to chat (always):

Прогноз денежного потока — [диапазон дат]
Источник(и): [использованные коннекторы]

              Ожидаемо    Низ       Верх
30 дней нетто: X XXX ₽    X XXX ₽   X XXX ₽
60 дней нетто: X XXX ₽    X XXX ₽   X XXX ₽
90 дней нетто: X XXX ₽    X XXX ₽   X XXX ₽

⚠ Помечено рисков: [количество]
  • [риск 1]
  • [риск 2]
  ...

XLSX workbook (always): Before generating, read xlsx/SKILL.md. Make the workbook with three sheets:

  1. Summary — a 30/60/90 forecast table with confidence corridors. Under each window’s row, expand subrows with the individual transactions that make up inflows (green) and outflows (red). This way the estimate can be checked without leaving the “Summary” sheet.

  2. Details — all transactions grouped by window, sorted by date within the group. Include a running total column (cumulative inflows minus outflows within the window) and a total row at the bottom of each window with the sum of inflows, outflows, and net. Move past transactions in gray to a separate section at the bottom for reference. Make sure all three windows have rows, even if one is empty — show a placeholder row “No transactions in this window.”

  3. Risks — flagged risks with the amount in rubles and the affected window.

Save as cash-flow-snapshot-[ГГГГ-ММ-ДД].xlsx.


Approval gates

There are no irreversible actions — the skill works read-only. No confirmation is required before building the forecast.

Remind the owner after output:

«This forecast is built on the basis of [listed sources]. Prepared for review by your accountant. It is not tax or financial advice — check with your accountant before making decisions about raising financing.»


Reference files

File When to upload
reference/gotchas.md When the connector returned unexpected data or the spread is extreme
reference/examples/worked-example.md When you need a sample output format for a new type of data