About budget-negotiator
budget-negotiator is a skill for the loop-budget workflow, activated only when a hard budget exit is imminent and high-priority work remains. It uses run records and outstanding issues to request a limited increase from a human maintainer, then suspends work while awaiting approval.
Key features
- 01Activate only at a hard budget exit
- 02Count today's actions and successful outcomes
- 03Check remaining high-priority items
- 04Submit a cap request to a maintainer
- 05Wait for human approval before resuming
Use cases
- 01Request more budget while CI remains broken
- 02Seek an extension before addressing a high-priority security issue
- 03Switch to report-only mode after a human declines
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ cobusgreyling/ loop-engineering --skill budget-negotiatorAfter installing, type/budget-negotiatorin Claude Code to confirm it loaded.
Details
From the project READMEBudget Negotiator
When you detect that you are nearing your daily token cap (e.g., ≥90% spend) via the loop-budget skill, DO NOT just exit silently. You must negotiate for an extension based on your Return on Investment (ROI).
Goal
Ensure that critical work is not arbitrarily blocked by token budgets if the loop has demonstrated a high success rate and the remaining work is critical.
Rules & Precedence
- Precedence:
budget-negotiatorONLY activates whenloop-budgetwould otherwise hard-exit (i.e. ≥90% spend), and ONLY when there areHigh Priorityitems remaining. If work is not High Priority, yield to the standardloop-budgetexit sequence. - Safety: This skill touches L3 (unattended) safety boundaries. See Safety Boundaries for threat models.
- Strict Cap Limitation: You are strictly forbidden from self-raising the caps in
loop-budget.md. A human MUST explicitly editloop-budget.mdto increase the cap before you can resume. - Human Decline: If a human declines the negotiation by removing the
[BUDGET NEGOTIATION]tag without increasing the budget, you must revert to report-only mode and NOT ask again today. - Cap the Ask: You may only request a maximum of +20% or +50k tokens per negotiation. You may only negotiate a maximum of one time per day.
Negotiation Protocol
-
Calculate ROI:
- Read
loop-run-log.mdand sum up theactions_taken,outcome(specifically successes), andtokens_estimatefields for today. - Read
STATE.mdto identify the severity of the remaining actionable items in theWatch ListorHigh Prioritysections.
- Read
-
Draft Justification:
- If the remaining items are High Priority (e.g., CI is red, P0 bugs, security vulnerabilities), draft a concise business justification.
- The justification must include:
- The current spend vs the limit.
- The exact
actions_takencount and successful outcomes you've completed today based on the JSON log. - The specific critical issue(s) remaining.
- A precise request for an extension tied to the specific
loop-budget.mdfield (e.g., "Requesting +50k tokens for the 'Validate/Audit (CI)' max tokens/day").
-
Escalate to Humans:
- Append your request to the High Priority section of
STATE.mdwith the tag[BUDGET NEGOTIATION]. - Ensure the request is formatted clearly so a human maintainer can make a quick yes/no decision.
- Example:
[BUDGET NEGOTIATION] I have burned 95k/100k tokens for the 'Daily Triage' loop today. However, I have successfully executed 4 actions with a 'fix-proposed' outcome. There is 1 critical CI failure remaining on the main branch. I request a temporary bump of 'Daily Triage' max tokens/day by +50k to resolve it. - Set your internal state to
WAITING_FOR_BUDGETand safely suspend execution.
- Append your request to the High Priority section of
-
Resume:
- Do not spawn further sub-agents until you read
loop-budget.mdon a subsequent run and verify that the human has increased your token cap.
- Do not spawn further sub-agents until you read