Loop Budget Guard
SkillMonitoring & opsChecks token budget around each loop claude skill run and stops early when spending gets too high.
Available today. Use it from your connected AI after setup.
No other account needed.
Add ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.
Then ask your AI: use the Loop Budget Guard skill
About this skill
Check token budget and run-log spend before and after a loop run. Enforces early exit when over budget or when there is no actionable work.
What this skill tells your AI
The instructions your AI receives, as published by compozy/compozy in internal/extension/testdata/client-plugins/loop-engineering/skills/loop-budget/SKILL.md and read by ahel’s review.
Run at the start and end of every loop iteration.
Start of run
- Read
loop-budget.mdfor daily caps and kill-switch flags. - Read recent entries in
loop-run-log.md(last 24h). - Sum
tokens_estimatefor the active pattern today. - If spend ≥ 80% of the pattern's daily cap → report-only mode (no sub-agents, no auto-fix).
- If spend ≥ 90% and High Priority items remain in
STATE.md, yield to the budget-negotiator skill (if installed). Otherwise, if spend ≥ 100% orloop-pause-allis set → exit immediately with a one-line note in STATE.md. - If watchlist/state has no actionable items → exit in <5k tokens (do not spawn sub-agents).
End of run
Append one JSON object to loop-run-log.md:
{
"run_id": "<ISO8601>",
"pattern": "<pattern-id>",
"duration_s": <number>,
"items_found": <number>,
"actions_taken": <number>,
"escalations": <number>,
"tokens_estimate": <number>,
"outcome": "no-op | report-only | fix-proposed | escalated"
}
Rules
- Never exceed
max sub-agent spawns/runfromloop-budget.md. - High-cadence patterns (CI Sweeper, PR Babysitter) must early-exit when nothing is actionable.
- On self-throttle, append a line to
loop-budget.mdunder Alerts This Period.
Signals
- GitHub stars
- 3k
- Forks
- 181
- Last commit
- Sep 2026
Advanced
- Item type
- skill
- Key
loop-budget- Source
- github.com/compozy/compozy