Skip to content
Skillpedia
Misc81k Β· #1594

cost-budget-check

What it does

This skill reads your recorded AI spending and compares it with a budget you set. It is for people who want clear warnings before going over their limit.

When to use it

  • βœ“When you want to know how much of your AI budget is left.
  • βœ“When you are about to start a large set of AI tasks and want a safety check first.
  • βœ“When you want a repeated check that runs on a schedule.

Skill link

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

Copy 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

Use this skill to help me: https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-cost-tracker/skills/cost-budget-check/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

Example of what to ask your AI

β€œHow much of my AI budget have I used so far?”

5 new skills a week. 1 minute to read.

How it works

The skill adds up recorded session costs, divides the total by the budget you set and shows an alert level. At 100 percent it returns an error code, so scripts can stop safely.

Technical content (original SKILL.md)

Original text by the author, straight from 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
FAQ

How do I set the budget?

You run the budget setting command with an amount in dollars. The skill can also show the current budget.

What do the alert levels mean?

The levels are info at 50 percent, warning at 75, critical at 90 and hard stop at 100, each with a suggested action.

Can I check only today's spending?

Yes. Setting the period to today limits the check to today's records.

Details

Original description by the author

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

repo: ruvnet/ruflo

Popularity

GitHub stars
81k
Ranking position
#1594
License
MIT
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills