Agent Skills

cost-budget-check

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

Install

npx skills add https://github.com/ruvnet/ruflo --skill cost-budget-check
SKILL.md

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

Related skills

azure-diagnosticsmicrosoft608KDebug Azure production issues on Azure using AppLens, Azure Monitor, resource health, and safe triage. WHEN: debug production issues, troubleshoot app service, app service high CPU, app service deployment failure, troubleshoot container apps, troubleshoot functions, troubleshoot AKS, VM RDP, Linux SSH, VM black screen, can't connect to VM, reset VM password, NSG or firewall blocking, kubectl cannot connect, kube-system/CoreDNS failures, pod pending, crashloop, node not ready, upgrade failures, aazure-preparemicrosoft608KPrepare azd-based Azure projects for deployment: generates azure.yaml, infrastructure (Bicep/Terraform), and Dockerfiles for the Azure Developer CLI (azd) workflow. USE ONLY when the user explicitly wants to use azd as the deployment tool, or the project already has an azure.yaml file. DO NOT USE FOR: non-azd deployments, Python App Service code-only deploys (use python-appservice-deploy), or cross-cloud migration (use azure-cloud-migrate). WHEN: prepare app for azd, create azure.yaml, set up azazure-aimicrosoft608KUse for Azure AI: Search, Speech, OpenAI, Document Intelligence. Helps with search, vector/hybrid search, speech-to-text, text-to-speech, transcription, OCR. WHEN: AI Search, query search, vector search, hybrid search, semantic search, speech-to-text, text-to-speech, transcribe, OCR, convert text to speech.azure-deploymicrosoft607KExecute Azure deployments for ALREADY-PREPARED applications that have existing .azure/deployment-plan.md and infrastructure files. DO NOT use this skill when the user asks to CREATE a new application โ€” use azure-prepare instead. This skill runs azd up, azd deploy, terraform apply, and az deployment commands with built-in error recovery. Requires .azure/deployment-plan.md from azure-prepare and validated status from azure-validate. WHEN: \"run azd up\", \"run azd deploy\", \"execute deployment\",

Search skills and MCP servers

Fuzzy search across 23,137 skills and servers