budget-gates
Skill15 starsChanged 9 months agoMITView on GitHub
Use when enforcing hard spending limits, regen attempt caps, or tier escalation ceilings. Trigger when projected or actual costs approach defined thresholds.
In this repository23 other files it gives its agents.
- AGENTS.mdAGENTS.md
- audience-simulatorSkill
- character-lockSkill
- character-psychologySkill
- continuity-supervisorSkill
- cost-optimizerSkill
- cultural-checkSkill
- dialogue-consistency-checkSkill
- model-routerSkill
- narrative-red-teamSkill
- plausibility-auditorSkill
- prompt-packagerSkill
- qc-graderSkill
- regen-analyzerSkill
- research-agentSkill
- run-loggerSkill
- script-breakdownSkill
- set-lockSkill
- shot-plannerSkill
- story-architectSkill
- storyboard-generatorSkill
- voice-lockSkill
- world-state-trackerSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 10 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
Stop runaway regeneration loops.
- Distinctive: line 31
When total spend approaches cap.
- Distinctive: line 32
When regen attempts exceed threshold.
- Distinctive: line 33
When premium tier usage exceeds quota.
- Distinctive: line 36
Never bypass this skill in scaled production.
- Distinctive: line 84
If projected spend > 100% cap: → HARD STOP
- Distinctive: line 94
If regen_count > configured limit (e.g., 3): → Freeze shot → Require regen-analyzer → Possibly simplify shot
- Distinctive: line 103
If premium-tier usage > defined quota: → Force reallocation via model-router → Require justification
- Distinctive: line 163
Not enforcing per-shot caps.
- Distinctive: line 164
No documentation of spend.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Role
You are the financial safety system.
Your responsibility is to:
- Enforce hard budget caps.
- Stop runaway regeneration loops.
- Prevent silent tier escalation.
- Force structural simplification when necessary.
You do not suggest. You enforce.
When To Use
Use this skill:
- After cost projection.
- When total spend approaches cap.
- When regen attempts exceed threshold.
- When premium tier usage exceeds quota.
- Before escalating resolution.
Never bypass this skill in scaled production.
Context Requirements
Before proceeding:
- Review COST_REPORT_
<TARGET>_v###. - Review regen counts.
- Review tier usage distribution.
- Confirm defined budget cap.
- Confirm per-scene and per-shot caps.
Required Inputs
- Budget cap (total)
- Budget cap (per scene)
- Budget cap (per shot)
- Regen attempt limit
- Tier usage limits
- Current spend
- Projected spend
Required Artifacts
BUDGET_STATUS_v###.md
Must include:
- Current Spend
- Projected Spend
- Percent of Budget Used
- Regen Count by Shot
- Tier Usage Breakdown
- Violations Detected (YES / NO)
- Enforcement Actions
Enforcement Rules
Total Budget
If projected spend > 100% cap: → HARD STOP
If projected spend > 90% cap: → Warning + require cost-optimizer revision
Per-Shot Regen
If regen_count > configured limit (e.g., 3): → Freeze shot → Require regen-analyzer → Possibly simplify shot
Premium Tier Usage
If premium-tier usage > defined quota: → Force reallocation via model-router → Require justification
Escalation Controls
Premium escalation allowed only if:
- Hero-tier A
- QC failure persists
- Cost impact documented
Gate Behavior
FAIL if:
- Budget cap exceeded.
- Regen limit exceeded without analyzer.
- Tier escalation unjustified.
- Spend undocumented.
PASS when:
- Spend within cap.
- Regen attempts controlled.
- Tier usage rational.
- Enforcement documented.
Escalation Policy
Escalate to:
Cost-optimizer if:
- Over budget.
Shot-planner if:
- Complexity driving cost.
Regen-analyzer if:
- Failure loop detected.
Model-router if:
- Tier misuse detected.
Human review if:
- Hard stop triggered repeatedly.
Common Failure Modes
- “Just one more regen.”
- Silent tier escalation.
- Ignoring regen multiplier.
- Rendering everything final-tier.
- Not enforcing per-shot caps.
- No documentation of spend.
Related Skills
- cost-optimizer
- model-router
- regen-analyzer
- shot-planner
- qc-grader
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

