BS Quick Compare — Skill
What This Skill Does
Runs a period-over-period variance analysis on the Balance Sheet (BS) pulled directly from QuickBooks Online. Outputs a 4-tab Excel workbook: Summary | Detail | Flags | CDC Log.
Mirrors the pl-quick-compare and scf-quick-compare patterns but for the Balance Sheet — Assets / Liabilities / Equity sections, accounting equation validation, and BS-specific analysis notes on flagged items tying changes to SCF, AR/AP aging, capex, debt schedule, and equity activity.
When to Use
Use when:
- - A client needs month-end or YTD balance sheet comparison
- Reviewing BS as part of monthly close deliverables
- Investigating material shifts in assets, liabilities, or equity
- Client asks: "why did our AR/AP/cash/debt change?" or "what happened to our equity?"
- Pre-loan/investor analysis requiring clear BS trend visibility
NOT for:
- - P&L variance analysis → use INLINECODE2
- Cash flow analysis → use INLINECODE3
- AR aging deep-dive → use INLINECODE4
- Financial projections or forecasting → use INLINECODE5
- Full three-statement analysis (run all three compare pipelines and cross-reference)
Script Location
CODEBLOCK0
Requirements
- -
pip install openpyxl (already installed in workspace) - Node.js QBO client with valid auth token
- QBO credentials configured
Usage
CODEBLOCK1
Arguments
| Flag | Required | Description |
|---|
| INLINECODE7 | ✅ | Company slug (must be connected in qbo-client) |
| INLINECODE8 |
✅* | Current period "as of" date (YYYY-MM-DD) |
|
--current-start | ❌ | Current period start (default: Jan 1 same year) |
|
--prior-end | ❌ | Prior period "as of" date (default: 1 month back) |
|
--prior-start | ❌ | Prior period start (default: Jan 1 same year as prior-end) |
|
--ytd | ✅* | YTD mode (alternative to explicit dates) |
|
--year | ❌ | Year for --ytd (default: current year) |
|
--out | ❌ | Output directory (default: ~/Desktop) |
|
--sandbox | ❌ | Use QBO sandbox environment |
*Either --current-end OR --ytd is required.
Balance Sheet date note: BS is a point-in-time statement. --current-end and --prior-end are the "as of" dates. The QBO CLI requires start/end dates even for BS — the script defaults --current-start to Jan 1 of the same year if omitted.
Output
Excel file: BS_QuickCompare_{slug}_{as-of-date}.xlsx saved to Desktop (or --out directory).
Tab 1: Summary
- - Total Assets / Total Liabilities / Total Equity (current vs prior, $ change, % change, F/U)
- Total Liabilities + Equity (cross-check row)
- Accounting equation validation:
Total Assets = Total Liabilities + Total Equity (both periods, ≤$1 tolerance)
Tab 2: Detail
- - Every BS line item with hierarchy preserved
- Prior period | Current period | $ Change | % Change | F/U label
- Color-coded by section (Assets = blue, Liabilities = gold, Equity = purple)
Tab 3: ⚠ Flags
- - Material changes: ≥10% change OR ≥$2,500 absolute
- Analysis note for each flagged item — plain-English explanation tying the change to relevant follow-up actions
- BS-specific cross-references (see Analysis Notes section below)
Tab 4: CDC Log
- - Change Data Capture: compares current BS flat map against last cached run
- First run: full snapshot saved (no deltas)
- Subsequent runs: shows exactly what line items changed since last run
- Cache location: INLINECODE24
BS Logic
Section Classification
Each QBO BS row is classified into sections by keyword matching:
- - Assets: cash, bank, accounts receivable, inventory, prepaid, property, equipment, fixed asset, accumulated depreciation, investment, due from, notes receivable
- Liabilities: liabilit, accounts payable, accrued, loan, note payable, line of credit, mortgage, deferred revenue, sales tax, payroll, credit card, due to
- Equity: equity, owner, capital, retained earnings, net income, distribution, contribution, member, shareholder, partner, opening balance equity, paid-in, common stock
Children inherit their parent section classification.
Variance F/U Logic
| Section | Increase = | Decrease = |
|---|
| Assets | ✓ Favorable | ✗ Unfavorable |
| Liabilities |
✗ Unfavorable | ✓ Favorable |
| Equity | ✓ Favorable | ✗ Unfavorable |
Strategic exceptions (new LOC for growth, timely AP buildup) are noted in the analysis notes column.
Accounting Equation Validation
Total Assets = Total Liabilities + Total Equity (≤$1 tolerance)
Runs on both periods and displayed in Summary tab with pass/fail icons.
YTD Mode
--ytd: Current = as of end of last completed month. Prior = same date in prior year.
Example: run on March 17, 2026 → Current = as of Feb 28, 2026 | Prior = as of Feb 28, 2025.
Analysis Notes (Flags Tab)
The Flags tab includes an Analysis Note column with BS-specific interpretation for each material change:
| Line Item | Analysis Note Focus |
|---|
| Cash / Bank | Tie to SCF — identify source: operating CF, capex, debt, distribution |
| Accounts Receivable |
Run AR aging — check DSO, past-due balances, collection trends |
| Inventory | Monitor turnover — buildup vs. drawdown relative to sales pace |
| Prepaid Expenses | Amortization vs. new prepaid spend |
| Fixed Assets / PP&E | Capex vs. disposal — verify depreciation schedule updated |
| Accumulated Depreciation | Confirm D&A add-back in SCF operating section |
| Related-party Receivables | Repayment terms and tax treatment of officer/shareholder loans |
| Accounts Payable | Run AP aging — confirm no overdue payables; payment terms intact |
| Credit Cards | Full payment schedule; confirm all charges categorized |
| Loans / Notes Payable | New borrowing vs. paydown — tie to SCF financing; verify debt schedule |
| Line of Credit | Draw vs. paydown — monitor utilization rate and available capacity |
| Mortgage | Normal amortization vs. lump-sum payment — confirm against schedule |
| Deferred Revenue | Cash received vs. revenue not yet earned — monitor recognition schedule |
| Payroll / Accrued | Settlement timing — verify no aged accruals outstanding |
| Sales Tax Payable | Confirm remittance current; no penalties |
| Retained Earnings | Tie to net income in P&L |
| Current Year Net Income | Deep-dive in P&L quick compare |
| Distributions / Draws | Verify cash availability; tie to SCF financing section |
| Equity Contributions | Tie to SCF financing; confirm cap table updated |
| Opening Balance Equity | Should zero out once books are fully set up |
CDC Cache
CODEBLOCK3
Stores the flat map of all BS line names → balances for the most recent run. On re-run, diffs against the prior cache and shows exactly what changed. Useful for catching mid-month QBO adjustments, journal entries, or bank feed imports.
Decimal Math
All calculations use Python Decimal with ROUND_HALF_UP — no floating-point rounding errors in financial outputs.
Related Pipelines
Run all three compare pipelines for a complete monthly close package:
| Pipeline | Script | What it covers |
|---|
| P&L Quick Compare | INLINECODE28 | Revenue, COGS, expenses, net income |
| SCF Quick Compare |
scf-quick-compare.py | Cash flows: operating, investing, financing |
|
BS Quick Compare |
bs-quick-compare.py |
Assets, liabilities, equity positions |
Cross-reference flags across all three:
- - Cash change on BS → tie to SCF net change
- AR/AP change on BS → tie to aging pipelines
- Net income on BS → tie to P&L net income
- Loan changes on BS → tie to SCF financing section
BS Quick Compare — 技能
技能功能
对直接从QuickBooks Online提取的资产负债表(BS)进行期间差异分析。输出包含4个工作表的Excel工作簿:摘要 | 明细 | 标记 | CDC日志。
遵循pl-quick-compare和scf-quick-compare模式,但针对资产负债表——资产/负债/权益部分、会计等式验证,以及针对标记项目的BS特定分析说明,将变动与现金流量表、应收/应付账龄、资本支出、债务计划和权益活动相关联。
使用时机
适用场景:
- - 客户需要月末或年初至今的资产负债表比较
- 作为月度结账交付物的一部分审查资产负债表
- 调查资产、负债或权益的重大变动
- 客户询问:我们的应收/应付/现金/债务为何变动?或我们的权益发生了什么?
- 贷款前/投资者分析需要清晰的资产负债表趋势可见性
不适用于:
- - 损益表差异分析 → 使用pl-quick-compare.py
- 现金流量分析 → 使用scf-quick-compare.py
- 应收账龄深度分析 → 使用ar-collections
- 财务预测或预报 → 使用cash-flow-forecast.py
- 完整三表分析(运行所有三个比较管道并交叉引用)
脚本位置
scripts/pipelines/bs-quick-compare.py
要求
- - pip install openpyxl(工作区已安装)
- 具有有效认证令牌的Node.js QBO客户端
- 已配置QBO凭据
使用方法
bash
当前月末 vs. 上月末(自动检测上期)
python3 scripts/pipelines/bs-quick-compare.py \
--slug sb-paulson \
--current-end 2026-03-31
明确指定上期
python3 scripts/pipelines/bs-quick-compare.py \
--slug sb-paulson \
--current-end 2026-02-28 --prior-end 2026-01-31
年初至今(截至上个月末 vs. 上年同日期)
python3 scripts/pipelines/bs-quick-compare.py \
--slug sb-paulson --ytd --year 2026
完整日期控制(适用于需要明确起始日期的QBO资产负债表报告)
python3 scripts/pipelines/bs-quick-compare.py \
--slug sb-paulson \
--current-start 2026-01-01 --current-end 2026-03-31 \
--prior-start 2025-01-01 --prior-end 2025-03-31
自定义输出目录
python3 scripts/pipelines/bs-quick-compare.py \
--slug glowlabs \
--current-end 2026-03-31 \
--out ~/Desktop/reports
沙盒模式(QBO沙盒环境)
python3 scripts/pipelines/bs-quick-compare.py \
--slug glowlabs \
--current-end 2026-03-31 \
--sandbox
参数
| 标志 | 必需 | 描述 |
|---|
| --slug | ✅ | 公司标识(必须在qbo-client中已连接) |
| --current-end |
✅* | 当前期间截至日期(YYYY-MM-DD) |
| --current-start | ❌ | 当前期间起始日期(默认:同年1月1日) |
| --prior-end | ❌ | 上期截至日期(默认:前推1个月) |
| --prior-start | ❌ | 上期起始日期(默认:上期结束年份的1月1日) |
| --ytd | ✅* | 年初至今模式(替代明确日期) |
| --year | ❌ | --ytd的年份(默认:当前年份) |
| --out | ❌ | 输出目录(默认:~/Desktop) |
| --sandbox | ❌ | 使用QBO沙盒环境 |
*--current-end或--ytd必须提供其一。
资产负债表日期说明: 资产负债表是时点报表。--current-end和--prior-end是截至日期。QBO CLI即使对资产负债表也需要起始/结束日期——脚本在省略时默认--current-start为同年1月1日。
输出
Excel文件:BSQuickCompare{slug}_{as-of-date}.xlsx,保存至桌面(或--out目录)。
工作表1:摘要
- - 总资产 / 总负债 / 总权益(当前 vs. 上期,金额变动,百分比变动,有利/不利)
- 总负债 + 总权益(交叉检查行)
- 会计等式验证:总资产 = 总负债 + 总权益(两个期间,≤$1容差)
工作表2:明细
- - 所有资产负债表行项目,保留层级结构
- 上期 | 当前期 | 金额变动 | 百分比变动 | 有利/不利标签
- 按部分颜色编码(资产=蓝色,负债=金色,权益=紫色)
工作表3:⚠ 标记
- - 重大变动:≥10%变动或≥$2,500绝对值
- 每个标记项目的分析说明——用通俗语言解释变动及相关后续行动
- 资产负债表特定交叉引用(见下方分析说明部分)
工作表4:CDC日志
- - 变更数据捕获:将当前资产负债表平面映射与上次缓存运行结果进行比较
- 首次运行:保存完整快照(无差异)
- 后续运行:显示自上次运行以来哪些行项目发生了变动
- 缓存位置:.cache/bs-quick-compare/{slug}.json
资产负债表逻辑
部分分类
每个QBO资产负债表行通过关键词匹配分类到各部分:
- - 资产:现金、银行存款、应收账款、存货、预付账款、财产、设备、固定资产、累计折旧、投资、应收关联方、应收票据
- 负债:负债、应付账款、应计费用、贷款、应付票据、信用额度、抵押贷款、递延收入、销售税、工资、信用卡、应付关联方
- 权益:权益、所有者、资本、留存收益、净利润、分配、出资、成员、股东、合伙人、期初余额权益、实缴资本、普通股
子项目继承其父项目的部分分类。
差异有利/不利逻辑
✗ 不利 | ✓ 有利 |
| 权益 | ✓ 有利 | ✗ 不利 |
战略性例外(为增长新增信用额度、及时增加应付账款)在分析说明列中注明。
会计等式验证
总资产 = 总负债 + 总权益 (≤$1容差)
在两个期间均运行,并在摘要工作表中以通过/失败图标显示。
年初至今模式
--ytd:当前 = 截至上个月末。上期 = 上一年同日期。
示例:2026年3月17日运行 → 当前 = 截至2026年2月28日 | 上期 = 截至2025年2月28日。
分析说明(标记工作表)
标记工作表包含一个分析说明列,针对每个重大变动提供资产负债表特定解释:
| 行项目 | 分析说明重点 |
|---|
| 现金 / 银行存款 | 关联至现金流量表——识别来源:经营现金流、资本支出、债务、分配 |
| 应收账款 |
运行应收账龄——检查DSO、逾期余额、收款趋势 |
| 存货 | 监控周转——相对于销售速度的积压与减少 |
| 预付账款 | 摊销 vs. 新增预付支出 |
| 固定资产 / 不动产及设备 | 资本支出 vs. 处置——验证折旧计划已更新 |
| 累计折旧 | 确认折旧与摊销在现金流量表经营部分加回 |
| 应收关联方 | 还款条款及高管/股东贷款的税务处理 |
| 应付账款 | 运行应付账龄——确认无逾期应付款;付款条款不变 |
| 信用卡 | 完整还款计划;确认所有费用已分类 |
| 贷款 / 应付票据 | 新增借款 vs. 偿还——关联至现金流量表融资;验证债务计划 |
| 信用额度 | 提款 vs. 还款——监控使用率和可用额度 |
| 抵押贷款 | 正常摊销 vs. 一次性还款——对照计划确认 |
| 递延收入 | 已收现金 vs. 尚未赚取的收入——监控确认时间表 |
| 工资 / 应计费用 | 结算时间——验证无长期未结应计项目 |
| 应付销售税 | 确认已按时缴纳;无罚款 |
| 留存收益 | 关联至损益表中的净利润 |
| 当前年度净利润 | 在损益表快速比较中进行深度分析 |
| 分配 / 提款 | 验证现金可用性;关联至现金流量表