agentleFS
RandomNestRandomNest/aivideo-production-skills/skills/budget-gates/SKILL.md

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.

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
  1. Distinctive:

    Stop runaway regeneration loops.

    line 17
  2. Distinctive:

    When total spend approaches cap.

    line 31
  3. Distinctive:

    When regen attempts exceed threshold.

    line 32
  4. Distinctive:

    When premium tier usage exceeds quota.

    line 33
  5. Distinctive:

    Never bypass this skill in scaled production.

    line 36
  6. Distinctive:

    If projected spend > 100% cap: → HARD STOP

    line 84
  7. Distinctive:

    If regen_count > configured limit (e.g., 3): → Freeze shot → Require regen-analyzer → Possibly simplify shot

    line 94
  8. Distinctive:

    If premium-tier usage > defined quota: → Force reallocation via model-router → Require justification

    line 103
  9. Distinctive:

    Not enforcing per-shot caps.

    line 163
  10. Distinctive:

    No documentation of spend.

    line 164

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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:

  1. Review COST_REPORT_<TARGET>_v###.
  2. Review regen counts.
  3. Review tier usage distribution.
  4. Confirm defined budget cap.
  5. 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

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.