cost-burn
できること
このスキルは、AIの支出を日ごとに見て、最新の日が以前よりずっと高くないかを確認します。費用の急な上昇を監視している人向けです。
使う場面
- ✓AIのコストが加速しているかを知りたいとき。
- ✓毎日のコストレポートが通常より高く見えて、それを確かめたいとき。
- ✓設定した割合を超えたら自動で通知がほしいとき。
スキルのリンク
https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-cost-tracker/skills/cost-burn/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私の1日あたりのAI支出は、以前より速く増えていますか?”
毎週5つの新しいスキル。1分で読めます。
仕組み
スキルは、過去のセッションを1日単位のグループに分け、最新のグループと、それ以前の日の平均を比べて、変化をドルと割合で報告します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)を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.
よくある質問
どの期間を見ますか?
デフォルトでは14日前までさかのぼり、支出を1日単位にまとめます。どちらの設定も変更できます。
通知を出せますか?
はい。割合の上限を設定すると、最新の日がその値を超えたときに確認が失敗します。
予算チェックとの違いは何ですか?
予算チェックは固定の上限を見ます。このスキルは、支出がどれくらい速く変化しているかを見ます。
詳細
作者による元の説明
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
人気
- GitHubのスター
- 81k
- ランキング
- #1595
- ライセンス
- MIT
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
agent-adaptive-coordinator
81k作業量の変化に合わせて、エージェントのグループを分割し、再配分する手助けをします。作業に合った配置を選びます。
agent-agent
81k大きな目標を順番に並んだ行動計画にし、状況が変わったときに計画を立て直す方法をエージェントに教えます。
agent-agentic-payments
81kAIの買い物のために、支出の上限、期間、販売店のルール、署名付きの承認を含む支出の委任を管理する手助けをします。
agent-analyze-code-quality
81kコードの品質を確認し、コードの臭い、技術的負債、リファクタリングの案を見つける手助けをします。ファイルは変更しません。