What problem does it solve?
Teams running AI agent workloads often discover runaway API spend only after a budget alarm fires. This Skill detects when daily production spend is accelerating relative to its historical baseline, catching cost spikes (like a hot loop burning 10x normal) before budgets are breached.
Core Features & Use Cases
- Burn-Rate Trending: Bins session spend from the cost-tracking namespace into configurable time buckets (e.g., 1d over 14d) and computes window-over-window deltas.
- Drift Alert Exit Codes: Exits 1 when the latest bucket exceeds the prior mean by a configurable percentage, enabling CI/CD gating.
- Cold-Start Safety: Skips alerts gracefully when there is no prior baseline, avoiding spurious notifications on sparse history.
- Use Case: Add
cost burn --bucket 1d --lookback 7d --alert-on-acceleration-pct 100 to a CI pipeline to fail the build and page on-call when today's spend doubles versus the weekly mean.
Quick Start
Run the cost burn command with a 1-day bucket and 7-day lookback to check whether today's production spend has accelerated more than 100 percent over the prior weekly average.