{
  "schema": "https://ai-atoms.com/schemas/skill-v1.json",
  "type": "skill",
  "id": "skill/close-month",
  "version": "1.0.0",
  "name": "close-month",
  "description": "Closes the month — reconciles QB vs payment processors, flags gaps, writes P&L narrative, exports close packet. Accepts optional month and save-to arguments.",
  "system_prompt_fragment": "Run the month-end close workflow. Reconcile, flag gaps, narrate the P&L, and export the close packet for the owner's records (and their accountant).\n\nParse arguments:\n- `--month` (default: previous calendar month) — `YYYY-MM` format\n- `--save-to` (default `files`) — `files` (Google Drive / OneDrive), `desktop` (local), or `both`\n\n## Step 1 — Reconcile\n\nTrigger the `month-end-prep` skill workflow:\n\n1. Pull all QuickBooks transactions for the target month.\n2. Pull settlements from each connected payment processor (PayPal, Stripe, Square) for the same month.\n3. Match QB entries to processor settlements by amount + date (±2 days).\n4. Surface three gap categories:\n   - **Unmatched processor settlements** — money came in via PayPal/Stripe/Square but never landed in QB\n   - **Unmatched QB deposits** — QB shows income with no processor record (cash? wire? misclassified?)\n   - **Variance lines** — matched but amount differs (fees, refunds split)\n\n## Step 2 — Flag suspicious entries\n\nSurface in the same report:\n- **Uncategorized transactions** — QB entries with no category\n- **Suspicious duplicates** — same amount, same vendor, within 3 days\n- **Missing receipts** — QB entries above $75 with no attachment\n\nFor each, recommend an action: categorize as X, delete duplicate, attach receipt from inbox.\n\nWait for owner to triage flagged items before generating the narrative. Do not auto-categorize or auto-delete.\n\n## Step 3 — P&L narrative\n\nAfter triage, generate a plain-English P&L narrative:\n\n```\n{Month YYYY} closed at ${revenue} revenue ({+/-}{X}% vs prior month).\nTop driver: {category/customer}. Biggest swing: {category} {direction} ${amount}\nbecause {reason inferred from transactions}.\n\nMargin: {X}% ({+/-}Y pts vs prior). {Cost-side commentary}.\n\nThree notable items:\n1. ...\n2. ...\n3. ...\n```\n\nNumbers come from QB; the *why* comes from cross-referencing top transactions, vendor names, and prior-month deltas.\n\n## Step 4 — Export the close packet\n\nGenerate two files:\n\n1. **`close-packet-{YYYY-MM}.xlsx`** — multi-tab workbook:\n   - `Reconciliation` — QB ↔ processor match table with gap rows highlighted\n   - `Flagged` — uncategorized / duplicates / missing receipts\n   - `P&L` — formatted income statement with prior-month delta column\n   - `Trial Balance` — accounts + ending balances\n2. **`close-packet-{YYYY-MM}.pdf`** — one-page summary: P&L narrative + top-line numbers + gap count\n\nSave both to the chosen `--save-to` location. Filename format: `close-packet-2026-04.xlsx` etc.\n\n## Connector failures\n\nIf QuickBooks is unreachable, stop — reconciliation requires QB as the source of truth. If a payment processor (PayPal, Stripe, Square) is unreachable, run reconciliation against the available processors and note \"PayPal not connected — PayPal settlements skipped from reconciliation\" (or whichever is missing). If all processors are missing, run QB-only analysis and flag it.\n\n## Approval gates\n\n- **Never auto-fix flagged items.** Always show the gap, recommend an action, wait for the owner.\n- **Never delete duplicates without explicit confirmation.** Show both records side-by-side.\n- **Saving the packet is auto** — it goes to the owner's own drive.\n\n## Output\n\nEnd the run with a one-paragraph recap: revenue, margin, gap count remaining (if any), file paths to the saved packet. If gaps were not all resolved, list them so the owner can revisit.",
  "applicable_domains": [
    "business",
    "operations"
  ],
  "invocation": [
    "/close-month"
  ],
  "tags": [
    "small-business",
    "anthropics",
    "knowledge-work"
  ],
  "authored_by": "anthropics",
  "source_url": "https://github.com/anthropics/knowledge-work-plugins/blob/main/small-business/skills/close-month/SKILL.md",
  "lifecycle": "stable",
  "category": "finance",
  "provenance": {
    "source": "anthropics/knowledge-work-plugins",
    "source_url": "https://github.com/anthropics/knowledge-work-plugins/blob/main/small-business/skills/close-month/SKILL.md",
    "author": "Anthropic",
    "license": "Apache-2.0",
    "notes": "Imported by scripts/import-anthropic-skills.py."
  }
}