Cost Burn logo

Cost Burn

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

Overview

Publisherruvnet
Repositoryruflo
Skill namecost-burn
Stars
72.7K
Forks
8.6K
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by ruvnet on GitHub. Read the source before you install it.

Installation

Install the Cost Burn AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ruvnet/ruflo.git /tmp/ruflo
mkdir -p .claude/skills
cp -r /tmp/ruflo/plugins/ruflo-cost-tracker/skills/cost-burn .claude/skills/cost-burn
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Cost Burn in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Cost Burn on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Cost Burn is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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

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

What does the Cost Burn AI 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.

Why use Cost Burn on TypingMind?

Because you install it once and use it with any model. Cost Burn is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Cost Burn in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/ruvnet/ruflo/tree/main/plugins/ruflo-cost-tracker/skills/cost-burn. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Cost Burn?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Cost Burn?

As many as you like. As long as a model supports skills, you can use Cost Burn with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Cost Burn AI skill free?

Yes. It is published on GitHub by ruvnet under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇