finance-ops

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Preamble (runs on skill start)

前言(技能启动时运行)

bash
undefined
bash
undefined

Version check (silent if up to date)

Version check (silent if up to date)

python3 telemetry/version_check.py 2>/dev/null || true
python3 telemetry/version_check.py 2>/dev/null || true

Telemetry opt-in (first run only, then remembers your choice)

Telemetry opt-in (first run only, then remembers your choice)

python3 telemetry/telemetry_init.py 2>/dev/null || true

> **Privacy:** This skill logs usage locally to `~/.ai-marketing-skills/analytics/`. Remote telemetry is opt-in only. No code, file paths, or repo content is ever collected. See `telemetry/README.md`.

---
python3 telemetry/telemetry_init.py 2>/dev/null || true

> **隐私说明:** 本技能会在本地将使用记录存储到 `~/.ai-marketing-skills/analytics/` 目录下。远程遥测仅在用户主动选择加入时启用。绝不会收集任何代码、文件路径或代码仓库内容。详见 `telemetry/README.md`。

---

AI Finance Ops

AI 财务运营

Two tools: CFO Briefing Generator and Codebase Cost Estimator.

包含两个工具:CFO简报生成器和代码库成本估算器。

Tool 1: CFO Briefing Generator

工具1:CFO简报生成器

Generate executive financial summaries from QuickBooks exports.
从QuickBooks导出文件生成高管财务摘要。

Workflow

工作流

1. Ingest Files

1. 导入文件

Place QuickBooks export files (CSV, XLSX, XLS) in a working directory. Accepted report types (any subset works — P&L alone is sufficient):
  • P&L Summary — Revenue, COGS, expenses, net income (MOST IMPORTANT)
  • P&L by Customer — Revenue breakdown by client
  • P&L Detail — Transaction-level detail (XLSX)
  • Balance Sheet — Assets, liabilities, equity
  • General Ledger — All account transactions
  • Expenses by Vendor — Vendor-level expense breakdown
  • Transaction List by Vendor — Detailed vendor transactions
  • Bill Payments — AP payment history
  • Cash Flow Statement — Operating/investing/financing flows (XLSX)
  • Account List — Chart of accounts
将QuickBooks导出文件(CSV、XLSX、XLS)放入工作目录。支持的报告类型(任意子集均可使用——仅P&L就足够):
  • P&L摘要 —— 收入、销货成本、费用、净收入(最重要)
  • 按客户划分的P&L —— 按客户划分的收入明细
  • P&L明细 —— 交易级明细(XLSX)
  • 资产负债表 —— 资产、负债、权益
  • 总账 —— 所有账户交易
  • 按供应商划分的费用 —— 供应商级别的费用明细
  • 按供应商划分的交易列表 —— 详细的供应商交易记录
  • 账单支付 —— 应付账款付款历史
  • 现金流量表 —— 经营/投资/融资现金流(XLSX)
  • 账户列表 —— 会计科目表

2. Run Analysis

2. 运行分析

bash
python3 scripts/cfo-analyzer.py --input ./data/uploads/ [--period YYYY-MM]
Options:
  • --input DIR
    — Directory with QB exports
  • --period YYYY-MM
    — Override period label (default: auto-detected from files)
  • --history DIR
    — History directory for MoM comparison (default:
    ./data/history/
    )
  • --no-history
    — Skip saving to history
The script:
  1. Auto-detects file types by scanning headers
  2. Parses each file into structured data
  3. Computes all KPIs (see
    references/metrics-guide.md
    for definitions and healthy ranges)
  4. Loads prior period from history for MoM comparison
  5. Saves current period to history
  6. Outputs formatted executive summary to stdout
bash
python3 scripts/cfo-analyzer.py --input ./data/uploads/ [--period YYYY-MM]
选项:
  • --input DIR
    —— 存放QB导出文件的目录
  • --period YYYY-MM
    —— 覆盖周期标签(默认:从文件自动检测)
  • --history DIR
    —— 用于月度环比对比的历史数据目录(默认:
    ./data/history/
  • --no-history
    —— 跳过保存到历史记录
脚本执行逻辑:
  1. 通过扫描表头自动检测文件类型
  2. 将每个文件解析为结构化数据
  3. 计算所有KPI(定义和健康范围参见
    references/metrics-guide.md
  4. 从历史记录中加载上一期数据用于月度环比对比
  5. 将当前周期数据保存到历史记录
  6. 将格式化的高管摘要输出到标准输出

3. Scenario Modeling (Optional)

3. 场景建模(可选)

After running the CFO analysis, model base/bull/bear scenarios:
bash
python3 scripts/scenario-modeler.py --input ./data/financial-latest.json
This generates 12-month projections for:
  • Base case — current trajectory continues
  • Bull case — growth targets met (new product revenue + new clients)
  • Bear case — lose top clients
运行CFO分析后,可对基准/乐观/悲观场景进行建模:
bash
python3 scripts/scenario-modeler.py --input ./data/financial-latest.json
这会生成12个月的预测,涵盖:
  • 基准场景 —— 延续当前发展轨迹
  • 乐观场景 —— 达成增长目标(新产品收入+新客户)
  • 悲观场景 —— 流失头部客户

4. Deliver Summary

4. 交付摘要

The script outputs a formatted briefing with emoji status indicators (🟢🟡🔴), suitable for Slack, email, or any messaging surface.
脚本会输出带表情状态指示器(🟢🟡🔴)的格式化简报,适用于Slack、电子邮件或任何消息平台。

File Format Details

文件格式详情

See
references/quickbooks-formats.md
for expected CSV/XLSX column formats and detection heuristics.
预期的CSV/XLSX列格式和检测规则参见
references/quickbooks-formats.md

Metric Thresholds

指标阈值

See
references/metrics-guide.md
for healthy ranges, red/yellow/green thresholds, and benchmark context. Adjust thresholds for your business size and type.

健康范围、红/黄/绿阈值和基准上下文参见
references/metrics-guide.md
。可根据自身业务规模和类型调整阈值。

Tool 2: Codebase Cost Estimator

工具2:代码库成本估算器

Estimate full development cost of a codebase.
估算代码库的整体开发成本。

Workflow

工作流

Step 1: Analyze the Codebase

步骤1:分析代码库

Read the entire codebase. Catalog total lines of code by language/type, architectural complexity, advanced features, testing coverage, and documentation quality.
读取整个代码库,按语言/类型分类统计总代码行数、架构复杂度、高级功能、测试覆盖率和文档质量。

Step 2: Calculate Development Hours

步骤2:计算开发时长

Apply productivity rates from
references/rates.md
. Calculate base hours per code type, then apply overhead multipliers for architecture, debugging, review, docs, integration, and learning curve.
应用
references/rates.md
中的生产率数据,计算每种代码类型的基础时长,然后乘以架构、调试、代码审查、文档、集成和学习曲线对应的管理成本乘数。

Step 3: Research Market Rates

步骤3:调研市场费率

Use web search to find current hourly rates for the relevant specializations. Build a rate table with low / median / high for the project's tech stack.
使用网页搜索查找相关技术方向的当前时薪,生成项目技术栈对应的低/中/高费率表。

Step 4: Calculate Organizational Overhead

步骤4:计算组织管理成本

Convert raw dev hours to calendar time using efficiency factors from
references/org-overhead.md
. Show estimates across company types (Solo through Enterprise).
使用
references/org-overhead.md
中的效率系数,将原始开发时长转换为日历时间,展示不同公司类型(从独立开发者到企业)的估算结果。

Step 5: Calculate Full Team Cost

步骤5:计算完整团队成本

Apply supporting role ratios and team multipliers from
references/team-cost.md
. Show role-by-role breakdown, plus summary across all company stages.
应用
references/team-cost.md
中的支持角色配比和团队乘数,展示按角色划分的明细,以及所有公司发展阶段的汇总结果。

Step 6: Generate Cost Estimate

步骤6:生成成本估算

Output the full estimate using the template in
references/output-template.md
. Include all sections: codebase metrics, dev hours, calendar time, market rates, engineering cost, full team cost, grand total summary, and assumptions.
使用
references/output-template.md
中的模板输出完整估算结果,涵盖所有板块:代码库指标、开发时长、日历时间、市场费率、工程成本、完整团队成本、总计摘要和假设前提。

Step 7: AI ROI Analysis (Optional)

步骤7:AI ROI分析(可选)

If the codebase was built with AI assistance, calculate value per AI hour using
references/claude-roi.md
. Determine active hours via git history clustering, calculate speed multiplier vs human developer, and compute cost savings and ROI.
如果代码库是在AI辅助下开发的,使用
references/claude-roi.md
计算每AI小时的价值。通过git历史聚类确定活跃时长,计算相比人类开发者的效率倍数,然后算出成本节约和ROI。

Key Principles

核心原则

  • Present professionally, suitable for stakeholders
  • Include confidence level (low/medium/high) and key assumptions
  • Highlight highest-complexity areas that drive cost
  • Always show ranges (low/avg/high), never a single number
  • Search for CURRENT year market rates, don't use stale data
  • 呈现风格专业,适合利益相关方查看
  • 包含置信度(低/中/高)和关键假设前提
  • 高亮显示推高成本的最高复杂度领域
  • 始终展示范围(低/平均/高),绝不给出单一数字
  • 搜索当前年度的市场费率,不要使用过时数据