AI Finance Ops skill

AI-powered financial analysis suite.

by ericosiu·MIT license·★ 3,615 Stars on the repo·GitHub ↗

Use now

Files of AI Finance Ops

ericosiu/main1 file shown
SKILL.md
Show the full text136 lines

Preamble (runs on skill start)

# Version check (silent if up to date)
python3 telemetry/version_check.py 2>/dev/null || true

# 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.


AI Finance Ops

Two tools: CFO Briefing Generator and Codebase Cost Estimator.


Tool 1: CFO Briefing Generator

Generate executive financial summaries from QuickBooks exports.

Workflow
1. Ingest Files

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
2. Run Analysis
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
3. Scenario Modeling (Optional)

After running the CFO analysis, model base/bull/bear scenarios:

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
4. Deliver Summary

The script outputs a formatted briefing with emoji status indicators (🟢🟡🔴), suitable for Slack, email, or any messaging surface.

File Format Details

See references/quickbooks-formats.md for expected CSV/XLSX column formats and detection heuristics.

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.


Tool 2: Codebase Cost Estimator

Estimate full development cost of a codebase.

Workflow
Step 1: Analyze the Codebase

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

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.

Step 3: Research Market Rates

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

Convert raw dev hours to calendar time using efficiency factors from references/org-overhead.md. Show estimates across company types (Solo through Enterprise).

Step 5: Calculate Full Team Cost

Apply supporting role ratios and team multipliers from references/team-cost.md. Show role-by-role breakdown, plus summary across all company stages.

Step 6: Generate Cost Estimate

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.

Step 7: AI ROI Analysis (Optional)

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.

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
1---
2name: finance-ops
3description: "AI-powered financial analysis suite. Generates executive CFO briefings from QuickBooks exports (P&L, Balance Sheet, General Ledger, Cash Flow, etc.) with anomaly detection, burn rate, runway analysis, and scenario modeling. Also estimates codebase development costs with organizational overhead and AI ROI analysis. Triggers on: 'CFO briefing', 'financial analysis', 'cost briefing', 'expense review', 'runway analysis', 'burn rate', 'cost estimate', 'how much would this cost to build', 'development cost', 'Claude ROI'."
4---
5 
6 
7## Preamble (runs on skill start)
8 
9```bash
10# Version check (silent if up to date)
11python3 telemetry/version_check.py 2>/dev/null || true
12 
13# Telemetry opt-in (first run only, then remembers your choice)
14python3 telemetry/telemetry_init.py 2>/dev/null || true
15```
16 
17> **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`.
18 
19---
20 
21# AI Finance Ops
22 
23Two tools: CFO Briefing Generator and Codebase Cost Estimator.
24 
25---
26 
27## Tool 1: CFO Briefing Generator
28 
29Generate executive financial summaries from QuickBooks exports.
30 
31### Workflow
32 
33#### 1. Ingest Files
34 
35Place QuickBooks export files (CSV, XLSX, XLS) in a working directory. Accepted report types (any subset works — P&L alone is sufficient):
36 
37- **P&L Summary** — Revenue, COGS, expenses, net income (MOST IMPORTANT)
38- **P&L by Customer** — Revenue breakdown by client
39- **P&L Detail** — Transaction-level detail (XLSX)
40- **Balance Sheet** — Assets, liabilities, equity
41- **General Ledger** — All account transactions
42- **Expenses by Vendor** — Vendor-level expense breakdown
43- **Transaction List by Vendor** — Detailed vendor transactions
44- **Bill Payments** — AP payment history
45- **Cash Flow Statement** — Operating/investing/financing flows (XLSX)
46- **Account List** — Chart of accounts
47 
48#### 2. Run Analysis
49 
50```bash
51python3 scripts/cfo-analyzer.py --input ./data/uploads/ [--period YYYY-MM]
52```
53 
54Options:
55- `--input DIR` — Directory with QB exports
56- `--period YYYY-MM` — Override period label (default: auto-detected from files)
57- `--history DIR` — History directory for MoM comparison (default: `./data/history/`)
58- `--no-history` — Skip saving to history
59 
60The script:
611. Auto-detects file types by scanning headers
622. Parses each file into structured data
633. Computes all KPIs (see `references/metrics-guide.md` for definitions and healthy ranges)
644. Loads prior period from history for MoM comparison
655. Saves current period to history
666. Outputs formatted executive summary to stdout
67 
68#### 3. Scenario Modeling (Optional)
69 
70After running the CFO analysis, model base/bull/bear scenarios:
71 
72```bash
73python3 scripts/scenario-modeler.py --input ./data/financial-latest.json
74```
75 
76This generates 12-month projections for:
77- **Base case** — current trajectory continues
78- **Bull case** — growth targets met (new product revenue + new clients)
79- **Bear case** — lose top clients
80 
81#### 4. Deliver Summary
82 
83The script outputs a formatted briefing with emoji status indicators (🟢🟡🔴), suitable for Slack, email, or any messaging surface.
84 
85### File Format Details
86 
87See `references/quickbooks-formats.md` for expected CSV/XLSX column formats and detection heuristics.
88 
89### Metric Thresholds
90 
91See `references/metrics-guide.md` for healthy ranges, red/yellow/green thresholds, and benchmark context. Adjust thresholds for your business size and type.
92 
93---
94 
95## Tool 2: Codebase Cost Estimator
96 
97Estimate full development cost of a codebase.
98 
99### Workflow
100 
101#### Step 1: Analyze the Codebase
102 
103Read the entire codebase. Catalog total lines of code by language/type, architectural complexity, advanced features, testing coverage, and documentation quality.
104 
105#### Step 2: Calculate Development Hours
106 
107Apply 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.
108 
109#### Step 3: Research Market Rates
110 
111Use 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.
112 
113#### Step 4: Calculate Organizational Overhead
114 
115Convert raw dev hours to calendar time using efficiency factors from `references/org-overhead.md`. Show estimates across company types (Solo through Enterprise).
116 
117#### Step 5: Calculate Full Team Cost
118 
119Apply supporting role ratios and team multipliers from `references/team-cost.md`. Show role-by-role breakdown, plus summary across all company stages.
120 
121#### Step 6: Generate Cost Estimate
122 
123Output 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.
124 
125#### Step 7: AI ROI Analysis (Optional)
126 
127If 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.
128 
129### Key Principles
130 
131- Present professionally, suitable for stakeholders
132- Include confidence level (low/medium/high) and key assumptions
133- Highlight highest-complexity areas that drive cost
134- Always show ranges (low/avg/high), never a single number
135- Search for CURRENT year market rates, don't use stale data
136 

Discussion

Alternatives