Skill 寫法圖鑑

close-month

Anthropic | 商業與營運 | 原文 | Apache-2.0

月底結帳、用結清的帳更新現金預測,再發布結帳資料包

中文翻譯

---
name: close-month
description: 用三個環節的鏈條結帳,並把帳變成決策:month-end-prep 把總帳跟每個連上的支付處理商對帳並寫出 P&L 敘述,cash-flow-snapshot 再用剛結清的數字(不是原始數字)更新 30/60/90 天預測,最後 report-builder 發布並寄送結帳資料包。需要總帳(MYOB、NetSuite、QuickBooks、Xero 或 Zoho Books);有連上 Gusto、PayPal、Ramp、Shopify、Square、Stripe 就會用,沒有就改用對帳單或 CSV 上傳。觸發詞包括「close the month」「month-end」「close the books」「reconcile」「send the close packet to my accountant」,或老闆問上個月營收或毛利為什麼變動。如果老闆只要對帳和標記項目,不需要更新預測也不需要寄送資料包,就直接導向 month-end-prep。
allowed-tools: Read, WebFetch
---

跑月底結帳這條鏈。先結帳,再用結清的帳做預測,最後發布。順序本身就是價值所在。

解析參數:
- `--month`(預設:上一個日曆月):`YYYY-MM`
- `--save-to`(預設 `files`):`files`(Drive / OneDrive)、`desktop` 或 `both`

**一定要有總帳**:MYOB、NetSuite、QuickBooks、Xero 或 Zoho Books,連了哪個用哪個,它們是平等的(`../../shared/connector-neutrality.md`)。如果一個都連不上,就停下來並說明。沒有總帳的對帳不叫結帳。提議走 `month-end-prep` 的 CSV 路徑,不要產出一份不完整的資料包。如果連了兩個總帳,問哪一個才是要結的帳,並在資料包裡寫出名字。

## Step 1:結帳與對帳(month-end-prep)

針對目標月份,把 `month-end-prep` 從頭跑到尾。

- **輸入:** 目標月份。
- **輸出:** 對帳表、標記項目(未分類、可疑的重複、缺收據)、P&L 敘述,以及結帳資料包 XLSX 加一頁 PDF。
- **關卡:** `month-end-prep` 自己的 Step 6 簽核照常有效。老闆要先處理每一個標記項目(或明確跳過),下游的東西才會跑。

**這一步掌管所有數字。** 鏈裡後面的步驟不准重新分類任何一筆交易,也不准重述營收。

### Step 2 之前的硬關卡

老闆還沒簽核結帳之前,不要開始做預測。直白地說明在等什麼:

> 「4 月的帳結清了,USD 3,200 的差異已經解決,還有兩張收據沒補。要用這些結清的數字來更新現金預測嗎?」

如果還有未處理的標記項目,列出來並問是否仍要預測。用 11 筆未分類交易做出來的預測,就是用猜的做出來的預測,老闆有權知道自己拿到的是哪一種。

## Step 2:用結清的帳做預測(cash-flow-snapshot)

跑 `cash-flow-snapshot`,以對完帳的那個月當歷史基礎。

- **輸入:** Step 1 結清月份的數字:實際的應收帳款回收時間、依入帳科目計的實際固定成本、實際的結算延遲。
- **輸出:** 附信心區間和具名風險的 30/60/90 天預測。
- **關卡:** 無。預測是唯讀的。

**在輸出裡說明為什麼這個順序重要。** 用原始帳做的預測,會繼承每一筆入錯科目的支出和每一筆沒對上的結算。在結帳之後才跑,付款時間的歷史才是真的,固定成本的底線也才正確。一句話就夠:

> 「這份預測是以 4 月結清的帳為基礎,所以回收時間和成本底線反映的是對完帳的數字,不是原始的 register。」

如果結帳時發現了會影響預測的事,例如移除了一筆重複的廠商扣款、終於對上了一筆結算,就要指出跟上個月預測的差異。

## Step 3:發布與寄送(report-builder)

跑 `report-builder` 來打包並交付這次結帳。

- **輸入:** Step 1 的 P&L 敘述和資料包,以及 Step 2 的預測。
- **輸出:** 合併後的結帳資料包,先給聊天摘要,再給 workbook。把定義存起來,這樣下個月結帳時不用再重新描述,就能發布同樣的資料包。
- **關卡:** 存到老闆自己的雲端硬碟是自動的。**寄給會計師或其他人則不是**:先草擬訊息、給老闆看,然後等。

要合併,不要訂在一起。資料包的內容依序是:這個月發生了什麼、帳上怎麼說、根據這些帳接下來 90 天長什麼樣,以及還有什麼沒處理完。

範例,Okonkwo Mechanical:「4 月結帳為 USD 84,200,比 3 月成長 6%。毛利維持在 38%。還有兩張收據未補。30 天預測的中位數為淨 USD 11,400,Rosewood 的 USD 12,400 是最大的變數。」

## 不要做的事

- **結帳還沒簽核之前不要做預測。** 順序就是這件事要做成一條鏈的全部理由。
- **不要自動修正標記項目。** 把差異攤出來、建議該怎麼做,然後等。
- **沒有明確確認,不要刪掉疑似重複的項目。** 把兩筆紀錄並排給對方看。
- **不要在下游重述數字。** Step 1 掌管帳,後面的步驟只引用。
- **沒有核准,不要把資料包寄給會計師。**
- **沒有總帳就不要繼續。** 依類別說明缺什麼,並提議走 CSV 路徑。

## 輸出

結尾用一段話做回顧:營收和毛利、還沒處理的缺口、30 天預測的中位數和最大風險,以及檔案路徑。如果有任何東西是被跳過而不是被解決,要列出來,讓老闆之後可以回頭處理。

另外用 house artifact 風格(`../../shared/artifact-style.md`)把合併後的結帳結果渲染成一個 HTML artifact,這是附加在聊天回顧和資料包檔案之外的,絕不取代它們。營收、毛利率和 30 天預測中位數做成數字卡,比較資訊放在說明行;對帳和標記項目做成表格,金額用等寬數字(tabular-nums),每列帶一個狀態標籤(good 已對帳、warn 已跳過、critical 未解決);30/60/90 預測獨立一個面板;未結項目的檢查清單放在頁面最後。

## 執行之後

一句話:這個月結清了、預測更新了、資料包發布了。然後提出最相關的一個下一步,附近的其他選項最多再提兩個:

- 如果預測標出了薪資風險:「can I make payroll」會跑 `/plan-payroll`。
- 「Who owes me money?」會對剛剛結帳確認的應收帳款跑 `invoice-chase`。
- 「The weekly pack, on schedule」會跑 `/report-pack`,讓這些數字定期出現。

最多三個提議。這次對話裡老闆已經拒絕過的,不要再提。

## 使用沒列出來的工具

這個 skill 裡提到的 connector 是測試過的路徑,不是硬性限制。如果老闆想讓這個流程用一個沒連上或沒列出來的工具,就提議 `build-connector`:它會先查 connector 目錄,沒有的話再透過 Zapier 連接,絕不直接對原始 API 手刻。連線建好之後,這個工具就跟其他選用的 connector 一樣加入這個 skill,並遵守同樣的核准關卡。

英文原文

---
name: close-month
description: Closes the books and turns them into a decision as a three-link chain — month-end-prep reconciles the ledger against every connected payment processor and writes the P&L narrative, cash-flow-snapshot then refreshes the 30/60/90-day forecast off the newly closed numbers rather than raw ones, and report-builder publishes and distributes the close packet. Requires a ledger (MYOB, NetSuite, QuickBooks, Xero, or Zoho Books) and uses Gusto, PayPal, Ramp, Shopify, Square, and Stripe when connected, falling back to statement or CSV uploads. Trigger on "close the month," "month-end," "close the books," "reconcile," "send the close packet to my accountant," or when the owner asks why revenue or margin moved last month. An owner who wants only the reconciliation and its flags, with no forecast refresh and no packet distribution, routes to month-end-prep directly.
allowed-tools: Read, WebFetch
---

Run the month-end chain. Close, then forecast off the closed books, then publish. The ordering is the product.

Parse arguments:
- `--month` (default: previous calendar month) — `YYYY-MM`
- `--save-to` (default `files`) — `files` (Drive / OneDrive), `desktop`, or `both`

**A ledger is required** — MYOB, NetSuite, QuickBooks, Xero, or Zoho Books, whichever is connected; they are peers (`../../shared/connector-neutrality.md`). If none is reachable, stop and say so. Reconciliation without a ledger is not a close. Offer the CSV path from `month-end-prep` rather than producing a partial packet. If two ledgers are connected, ask which holds the books being closed and name it in the packet.

## Step 1 — Close and reconcile (month-end-prep)

Run `month-end-prep` for the target month, start to finish.

- **In:** the target month.
- **Out:** the reconciliation table, the flagged items (uncategorized, suspicious duplicates, missing receipts), the P&L narrative, and the close packet XLSX plus one-page PDF.
- **Gate:** `month-end-prep`'s own Step 6 sign-off holds. The owner triages every flagged item — or explicitly skips it — before anything downstream runs.

**This step owns the numbers.** Nothing later in the chain recategorizes a transaction or restates revenue.

### The hard gate before Step 2

Do not start the forecast until the owner has signed off on the close. Say plainly what is waiting:

> "Books are closed for April — USD 3,200 in variances resolved, two receipts still missing. Ready to refresh your cash forecast off these closed numbers?"

If flagged items are still open, name them and ask whether to forecast anyway. A forecast built on eleven uncategorized transactions is a forecast built on a guess, and the owner deserves to know which they are getting.

## Step 2 — Forecast off the closed books (cash-flow-snapshot)

Run `cash-flow-snapshot` using the reconciled month as its historical base.

- **In:** the closed-month figures from Step 1 — actual AR collection timing, actual fixed costs as coded, actual settlement lag.
- **Out:** the 30/60/90-day forecast with confidence bands and named risks.
- **Gate:** none. The forecast is read-only.

**Say why this ordering matters, in the output.** A forecast run on raw books inherits every miscoded expense and every unmatched settlement. Running it after the close means the payment-timing history is real and the fixed-cost floor is right. One line is enough:

> "This forecast is built on April's closed books, so the collection timing and cost floor reflect reconciled numbers — not the raw register."

If the close surfaced something that moves the forecast — a duplicate vendor charge removed, a settlement finally matched — call out the delta against last month's forecast.

## Step 3 — Publish and distribute (report-builder)

Run `report-builder` to package and deliver the close.

- **In:** the P&L narrative and packet from Step 1, the forecast from Step 2.
- **Out:** the merged close packet — chat summary first, then the workbook. Save the definition so next month's close publishes the same pack without being described again.
- **Gate:** saving to the owner's own drive is automatic. **Sending to an accountant or anyone else is not** — draft the message, show it, and wait.

Merge, do not staple. The packet reads: what the month was, what the books say, what the next 90 days look like off those books, and what is still open.

Example, Okonkwo Mechanical: "April closed at USD 84,200, up 6% on March. Margin held at 38%. Two receipts outstanding. The 30-day forecast is USD 11,400 net at the midpoint — Rosewood's USD 12,400 is the swing."

## What not to do

- **Do not forecast before the close is signed off.** The ordering is the entire reason this is a chain.
- **Do not auto-fix a flagged item.** Show the gap, recommend the action, wait.
- **Do not delete a suspected duplicate without explicit confirmation.** Show both records side by side.
- **Do not restate a number downstream.** Step 1 owns the books; later steps cite them.
- **Do not send the packet to an accountant without approval.**
- **Do not proceed without a ledger.** Say what is missing, by category, and offer the CSV path.

## Output

End with a one-paragraph recap: revenue and margin, gaps still open, the 30-day forecast midpoint and its top risk, and the file paths. If anything was skipped rather than resolved, list it so the owner can come back to it.

Also render the merged close as one HTML artifact using the house artifact style (`../../shared/artifact-style.md`) — additive to the chat recap and the packet files, never instead of them. Revenue, margin percent, and the 30-day forecast midpoint are stat tiles with their comparison as context lines; the reconciliation and flagged items are a table with tabular-nums amounts and a status pill per row (good reconciled, warn skipped, critical unresolved); the 30/60/90 forecast gets its own panel; the open-items checklist closes the page.

## After the run

One line: the month is closed, forecast refreshed, packet published. Then the single most relevant next step, with at most two others nearby:

- If the forecast flagged a payroll risk: "can I make payroll" runs `/plan-payroll`.
- "Who owes me money?" runs `invoice-chase` on the AR the close just confirmed.
- "The weekly pack, on schedule" runs `/report-pack` so these numbers recur.

Max three offers. Never repeat an offer the owner declined this session.

## Using a tool that isn't listed

The connectors named in this skill are the tested paths, not a wall. If the owner wants this flow to use a tool that isn't connected or listed, offer `build-connector` — it checks the connector directory first and connects through Zapier otherwise, never hand-building against a raw API. Once the connection exists, the tool joins this skill like any other optional connector, under the same approval gates.