New to Claude Skills? Learn how to install them →

ruvnet on GitHub

Cost Burn

Free

Monitor production spend acceleration effectively.

by ruvnet67.6k stars on ruvnet/ruflo
Updated Aug 10, 2026
Get this skill

Free · Opens the source repo

What Cost Burn does

Cost Burn is a specialized tool designed for tracking the acceleration of production spending over time. It operates by analyzing session records from the cost-tracking namespace, binning them into configurable time windows, and calculating the spend delta between the latest and prior buckets. This allows teams to quickly identify if their spending is accelerating beyond expected thresholds, which can be crucial for managing budgets and preventing overspending.

The skill provides a configurable alert mechanism that triggers an exit code when the latest spending exceeds the average of prior buckets by a specified percentage. This feature is particularly useful for catching unexpected spikes in spending, such as those caused by inefficient code or runaway processes, before they impact the overall budget. The tool is designed to be integrated into CI/CD pipelines, allowing for automated checks that can prevent costly surprises during production runs.

Cost Burn is distinct from other cost-tracking tools like Cost Trend, which focuses on benchmarking drift. Instead, it zeroes in on the actual spending trajectory in production environments, making it an essential component of a comprehensive cost management strategy. This skill is ideal for developers and operations teams who need real-time insights into their production costs and want to ensure that spending remains within acceptable limits.

By using Cost Burn, organizations can gain better visibility into their production spending patterns, enabling proactive management of resources and budgets. This skill is particularly beneficial in environments where cost control is critical, such as cloud services or large-scale deployments where costs can escalate rapidly.

When to use it

Use Cost Burn when you need to monitor production spending trends and detect acceleration in costs over time.

When not to use it

This tool may not be suitable for environments where spending patterns are stable or where detailed budget management is not a priority.

What you can build with it

Monitoring Production Costs

Use Cost Burn to track your production spending and identify any sudden increases in costs, ensuring you stay within budget.

Integrating with CI/CD

Incorporate Cost Burn into your CI/CD pipeline to automatically alert your team if spending accelerates beyond acceptable limits.

Preventing Budget Overruns

Utilize the alert feature of Cost Burn to catch unexpected spikes in production costs before they lead to budget overruns.

How to install Cost Burn

View source

1. Install with the skills CLI

npx skills add ruvnet/ruflo/cost-burn --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by ruvnet

Burn-rate trend observability. The fourth leg of the cost-tracker forward-cost stack:

QuestionSkill
"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.

  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 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
...

Drift alert exit code

$ 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

CI integration

# 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.

Distinct from cost-trend

SkillData sourceQuestion
cost-trenddocs/benchmarks/runs/*.json"Is the benchmark drifting (win rate, latency)?"
cost-burncost-tracking namespace"Is production spend accelerating?"

Both useful; they answer different questions on different data.

Edge cases

  • Sparse history (no prior non-empty buckets): alert is SKIPPED with a reason string, exit 0. Operators don't get spurious alerts on cold-start.
  • Prior buckets all $0 but latest > $0: delta is Infinity/null in JSON, marked new in the table. No alert fires (no baseline to compare against).
  • --bucket > --lookback: hard error, exit 2.

Frequently asked questions about Cost Burn

Similar skills