budget-guard

Checks weekly allowance readings and stops metered jobs when usage is red.

Updated Sep 11, 2026
One-click install
npx skills add https://github.com/JYeswak/grok_bot_playground --skill budget-guard-jyeswak
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: budget-guard
Source: https://github.com/JYeswak/grok_bot_playground/tree/main/plugin/skills/budget-guard
Command: npx skills add https://github.com/JYeswak/grok_bot_playground --skill budget-guard-jyeswak

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Metered accounts hit their weekly cap at the worst moment: routine jobs silently burn the allowance early in the week, the jobs that matter fail later, and no record shows which job spent what. This Skill reads the usage surface before expensive work runs and decides go, degrade, or stop. ## Core Features & Use Cases - Allowance gating: Reads used, limit, reset time, and reading age, then classifies the account into green, amber, or red bands against stated thresholds. - Fail-closed metering: Treats errored, null, or stale readings as red and reports them as unmeasured rather than permitting work to continue. - Spend attribution: Appends every decision to a shared run ledger naming the job, Bot, band, estimate, and actual cost. - Use Case: Before fanning out a nightly research chain across subordinate Bots, run the guard; if the reading shows 0.93 of the weekly limit, it stops the fan-out, reports what would have run and its cost, and logs the stop so Thursday's postmortem has a trace. ## Quick Start Ask the AI to check whether there is budget left this week before starting the next scheduled job, and to stop the job if the allowance reading is red or unreadable.

Frequently Asked Questions about budget-guard

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I stop automated jobs from burning through a weekly API allowance?▼

Gate every metered job behind an allowance check that reads used, limit, and reset time before work starts. Classify the reading into green, amber, or red bands, and stop the job when the reading is red, logging what would have run and its estimated cost.

What should happen when a usage endpoint fails or returns stale data?▼

Treat an unreadable meter as red, not as permission to continue. A failed read, null field, or reading older than the staleness limit produces a stop decision reported as unmeasured, because continuing blind is how caps get exceeded.

How do I track which job spent the weekly budget?▼

Append every decision to a shared run ledger naming the job, Bot, band, decision, estimate, and actual spend. Because one computer is shared by every Bot on the account, each entry must name its job and Bot so attribution is computed rather than guessed.

Can this skill raise a spending limit or buy more capacity?▼

No. The skill is read-only: its only outputs are go, degrade, and stop. Raising limits, changing plans, purchasing capacity, or routing work through another account are owner acts explicitly outside its boundaries.

When should a job be degraded instead of stopped?▼

Degrade when the band is amber, or when a green reading minus the job's cost estimate would land in red. Degraded runs execute only priority work with reduced sampling, fan-out width, and retry counts, and name exactly what was skipped.