budget-negotiator

budget-negotiator is a skill for Claude Code, Codex from cobusgreyling/loop-engineering. It costs 43 tokens per session (820 once invoked), scanned A, original, MIT.

A rule for handling an autonomous coding loop when its token budget is nearly exhausted. It prepares a request for a human-approved budget increase only when important work remains, and it cannot change the limit itself.

In plain words
What is it for?
Use it with a budget-limited autonomous workflow to assess whether more work is worthwhile and prepare a budget-extension request when the defined conditions are met.
Why use it?
It prevents important unfinished work from ending silently while keeping the spending limit under human control. If no increase is approved, the loop returns to reporting its status.

Skill for Claude CodeCodex

Part of the loop-engineering plugin — 15 skills, 2 agents shipped together

About the project

Loop Engineering is a collection of patterns, starter projects, and command-line tools for designing recurring workflows around AI coding agents. It is for developers who want agents to discover work, make changes, verify results, and preserve project state across tasks. The catalogue entries provide the project's reusable skills, agents, plugin, and instruction.

cobusgreyling/loop-engineering · 10,959 stars · on GitHub · cobusgreyling.github.io

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/cobusgreyling/loop-engineering/budget-negotiator
Any agent
npx skills add cobusgreyling/loop-engineering --skill budget-negotiator
Clone the repo
git clone --depth 1 https://github.com/cobusgreyling/loop-engineering

Made for: Claude Code, Codex.

Or install loop-engineering, the plugin that ships this one along with the rest of its 15 skills, 2 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for budget-negotiator

README.md
[![agentmods](https://agentmods.dev/badge/skills/cobusgreyling/loop-engineering/budget-negotiator.svg)](https://agentmods.dev/skills/cobusgreyling/loop-engineering/budget-negotiator)
Your own site
<a href="https://agentmods.dev/skills/cobusgreyling/loop-engineering/budget-negotiator"><img src="https://agentmods.dev/badge/skills/cobusgreyling/loop-engineering/budget-negotiator.svg" alt="Measured on agentmods" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 820 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00043 $0.00820
Opus 5 $0.00022 $0.00410
Sonnet 5 $0.00009 $0.00164
Haiku 4.5 $0.00004 $0.00082

Measured 6d ago against content hash 637e9d7f0815, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

budget-negotiator scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/budget-negotiator/SKILL.md · 50 lines

How it starts

The opening of the file, as written. The whole thing — 50 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 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").

Read the full file on GitHub · 50 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 50 lines · 43 tokens per session scan A 637e9d7f0815

Subscribe to this mod's changes

budget-negotiator is a skill published in the GitHub repository cobusgreyling/loop-engineering (10,959 stars, last pushed yesterday), licensed MIT. It adds 43 tokens to every session and 820 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

github-actions

Use when authoring or fixing GitHub Actions CI/CD — workflows under .github/workflows, triggers, job matrix, caching, token permissions, OIDC cloud deploys, environment gates, reusable workflows. NOT the Dockerfile or image build strategy (that is docker), NOT the branching model (that is git-workflow), NOT release…

ericrisco/rsc-harness · 81 tokens

github-workflow-automation

Advanced GitHub Actions workflow automation with AI swarm coordination, intelligent CI/CD pipelines, and comprehensive repository management.

ruvnet/ruflo · 26 tokens

securing-github-actions-workflows

This skill covers hardening GitHub Actions workflows against supply chain attacks, credential theft, and privilege escalation. It addresses pinning actions to SHA digests, minimizing GITHUBTOKEN permissions, protecting secrets from exfiltration, preventing script injection in workflow expressions, and implementing…

adriannoes/awesome-agentic-ai · 68 tokens

deployment

Use when taking an app from source to live: choosing the deploy target from requirements (Hetzner+Coolify vs Vercel vs a third), then wiring container → CI → registry → host with build secrets, healthchecks and rollback. NOT one platform's mechanics (that is coolify, vercel, railway, render), NOT the Dockerfile alone…

ericrisco/rsc-harness · 86 tokens

aw-author

Author, validate, and improve GitHub Agentic Workflow (gh-aw) markdown files. Use when the user wants to create a new workflow, validate an existing workflow, improve a workflow, or debug workflow issues. Triggers on: "aw-author", "agentic workflow", "gh-aw workflow", "workflow markdown", "workflow frontmatter"…

zircote-plugins/github-agentic-workflows · 91 tokens

aw-daily

Fully autonomous daily pipeline for the aw-author plugin. Executes intelligence research (web search + GitHub activity queries), posts to Discussions, performs gap analysis against reference files, creates issues, implements changes on develop branch, creates PR, requests review, and auto-merges. Designed for…

zircote-plugins/github-agentic-workflows · 94 tokens