Skip to main content
skill CX Codex

budget-negotiator — Claude Code skill: what it does, how to install

budget-negotiator is a Claude Code skill for L3 autonomous loops that assesses agent ROI and drafts a budget increase request when token caps are nearly exhausted, instead of failing silently.

MIT ★ 11,819 updated 2026-10-29

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add cobusgreyling/loop-engineering
/plugin install loop-engineering@loop-engineering
Open on GitHub

What budget-negotiator does

The skill triggers inside L3 unattended workflows when token consumption hits ≥90% in loop-budget. Instead of a silent hard exit, the agent reads loop-run-log.md, tallies successful actions, and inspects STATE.md for unfinished high-priority tasks.

When critical issues like red CI runs or security defects remain, the agent posts a business justification marked with [BUDGET NEGOTIATION] in STATE.md. Rules cap the request at +20% or +50k tokens, allowed at most 1 time per day. The loop cannot raise its own limits: execution halts in WAITING_FOR_BUDGET until a human manually updates loop-budget.md.

What it helps with

  • stop autonomous loops from quitting silently when tokens run low
  • draft token limit increase proposals for critical blockers
  • calculate agent action ROI from loop-run-log.md
  • pause unattended loops safely until a human approves extra quota

Example prompts for the agent

  • Check token spend against loop-budget and negotiate an extension if High Priority tasks remain.
  • Calculate ROI from loop-run-log.md and post a +50k tokens request to STATE.md.
  • Set status to WAITING_FOR_BUDGET until a human updates loop-budget.md.

How to install budget-negotiator

1Plugin marketplace

/plugin marketplace add cobusgreyling/loop-engineering
/plugin install loop-engineering@loop-engineering

This installs the whole loop-engineering plugin with all its skills

2Skills CLI (Vercel)

npx skills add cobusgreyling/loop-engineering --skill budget-negotiator -a claude-code

3Manually: put the files in place

~/.claude/skills/budget-negotiator/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/budget-negotiator/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about budget-negotiator

How to install budget-negotiator in Claude Code?

Add the marketplace source via /plugin marketplace add cobusgreyling/loop-engineering, then run /plugin install loop-engineering@loop-engineering.

What does the budget-negotiator skill do?

When token usage reaches ≥90%, it inspects logged results and remaining urgent tasks, drafting a clear budget request in STATE.md.

Can the agent raise its own token limit?

No, self-updating loop-budget.md is prohibited. A human must manually edit the file to approve more tokens before execution can resume.

Source text

SKILL.md · MIT
---
name: budget-negotiator
description: An advanced skill for L3 autonomous loops. When the token budget nears exhaustion, the agent analyzes its ROI and autonomously drafts a negotiation request for a budget increase rather than silently failing.
---

<!--
  NOTE: This template is a mirror of skills/budget-negotiator/SKILL.md.
  Any changes made here must be kept byte-identical to the source skill.
-->

# Budget 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-negotiator` ONLY activates when `loop-budget` would otherwise hard-exit (i.e. ≥90% spend), and ONLY when there are `High Priority` items remaining. If work is not High Priority, yield to the standard `loop-budget` exit sequence.
- **Safety**: This skill touches L3 (unattended) safety boundaries. See [Safety Boundaries](../../docs/safety.md) for threat models.
- **Strict Cap Limitation**: You are strictly forbidden from self-raising the caps in `loop-budget.md`. A human MUST explicitly edit `loop-budget.md` to 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

1. **Calculate ROI**:
   - Read `loop-run-log.md` and sum up the `actions_taken`, `outcome` (specifically successes), and `tokens_estimate` fields for today.
   - Read `STATE.md` to identify the severity of the *remaining* actionable items in the `Watch List` or `High Priority` sections.
   
2. **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_taken` count 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.md` field (e.g., "Requesting +50k tokens for the 'Validate/Audit (CI)' max tokens/day").

3. **Escalate to Humans**:
   - Append your request to the **High Priority** section of `STATE.md` with 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_BUDGET` and safely suspend execution.

4. **Resume**:
   - Do not spawn further sub-agents until you read `loop-budget.md` on a subsequent run and verify that the human has increased your token cap.

© Cobus Greyling · MIT · cobusgreyling/loop-engineering

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set29

The whole set →
pr-review-triage pr-review-triage triages open pull requests for CI checks, reviews, and merge readiness. Useful for automated repository watchdog loops. CX Codex +1 ★ 11,819repo stars changelog-scan The changelog-scan skill reviews changes on main over a chosen time window and prepares structured input for release notes. Use it before drafting a release. CX Codex +1 ★ 11,819repo stars pr-review-triage pr-review-triage tracks open pull requests, checks CI, merge conflicts, stale reviews and unanswered comments, then hands back a ranked list of blockers. CX Codex +1 ★ 11,819repo stars loop-triage loop-triage triages CI failures, recent commits, and issue tickets for autonomous loops. Produces prioritized Markdown findings and updates the state file. CX Codex +1 ★ 11,819repo stars issue-triage issue-triage is a Claude Code skill that sorts open issues and discussions, spots possible duplicates, and suggests priorities and labels. It writes results to issue-triage-state.md. CX Codex +1 ★ 11,819repo stars loop-triage loop-triage sorts fresh CI failures, stuck pull requests and ageing tickets into act-now, watch and ignore. Useful when an agent loop has to choose its own next task. CX Codex +1 ★ 11,819repo stars draft-release-notes draft-release-notes turns changelog-scan results into a categorized release-notes draft. It prepares text for review and never publishes it. CX Codex +1 ★ 11,819repo stars loop-engineering The loop-engineering plugin for Claude Code adds skills for task triage, token budget control, and result verification. It runs in report-only mode during the first week. CX Codex ★ 11,819repo stars

Project sponsors

Companies that keep this analytics open