本文へスキップ
Skillpedia
その他81k · #1594

cost-budget-check

できること

このスキルは、記録されたAIの支出を読み取り、設定した予算と比べます。上限を超える前に、明確な警告がほしい人向けです。

使う場面

  • ✓AIの予算がどれくらい残っているか知りたいとき。
  • ✓大量のAIタスクを始める前に、安全確認をしたいとき。
  • ✓スケジュールに従って定期的に確認を繰り返したいとき。

スキルのリンク

https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-cost-tracker/skills/cost-budget-check/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-cost-tracker/skills/cost-budget-check/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“これまでにAIの予算をどれくらい使ったか教えてください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

スキルは、記録されたセッションのコストを合計し、その合計を設定した予算で割って、警告レベルを表示します。100%に達すると、スクリプトが安全に止まれるように、エラーコードを返します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Cost Budget Check

Reads cost-tracking:budget-config for the project's budget limit, sums total_cost_usd across session-* records produced by cost-track, computes utilization, and emits the measured 4-tier alert ladder (50% INFO / 75% WARNING / 90% CRITICAL / 100% HARD_STOP).

Until P2 (this skill) landed, the README documented the alert ladder but no code checked it. Now this skill is the gate.

When to use

  • After every cost-track run, to surface the alert level.
  • Before spawning a swarm — if utilization ≥ 90%, escalate to /cost-optimize first.
  • Cron-friendly via /loop 30m for continuous monitoring.

Steps

  1. Run the check:

    node plugins/ruflo-cost-tracker/scripts/budget.mjs check
    

    Filter by period: BUDGET_PERIOD=today (default all). Use BUDGET_QUIET=1 for machine-readable JSON.

  2. Inspect the markdown summary — budget, spent, remaining, utilization percentage, alert level (🟢 OK · 🟡 INFO · 🟠 WARNING · 🔴 CRITICAL · 🛑 HARD_STOP), and the recommended action.

  3. Set / inspect the budget:

    node plugins/ruflo-cost-tracker/scripts/budget.mjs set 50.00
    node plugins/ruflo-cost-tracker/scripts/budget.mjs get
    
  4. HARD_STOP path — budget.mjs check exits with code 1 when utilization ≥ 100%. Wrap critical agent spawns in a budget.mjs check && spawn … guard to fail closed.

Storage shape (cost-tracking:budget-config)

{
  "budget_usd": 50.00,
  "setAt": "2026-05-05T...",
  "thresholds": { "info": 0.50, "warning": 0.75, "critical": 0.90, "hard_stop": 1.00 }
}

Alert ladder (from REFERENCE.md, now enforced)

Threshold Level Action
50% INFO 🟡 log notification, no UX disruption
75% WARNING 🟠 display warning, suggest /cost-optimize
90% CRITICAL 🔴 urgent alert, recommend model downgrades
100% HARD_STOP 🛑 halt non-essential spawns; exit code 1

Cross-references

  • cost-track (producer) — populates cost-tracking:session-*
  • cost-report — same data source, narrative format
  • cost-optimize — recommended action when WARNING/CRITICAL
  • REFERENCE.md "Budget alert thresholds" — the documented ladder this enforces
よくある質問

予算はどのように設定しますか?

金額をドルで指定して、予算設定コマンドを実行します。スキルは現在の予算を表示することもできます。

警告レベルは何を意味しますか?

50%で情報、75%で警告、90%で重大、100%で強制停止です。それぞれに推奨の対応が付いています。

今日の支出だけを確認できますか?

はい。期間を今日に設定すると、確認は今日の記録だけに限られます。

詳細

作者による元の説明

Read accumulated cost-tracking spend + budget config, compute utilization, emit 50/75/90/100% alert ladder

repo: ruvnet/ruflo

人気

GitHubのスター
81k
ランキング
#1594
ライセンス
MIT
更新日
2026/11/2

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル