brennhill/cost-per-accepted-change/cpac-cli
Claude Code and agent skill by brennhill/cost-per-accepted-change
- community
Checking that the SKILL.md file is still in the repository.
Compute cost per accepted change (CPAC) — the fully-loaded cost of producing software that reached production and stayed there, divided by the number of changes that did. Use when a user wants to measure AI delivery economics, FinOps for engineering, or AI ROI in a real repository.
Install
npx vskill@latest install brennhill/cost-per-accepted-change/cpac-cliSKILL.md
Cost per accepted change
This skill helps you measure cost per accepted change ("CPAC") — the canonical definition from aifinops.dev. The metric is the fully-loaded cost of producing software that reached production and stayed there, divided by the number of changes that did, size-normalized so one unit represents a comparable amount of substantive work.
Use this skill when the user wants to:
- Answer "is our AI investment paying back?" with a defensible single number
- Compute CPAC for a real GitHub repository over a date window
- Decompose CPAC into its five cost components for diagnosis
- Apply the 500-LOC size-normalization rule to a list of merged changes
Do not use this skill for:
- Comparing individual engineers (the metric is undefined at the individual level)
- Single-change "what did this PR cost" lookups (the metric is only defined over a population)
- Ranking unrelated teams against each other (work mix invalidates the comparison)
What's in this skill
A CLI (cpac) and an MCP server (cpac-mcp) sharing the same audit + calculator core.
CLI
Run cpac --help for the full flag list. Add --json to any command for machine-readable output.
MCP server
cpac-mcp is a stdio MCP server exposing three tools:
calculate_cpac— pure math (5 cost components + denominator → CPAC value and per-component shares)normalize_changes— apply 500-LOC normalization to a list of{ linesChanged }recordsaudit_repo— walk a GitHub repository over a date window, fetch merged PRs, detect reverts, and emit the accepted-change-unit count
Add to Claude Code (or any MCP-aware client) by adding this to mcpServers:
How to use it well
- Pick a window long enough that the denominator stabilizes. CPAC stabilizes around 25–100 accepted change units per window. Smaller teams need longer windows. A 5-engineer team should report quarterly, not monthly.
- Run `audit_repo` (or `cpac audit`) first. This gives you the denominator and surfaces revert/repair candidates. Review the
repairCandidateslist manually — the FAQ rule is "if a reasonable reviewer would describe the follow-up as 'fixing what the original got wrong,' it invalidates." Adjust by passing--since/--untilor by overridingacceptedChangesdownstream.
- Gather the five cost components for the same window. Numerator inputs:
- modelCost — LLM/API spend (your provider's billing dashboard, segmented by team if possible)
- infraCost — compute, storage, observability, tooling allocated to the production loop
- engineeringTime — fully-loaded hourly rate × hours allocated to delivery work
- reviewCost — fully-loaded hourly rate × hours spent reviewing/gating AI work
- reworkCost — fully-loaded hourly rate × hours spent reverting/fixing non-survivors
- Call `calculate_cpac` (or `cpac calc`) to get the headline number plus per-component shares. The shares are diagnostic: a team where rework crept from 8% to 18% has a very different problem than one where it stayed at 8%, even if the headline moved by the same amount.
- Pair the result with at least one leading indicator. Change failure rate (DORA), per-suggestion acceptance rate, DevEx pulse score. The headline tells you the system's cost; the components tell you the source; leading indicators tell you why.
- Report the trend, not the snapshot. A single window in isolation tells you very little. Two consecutive windows in the same direction, with stable accounting, is the minimum signal.
Important guardrails
- The 30-day survival window means reporting lag. Current-month CPAC cannot be finalized until 30 days after the month closes.
audit_repoflags PRs astooRecentToEvaluatewhen they're inside the survival window. - Hold accounting constant. Hourly rates, attribution rules, exclusions (vendored/generated/lockfiles), and window length must hold steady across the time series. Changing accounting mid-stream invalidates the trend.
- Don't target an absolute number. Targets invite gaming. Track the trend; investigate when it moves; do not legislate the number.
- Heuristic repair candidates need human judgment. The CLI flags PRs whose title looks like a fix and whose files overlap with an in-window PR. It does not auto-invalidate. Apply the FAQ's judgment rule.
Worked example (matches the homepage)
Reference
- Canonical definition: <https://aifinops.dev>
- FAQ (window selection, normalization rule, anti-gaming): <https://aifinops.dev/faq>
- Instrumentation guide: <https://aifinops.dev/instrument>
- Originally defined in The Delivery Gap (Brenn Hill, 2026)
- Source: <https://github.com/brennhill/cost-per-accepted-change>
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingtools/cpac-cli/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/brennhill/cost-per-accepted-change/cpac-cli)