cash-flow-snapshot
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCash Flow Snapshot
现金流快照
Produces a 30/60/90-day cash flow forecast with percentage-variance confidence
bands and named risk flags. Delivers a two-part output: a concise chat summary
and a downloadable XLSX workbook.
Quick start
"Will I make payroll next month?"
Claude pulls AR/AP and fixed costs from connected sources, calculates expected
inflows and outflows across 30, 60, and 90-day windows, applies confidence
bands based on each customer's historical payment variance, and flags specific
risks by name.
生成带有百分比方差置信区间和命名风险标记的30/60/90天现金流预测。提供两部分输出内容:简洁的聊天摘要和可下载的XLSX工作簿。
快速入门
“下个月我能发工资吗?”
Claude从已连接的数据源提取AR/AP和固定成本数据,计算30、60、90天周期内的预期流入和流出资金,基于每位客户的历史付款方差应用置信区间,并按名称标记特定风险。
Workflow
工作流程
Step 1 — Identify available data sources
步骤1 — 识别可用数据源
Check which connectors are live. Try in this order:
- QuickBooks — primary source for AR aging, AP, and fixed costs
- PayPal — transaction history and settlement timing
- Stripe — charge and payout history
- Square — sales and payout history
- CSV upload — fallback if no connector is connected
If no connector is live and no file is attached, ask the user to either connect
a source or upload a CSV (income/expense tabular data, any reasonable format).
Note which sources were used in the output — this affects confidence band width.
检查哪些连接器处于可用状态,按以下顺序尝试:
- QuickBooks — 获取AR账龄、AP及固定成本的主要数据源
- PayPal — 交易历史和结算时间数据
- Stripe — 收费和付款历史数据
- Square — 销售和付款历史数据
- CSV上传 — 若没有连接器可用则作为备选方案
若没有可用的连接器且未附加文件,请用户连接数据源或上传CSV文件(收入/支出表格数据,支持任何合理格式)。在输出中注明使用的数据源——这会影响置信区间的宽度。
Step 2 — Pull the data
步骤2 — 提取数据
From QuickBooks:
- AR aging report: customer name, invoice amount, invoice date, due date, days outstanding
- AP: vendor name, amount due, due date
- Recurring fixed costs: rent, payroll, subscriptions (look for recurring transactions)
From PayPal / Stripe / Square:
- Settlement history: transaction date, amount, settlement date
- Use settlement lag (transaction date → payout date) to compute each source's average and variance payment delay
From CSV upload:
- Parse as income/expense tabular data
- Required columns (flexible naming): date, amount, type (income or expense), description
- If columns are ambiguous, show the header row and ask the user to confirm mapping
从QuickBooks提取:
- AR账龄报告:客户名称、发票金额、发票日期、到期日、逾期天数
- AP数据:供应商名称、应付金额、到期日
- recurring固定成本:租金、工资、订阅费用(查找重复交易记录)
从PayPal / Stripe / Square提取:
- 结算历史:交易日期、金额、结算日期
- 使用结算延迟(交易日期→付款日期)计算每个数据源的平均付款延迟时间及方差
从CSV上传提取:
- 解析为收入/支出表格数据
- 必填列(命名灵活):日期、金额、类型(收入或支出)、描述
- 若列含义不明确,显示表头行并请用户确认映射关系
Step 3 — Compute historical payment timing
步骤3 — 计算历史付款时间
For each AR customer (or income source from CSV), calculate:
- Mean payment lag — average days from invoice/transaction date to receipt
- Payment variance — standard deviation of payment lag across last 6–12 payments
- Use variance to set confidence band width (see Step 4)
If fewer than 3 payments exist for a customer, use the population mean as the
point estimate and apply a ±30% variance band as the default. When running on
CSV data with sufficient history (≥3 payments per source), compute the band
from the actual payment variance — do not assume ±30%.
针对每位AR客户(或CSV中的收入来源),计算:
- 平均付款延迟 — 从发票/交易日期到收款的平均天数
- 付款方差 — 过去6-12次付款的付款延迟标准差
- 使用方差设置置信区间宽度(见步骤4)
若某客户的付款记录少于3条,则使用总体均值作为点估计值,并默认应用±30%的方差区间。当CSV数据有足够历史记录(每个来源≥3次付款)时,根据实际付款方差计算区间——不默认使用±30%。
Step 4 — Build the 30/60/90-day forecast
步骤4 — 构建30/60/90天预测
Produce three time windows: 0–30 days, 31–60 days, 61–90 days.
For each window, compute:
| Line | Method |
|---|---|
| Expected inflows | AR due in window, adjusted for mean payment lag |
| Expected outflows | AP due in window + fixed costs falling in window |
| Net cash position | Inflows − Outflows |
| Confidence band | ± weighted average payment variance as a % of expected inflows |
Confidence band formula:
band_pct = weighted_avg_stddev_days / avg_payment_lag_days
low = net_cash × (1 − band_pct)
high = net_cash × (1 + band_pct)Round band_pct to one decimal place. Cap at ±50% — higher variance means the
data is too thin to model; flag it instead (see Step 5).
生成三个时间周期:0-30天、31-60天、61-90天。
针对每个周期,计算:
| 项目 | 计算方法 |
|---|---|
| 预期流入 | 周期内到期的AR金额,根据平均付款延迟调整 |
| 预期流出 | 周期内到期的AP金额 + 周期内产生的固定成本 |
| 净现金头寸 | 流入金额 − 流出金额 |
| 置信区间 | ± 加权平均付款方差占预期流入的百分比 |
置信区间公式:
band_pct = weighted_avg_stddev_days / avg_payment_lag_days
low = net_cash × (1 − band_pct)
high = net_cash × (1 + band_pct)将band_pct四舍五入至一位小数。上限为±50%——更高的方差意味着数据量不足无法建模,需标记为风险(见步骤5)。
Step 5 — Flag named risks
步骤5 — 标记命名风险
Scan for conditions that push the low-band estimate negative or create a
liquidity crunch. For each risk found, produce a one-line flag:
- Late-payer risk: "Customer X historically pays 18 days late; that shifts their $8,400 invoice out of the 30-day window into day 48."
- Payroll crunch: "Payroll ($22,000) hits April 15. Low-band cash on hand April 14: $19,200. Shortfall risk: $2,800."
- Thin data warning: "Only 2 payments on record for Customer Y — confidence band set to default ±30%."
- No-connector warning: "Running on CSV data only — no real-time AP or recurring cost data. Confidence bands are wider than normal."
Limit to the top 5 risks by severity (largest dollar impact first).
扫描导致区间下限估计为负值或出现流动性短缺的情况。针对发现的每个风险,生成一行标记:
- 延迟付款风险:“客户X历史付款平均延迟18天;这将使其8400美元的发票从30天周期推迟至第48天。”
- 工资发放短缺风险:“工资(22000美元)将于4月15日发放。4月14日的区间下限现金余额为19200美元。短缺风险:2800美元。”
- 数据量不足警告:“客户Y仅有2条付款记录——置信区间设置为默认±30%。”
- 无连接器警告:“仅基于CSV数据运行——无实时AP或重复成本数据。置信区间比正常情况更宽。”
按影响严重程度(美元金额从大到小)限制最多显示5个风险。
Step 6 — Deliver outputs
步骤6 — 交付输出
Chat summary (always):
Cash Flow Snapshot — [date range]
Source(s): [connectors used]
Expected Low High
30-day net: $X,XXX $X,XXX $X,XXX
60-day net: $X,XXX $X,XXX $X,XXX
90-day net: $X,XXX $X,XXX $X,XXX
⚠ Risks flagged: [count]
• [risk 1]
• [risk 2]
...XLSX workbook (always):
Read before generating. Produce a workbook with three sheets:
xlsx/SKILL.md-
Summary — the 30/60/90 forecast table with confidence bands. Beneath each window row, expand inline sub-rows showing the individual transactions that make up its inflows (green) and outflows (red). This makes the estimates auditable without leaving the Summary sheet.
-
Detail — all transactions grouped by window, sorted by date within each group. Include a running net column (cumulative inflows minus outflows within the window) and a subtotal row at the bottom of each window showing total inflows, total outflows, and net. Grey out past transactions in a separate section at the bottom for reference. Ensure all three windows have rows even if one is empty — show a "No transactions in this window" placeholder row.
-
Risks — the flagged risks with dollar impact and affected window.
Save as .
cash-flow-snapshot-[YYYY-MM-DD].xlsx聊天摘要(必选):
现金流快照 — [日期范围]
数据源:[使用的连接器]
预期值 区间下限 区间上限
30天净现金:$X,XXX $X,XXX $X,XXX
60天净现金:$X,XXX $X,XXX $X,XXX
90天净现金:$X,XXX $X,XXX $X,XXX
⚠ 标记的风险数量:[数量]
• [风险1]
• [风险2]
...XLSX工作簿(必选):
生成前请阅读。生成包含三个工作表的工作簿:
xlsx/SKILL.md-
摘要 — 带有置信区间的30/60/90天预测表格。在每个周期行下方展开内嵌子行,显示构成该周期流入(绿色)和流出(红色)的具体交易记录。无需离开摘要工作表即可核查估算依据。
-
明细 — 所有交易按周期分组,每个周期内按日期排序。包含累计净现金列(周期内累计流入减去流出),每个周期底部显示小计行,包含总流入、总流出和净现金。在底部单独区域灰化显示过往交易记录供参考。即使某周期为空,也要确保三个周期都有行——显示“此周期无交易记录”占位行。
-
风险 — 标记的风险及其美元影响和受影响的周期。
保存为。
cash-flow-snapshot-[YYYY-MM-DD].xlsxApproval gates
审批环节
No destructive actions — this skill is read-only. No approval gate required
before generating the forecast.
Remind the user after delivery:
"This forecast is based on [sources listed]. It is not a substitute for accounting advice — verify with your bookkeeper before making financing decisions."
无破坏性操作——此技能为只读模式。生成预测前无需审批环节。
交付后提醒用户:
“本预测基于[列出的数据源]。不能替代会计建议——做出融资决策前请与簿记员核实。”
Reference files
参考文件
| File | Load when |
|---|---|
| When a connector returns unexpected data or variance is extreme |
| When modeling the output format for a new data shape |
| 文件 | 加载时机 |
|---|---|
| 当连接器返回意外数据或方差异常时 |
| 针对新数据形状建模输出格式时 |