cost-burn
What it does
This skill looks at how much you spend on AI over time, day by day, and checks whether the latest day is much higher than before. It is for people watching for a sudden rise in costs.
When to use it
- βWhen you want to know if your AI costs are speeding up.
- βWhen a daily cost report looks higher than normal and you want to confirm it.
- βWhen you want an automatic alert if the jump passes a set percentage.
Skill link
https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-cost-tracker/skills/cost-burn/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βIs my daily AI spending going up faster than it used to?β
5 new skills a week. 1 minute to read.
How it works
The skill sorts past sessions into daily groups, compares the latest group with the average of the earlier days and reports the change in dollars and percent.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
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.
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
| 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.
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/nullin JSON, markednewin the table. No alert fires (no baseline to compare against). --bucket>--lookback: hard error, exit 2.
FAQ
What period does it look at?
By default it looks back 14 days and groups spending into one-day buckets. You can change both settings.
Can it trigger an alert?
Yes. If you set a percentage limit, the check fails when the latest day goes above it.
How is this different from the budget check?
The budget check looks at a fixed limit. This one looks at how fast the spending is changing.
Details
Original description by the author
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.
repo: ruvnet/ruflo
Popularity
- GitHub stars
- 81k
- Ranking position
- #1595
- License
- MIT
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
agent-adaptive-coordinator
81kHelps your agent split and rebalance a group of AI agents as the workload changes, choosing a layout that fits the task.
agent-agent
81kTeaches your agent to turn a big goal into an ordered plan of actions, and to replan when conditions change.
agent-agentic-payments
81kHelps your agent manage spending mandates for AI shopping, with spend caps, time windows, merchant rules and signed approvals.
agent-analyze-code-quality
81kHelps your agent review code for quality, finding code smells, technical debt and refactoring ideas without changing the files.
Similar skills
blucli
394kHelps your agent find, play, pause, group, and adjust the volume of Bluesound and NAD speakers through the blu command.
camsnap
394kHelps your agent grab snapshots, short clips, or motion events from network cameras and local webcams that you have set up.
eightctl
394kHelps your agent check and control an Eight Sleep pod, including its temperature, alarms, and sleep schedules.