cost-burn
Burn-rate trend over time with optional drift-alert exit code. Bins session spend into buckets, surfaces window-over-window delta, and can exit 1 when latest bucket exceeds prior mean by a configurable %. Distinct from `cost-trend` (benchmark drift); this tracks PRODUCTION spend trajectory.
npx skills add ruvnet/ruflo --skill cost-burn --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
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`](../../scripts/burn.mjs). 1. Read all `session-*` records from `cost-tracking` namespace. 2. Bin into `--bucket` duration windows (default `1d`) over `--lookback` (default `14d`). 3. For each bucket: `{n: sessions, spendUsd: sum(total_cost_usd)}`. 4. Compute `delta = latest.spendUsd - mean(prior non-empty buckets)`. 5. If `--alert-on-acceleration-pct N` is set: exit 1 when `deltaPct > N`. ## Smoke transcript (5 days @ $0.10/day, today $0.50 — 400% acceleration) ``` | Latest bucket spend | $0.500000 (1 sessions) | | Prior bucket mean | $0.100000 (4 non-empty buckets) | | **Delta (latest vs prior mean)** | **+$0.400000 (400.00%)** | # | Window | Sessions | Spend 0 | 2026-06-15 14:16 → 2026-06-16 14:16 | 1 | $0.500000 1 | 2026-06-14 14:16 → 2026-06-15
- Algorithm
- Smoke transcript (5 days @ $0.10/day, today $0.50 — 400% acceleration)
- Drift alert exit code
- CI integration
- Distinct from cost-trend
- Edge cases
Fail the build if today's spend accelerated > 100% over the weekly mean cost burn --bucket 1d --lookback 7d --alert-on-acceleration-pct 100 || alert-oncall
What does the cost-burn skill do?
Burn-rate trend over time with optional drift-alert exit code. Bins session spend into buckets, surfaces window-over-window delta, and can exit 1 when latest bucket exceeds prior mean by a configurable %. Distinct from `cost-trend` (benchmark drift); this tracks PRODUCTION spend trajectory.
How do I install it?
Run `npx skills add ruvnet/ruflo --skill cost-burn --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From ruvnet/ruflo, a repository with 67,015 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.