budget-negotiator — скилл для Claude Code: что делает и как установить
Скилл budget-negotiator для автономных циклов L3: когда дневной лимит токенов почти исчерпан, агент оценивает окупаемость работы и сам запрашивает добавку бюджета у человека, а не падает молча.
MIT ★ 11 819 обновлён 2026-10-29
/plugin marketplace add cobusgreyling/loop-engineering
/plugin install loop-engineering@loop-engineeringЧто делает budget-negotiator
Скилл срабатывает в автономных контурах L3, когда израсходовано ≥90% дневного лимита токенов в loop-budget. Вместо тихого завершения работы агент изучает журнал loop-run-log.md, подсчитывает успешные действия за день и сопоставляет их с оставшимися задачами из STATE.md.
Если в очереди остались критические инциденты вроде сбоев CI или уязвимостей, агент готовит запрос с тегом [BUDGET NEGOTIATION] в блоке High Priority файла STATE.md. Правила разрешают просить максимум +20% или +50k токенов и не чаще 1 раза в день. Сам себе поднять лимит агент не сможет: без ручной правки loop-budget.md человеком цикл не продолжится.
Какие задачи решает
- предотвратить внезапную остановку автономного агента при исчерпании токенов
- запросить продление бюджета токенов при наличии критических задач в очереди
- посчитать окупаемость действий агента по логу
loop-run-log.md - перевести цикл в режим ожидания
WAITING_FOR_BUDGETдо решения человека
Примеры запросов агенту
- Оцени окупаемость действий в
loop-run-log.mdи сформируй запрос на добавку токенов вSTATE.md. - Если израсходовано ≥90% бюджета, проверь задачи High Priority и запроси +50k токенов.
- Перейди в статус
WAITING_FOR_BUDGETи дождись решения человека вloop-budget.md.
Как установить budget-negotiator
1Через маркетплейс плагинов
/plugin marketplace add cobusgreyling/loop-engineering/plugin install loop-engineering@loop-engineeringКоманда ставит плагин loop-engineering целиком, со всеми его скиллами
2Через Skills CLI (Vercel)
npx skills add cobusgreyling/loop-engineering --skill budget-negotiator -a claude-code3Вручную: положить файлы
~/.claude/skills/budget-negotiator/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/budget-negotiator/
1Через Skills CLI (Vercel)
npx skills add cobusgreyling/loop-engineering --skill budget-negotiator -a codex2Вручную: положить файлы
.agents/skills/budget-negotiator/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add cobusgreyling/loop-engineering --skill budget-negotiator -a cursor2Вручную: положить файлы
.cursor/skills/budget-negotiator/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install cobusgreyling/loop-engineering skills/budget-negotiator2Вручную: положить файлы
.github/skills/budget-negotiator/SKILL.md1Через Skills CLI (Vercel)
npx skills add cobusgreyling/loop-engineering --skill budget-negotiator -a gemini-cli2Командой платформы
gemini skills install https://github.com/cobusgreyling/loop-engineering --path skills/budget-negotiatorВручную: положить файлы
.devin/skills/budget-negotiator/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Claude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о budget-negotiator
Как установить budget-negotiator в Claude Code?
Выполните команду /plugin marketplace add cobusgreyling/loop-engineering, а затем установите плагин через /plugin install loop-engineering@loop-engineering.
Что делает скилл budget-negotiator?
При расходе ≥90% токенов агент анализирует журнал успехов и срочные задачи, после чего запрашивает увеличение квоты в файле STATE.md.
Может ли агент самостоятельно увеличить свой лимит токенов?
Нет, агенту строго запрещено менять файл loop-budget.md. Лимит должен вручную отредактировать человек, иначе агент остаётся в статусе ожидания.
Исходный текст
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