OPEN-SOURCE SKILL · token-budget-guard
token-budget-guard — Multi-Agent Cache & Split-Guard Skill
Save to .claude/skills/token-budget-guard/SKILL.md and load in coordinator sessions managing parallel workers.
Install path: .claude/skills/token-budget-guard/SKILL.md
---
name: token-budget-guard
description: Token and coordination discipline for parallel multi-agent workflows. Preserves 1-hour Prompt Cache, prevents multi-generation ticket splitting, and keeps worker reports concise.
---
# Multi-Agent Token Budget Guard
## 1. Protect the 1-Hour Prompt Cache
- Pin the coordinator session to a single primary model for its full lifecycle. Do not switch models or toggle MCP tool definitions mid-session (doing so busts Prompt Cache immediately).
- Delegate rare hard edge cases to a one-off higher-tier subagent instead of upgrading the coordinator.
- Keep scheduled wakeup intervals at **<= 55 minutes** so recurring checks land inside the 1-hour cache TTL.
- Hand off the coordinator around **~300K context tokens**—not too early (avoids paying ~100K cold-start tax repeatedly) and not too late.
## 2. Keep Contexts Isolated & Short
- Start a **fresh session** for every distinct ticket; never extend an unrelated old thread.
- Run codebase search and log inspection in lightweight read-only subagents.
- Cap every worker completion report to **<= 10 lines** (status, PR/commit link, verification result, blockers). Never paste raw API JSON or full logs into the coordinator.
## 3. Split Threshold & Risk-Tiered Sign-Off
- Never split trivial cleanup that can be finished in the current session.
- **Max 1 generation**: a follow-up ticket may not spawn another follow-up ticket.
- Non-semantic text/typo edits in acceptance docs self-approve with the PR; only semantic, money, or permission changes require central sign-off.