cost-burn
Installation
SKILL.md
Burn-rate trend observability. The fourth leg of the cost-tracker forward-cost stack:
| Question | Skill |
|---|---|
| "Have we crossed a threshold?" (reactive) | cost-budget-check |
| "When will we cross a threshold?" (predictive) | cost-projection |
| "Could we have spent less?" (comparative) | cost-counterfactual |
| "Is daily burn ACCELERATING?" (trend) | cost-burn ← this |
Algorithm
Implementation: scripts/burn.mjs.
- Read all
session-*records fromcost-trackingnamespace. - Bin into
--bucketduration windows (default1d) over--lookback(default14d). - For each bucket:
{n: sessions, spendUsd: sum(total_cost_usd)}. - Compute
delta = latest.spendUsd - mean(prior non-empty buckets). - If
--alert-on-acceleration-pct Nis set: exit 1 whendeltaPct > N.