cost-regression-check

Installation
SKILL.md

Cost Regression Check

Report the cost a change adds on the pull request that adds it, before apply, measured against the fixed monthly ceiling the company pays from its own money. That ceiling is what changes the answer. In a large bill, a new NAT gateway, load balancer, or database minimum is noise, prices are negotiated, and last month is a stable baseline. Against a small ceiling, often funded by credits that end, the same charge can take a visible share before the product has users, and the bill shows it a month later, after the money is spent. A team inside a large company has the same tooling but not that ceiling, so it keeps its company's rates, baselines, and cost process.

Set this up once, in a working session: add a CI job and a cost script to the repository, which owns and reviews both like any other code. On each pull request the job runs the cost script, which reads the resource changes, prices them, computes both numbers, and comments. No model runs per pull request, so the check costs nothing to attend to until a threshold is crossed.

Decisions, and why the startup answer differs

Decision Large-company default This skill Reason
Report the floor apart One blended monthly delta at an assumed volume Two numbers: floor added, and change in cost per unit A fixed charge that is noise in a large bill can be a material share of a small ceiling. A blended number hides which of the two moved.
Per-unit threshold from unit earnings Unit cost reviewed on a dashboard after the bill A per-unit threshold, set from what one unit earns where known, checked on each pull request The ceiling stays fixed while usage grows, so a change that pushes cost per unit above what a unit earns turns growth into a bill the ceiling cannot hold. That number can double while every price stays flat, for example after a Lambda memory increase at unchanged duration.
Absolute thresholds A percentage of a stable baseline Two amounts derived from the ceiling, kept in the repository A small or credit-funded bill has no stable base for a percentage. A large percentage on a near-zero bill is noise; a new fixed floor that takes a visible share of the ceiling is not.
List price Negotiated or commitment-adjusted rates Public on-demand price, labelled as such on every comment Credits hide the bill that arrives when they run out, and the post-credit bill is the one the ceiling has to survive.

Scope

Apply this skill when all of these hold:

Installs
32
GitHub Stars
3.5K
First Seen
3 days ago