budget-negotiator
An advanced skill for L3 autonomous loops. When the token budget nears exhaustion, the agent analyzes its ROI and autonomously…
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.
Claude Code
$ npx -y skills add cobusgreyling/loop-engineering --skill loop-budget --agent claude-code
Codex
$ npx skills add cobusgreyling/loop-engineering --skill loop-budget -a codex -y
Cursor
$ npx skills add cobusgreyling/loop-engineering --skill loop-budget -a cursor -y
Gemini CLI
$ npx skills add cobusgreyling/loop-engineering --skill loop-budget -a gemini-cli -y
GitHub Copilot
$ npx skills add cobusgreyling/loop-engineering --skill loop-budget -a github-copilot -y
OpenCode
$ npx skills add cobusgreyling/loop-engineering --skill loop-budget -a opencode -y
Windsurf
$ npx skills add cobusgreyling/loop-engineering --skill loop-budget -a windsurf -y
name: loop-budget description: 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.
Run at the **start** and **end** of every loop iteration.
1. Read `loop-budget.md` for daily caps and kill-switch flags. 2. Read recent entries in `loop-run-log.md` (last 24h). 3. Sum `tokens_estimate` for the active pattern today. 4. If spend ≥ 80% of the pattern's daily cap → **report-only mode** (no sub-agents, no auto-fix). 5. If spend ≥ 90% and High Priority items remain in `STATE.md`, yield to the [budget-negotiator](../budget-negotiator/SKILL.md) skill (if installed). Otherwise, if spend ≥ 100% or `loop-pause-all` is set → **exit immediately** with a one-line note in STATE.md. 6. If watchlist/state has no actionable items → **exit in <5k tokens** (do not spawn sub-agents).
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"
}Stop prompting. Design the loop. Get a score. Start in 5 minutes · Quickstart · What do you want to do? · Refactor path · 中文 · Pattern picker --tool defaults to claude if you omit it. Swap for grok, codex, or opencode. Week one is report-only.
An advanced skill for L3 autonomous loops. When the token budget nears exhaustion, the agent analyzes its ROI and autonomously…
Install Loop Engineering into a project via the unified CLI front door (@cobusgreyling/loop). Prefer this over invoking loop-init…
Read loop-constraints.md at the start of every run and enforce every rule. This skill runs BEFORE triage or any action skill.…
Triage recent changes, CI failures, issues, and conversations. Produces a concise, actionable findings report suitable for a loop…
Independent verification agent for loop-produced changes. Finds reasons to reject. Runs tests. Confirms diff scope. Use after…
Produce the smallest possible code change that fixes a specific, well-scoped issue (CI failure, reviewer comment, typo). Use only…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.