Orchestrates and validates the full month-end close for a QBO client.
Reads clients/{slug}/sop.md to determine which checks apply,
runs automated close checks against QBO, scores each item,
proposes journal entries for missing items, tracks progress with CDC,
and outputs a controller-ready Excel workbook.
Use this skill when:
Do NOT use for:
pl-quick-compare or pl-deep-analysisbank-reconciliationbudget-vs-actualtext
scripts/pipelines/month-end-close.py
bash
# Standard close run
python3 scripts/pipelines/month-end-close.py --slug sb-paulson --month 2026-03
# Skip GL drill (faster; prepaid/depr/payroll checks have limited data)
python3 scripts/pipelines/month-end-close.py --slug willo-salons --month 2026-02 --skip-gl
# Re-run as items get resolved (CDC tracks progress between runs)
python3 scripts/pipelines/month-end-close.py --slug glowlabs --month 2026-03
# Force fresh QBO pulls (ignore CDC cache)
python3 scripts/pipelines/month-end-close.py --slug sb-paulson --month 2026-03 --rerun
# Custom output directory
python3 scripts/pipelines/month-end-close.py --slug sb-paulson --month 2026-03 --out ~/Desktop/close
# QBO Sandbox
python3 scripts/pipelines/month-end-close.py --slug sb-paulson --month 2026-03 --sandbox
ArgumentRequiredDescription--slug✅Company slug (must match qbo-client connection)--month✅Close period in YYYY-MM format (e.g. 2026-03)--skip-gl❌Skip GL pull — faster but prepaid/depr/payroll checks limited--rerun❌Force all checks fresh — ignores CDC state for check selection--out❌Output directory (default: ~/Desktop)--sandbox❌Use QBO sandbox environment
CheckIDDefaultSOP OverrideBank Reconciliationbank_recon✅Disable: bank reconciliation: ❌Trial Balance (D=C)trial_balance✅Always enabledAP Agingap_aging✅Disable: ap aging: ❌AR Agingar_aging✅Auto-disabled if SOP says no AR/POSPrepaid Amortizationprepaid_amortization✅Disable: prepaid: ❌Depreciationdepreciation✅Disable: no fixed assetsPayroll Reconciliationpayroll_recon✅Disable: payroll: ❌Revenue Recognitionrevenue_recognition✅Disable: deferred revenue: ❌Accrued Expensesaccrued_expenses✅Disable: accruals: ❌Intercompany Eliminationsintercompany❌ OFFEnable: multi-entity or intercompany: ✅
The pipeline reads clients/{slug}/sop.md and parses it for:
no accounts receivable, POS collection,
AR aging: ❌, or AR: Not applicablemulti-entity,
intercompany: ✅, or consolidatedinterest expense, cash burn, deferred revenue, SAFE)ClientAR?Interco?Noteswillo-salons❌ No❌ NoPOS/cash — no ARglowlabs❌ No❌ NoGaming/Web3; high burnsb-paulson✅ Verify❌ NoAdvisory; watch interest expenseopdoCheck SOP❌ NoReview SOP
Saved to ~/Desktop/MonthEndClose_{slug}_{YYYY-MM}_Run{N}.xlsx
TabContentsClose ChecklistDashboard — PASS/FAIL/ACTION per item + completion % + proposed JE countTrial BalanceFull TB with debit/credit validation, per-account rows, totalsProposed EntriesAll JEs needed for missing/flagged items, sorted HIGH→MEDIUM→LOWCDC LogStatus changes between runs — tracks close progress over time
text
Completion % = (PASS + N/A) / Total × 100
Close is "READY" when FAIL = 0 and ACTION = 0
Each proposed entry has:
Cache file: .cache/month-end-close/{slug}-{YYYY-MM}.json
--rerun to force fresh QBO pulls without clearing CDC historyChecks .cache/bank-reconciliation/{slug}.json for a completed reconciliation matching the
close period end date. If found and is_reconciled: true → PASS. If different period or
missing → ACTION NEEDED with command to run.
Pulls QBO TB report via qbo report tb, sums all debit and credit columns, validates
|debits - credits| < $0.02. OUT OF BALANCE → FAIL with proposed suspense entry.
Scans QBO Balance Sheet for AP/AR account balances. Flags material balances ≥ $500 as ACTION NEEDED. Proposes accrual entry for largest outstanding item > $2,500.
Compares prior-month BS prepaid balances to current. If prior balance > $0 and no GL activity or balance reduction → ACTION NEEDED with estimated monthly amort entry (straight-line over 12 months as placeholder).
Checks fixed asset accounts on BS + scans GL for depreciation/journal entries to accumulated depreciation accounts. No activity on period with known fixed assets → ACTION NEEDED.
Sums payroll GL accounts for current period, compares to prior P&L payroll total. Flags if variance > $500 or > 15% month-over-month.
Checks deferred revenue BS balance for movement. No change with known balance → ACTION NEEDED with estimated recognition entry (straight-line over 12 months as placeholder).
Compares accrual account balances prior-vs-current. Flags individual account changes ≥ $1,000 or near-zero reversal from significant balance.
Only runs if enabled by SOP. Checks for non-zero intercompany/due-to/due-from balances. Net balance ≠ $0.02 → ACTION NEEDED with elimination entry.
openpyxl ( pip install openpyxl)clients/{slug}/sop.md (optional but recommended)bank_recon check to PASSPipelineScriptUseP&L Quick Comparepl-quick-compare.pyRevenue/expense varianceP&L Deep Analysispl-deep-analysis.pyGL drill-down + accrual proposalsBank Reconciliationbank-reconciliation.pyMust complete before close PASS
Bank Recon must be run first — month-end-close reads its CDC cache to verify completion.
Decimal for precision