/ruflo-cost-tracker:cost-burn [--bucket 1d] [--lookback 14d] [--alert-on-acceleration-pct 50] [--format table|json]from ruflo-cost-tracker
Tracks production spend burn-rate over time, bins session costs into time windows, computes window-over-window delta, and optionally exits with error code when spend acceleration exceeds a configurable threshold. Useful for CI/CD pipelines to catch cost regressions before budget alarms trigger.
Ships in ruflo-cost-tracker. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
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 |
Implementation: scripts/burn.mjs.
session-* records from cost-tracking namespace.--bucket duration windows (default 1d) over --lookback (default 14d).{n: sessions, spendUsd: sum(total_cost_usd)}.delta = latest.spendUsd - mean(prior non-empty buckets).--alert-on-acceleration-pct N is set: exit 1 when deltaPct > N.| 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 14:16 | 0 | $0.000000
2 | 2026-06-13 14:16 → 2026-06-14 14:16 | 1 | $0.100000
3 | 2026-06-12 14:16 → 2026-06-13 14:16 | 1 | $0.100000
...
$ cost burn --bucket 1d --lookback 7d --alert-on-acceleration-pct 50 ⚠ ALERT: latest bucket $0.500000 is 400.0% above prior mean $0.100000 (threshold +50%) exit 1
$ cost burn --bucket 1d --lookback 7d --alert-on-acceleration-pct 500 ✓ latest bucket within +500% of prior mean (actual delta: 400.0%) — OK exit 0
# 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
The alert is independent of budget — it triggers on rate ACCELERATION even when total spend is well under budget. Catches "we shipped a hot loop that burns 10× normal" before the budget alarm goes off.
cost-trend| Skill | Data source | Question |
|---|---|---|
cost-trend | docs/benchmarks/runs/*.json | "Is the benchmark drifting (win rate, latency)?" |
cost-burn | cost-tracking namespace | "Is production spend accelerating?" |
Both useful; they answer different questions on different data.
Infinity/null in JSON, marked new in the table. No alert fires (no baseline to compare against).--bucket > --lookback: hard error, exit 2.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
24 skills in this plugin
/cost-adviseOptimisation findings from your own Claude Code and Codex logs — low cache hit ratio, 1-hour cache writes that did not pay back, sub-agents on a top-tier model, Codex reasoning share, bloated sessions — each with evidence and a what-if saving. Use when asked how to cut spend or why it is high./cost-anomalyMAD-based outlier detection on session spend: lists anomalous sessions with modified-z scores, with an optional --alert-on-outliers exit code for CI. Use when asked which individual session is the cost outlier; cost-burn covers the aggregate trend./cost-benchmarkRun the corpus benchmark — booster locally, optional Gemini/Sonnet/Opus baselines — and persist a verifiable measured-vs-claimed table/cost-booster-editApply a simple code transform via agent-booster's WASM engine — sub-millisecond, deterministic, $0 (no LLM call). Companion to cost-booster-route./cost-booster-routeRoute tasks through hooks_route, partition by Agent Booster availability, and report Tier 1 bypass utilization with $0 cost/cost-budget-checkRead accumulated cost-tracking spend + budget config, compute utilization, emit 50/75/90/100% alert laddernpx claudepluginhub ruvnet/ruflo --plugin ruflo-cost-trackerOther plugins' skills for the same job