/opus-tuner:opus-tunerfrom opus-tuner
Enforces token-budget discipline for long Claude Code sessions: context-size ceilings, session limits, compaction, handoff, and tier/gear routing.
Ships in opus-tuner. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Every request re-reads the whole context, so these rules are about how much gets re-read and how many requests read it.
Read with no limit, or above 400
lines, only when you are certain. Otherwise offset/limit, or search first.
Never recursive-scan a repo to find one symbol.Explore agent for finding code, a
general-purpose one (Sonnet is enough) for mechanical edits and test runs. Its
context is discarded when it returns; yours is re-read every turn./wrap.
When the user wants to continue in a fresh session, prepare and verify a handoff. Ask them to run /clear afterward.
Runtime hooks separately control any configured compaction interruption.| Tier | Ceiling | Use |
|---|---|---|
| routine | 150k | default |
| deep | 250k | refactors, hard debugging, architecture |
The tier escalates automatically on prompt vocabulary, a repair loop (2+ consecutive failures), breadth (6+ files edited), plan mode, or crossing the routine ceiling while still inside the 25k grace band. It never auto-downgrades mid-session; a reset happens only at session start.
A ceiling is a reference point, not a limit. If a hook message asks for a handoff and
work remains, follow it once with /wrap. If the work is done, say so.
Ask with ctx.ps1:
# Windows
powershell -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/ctx.ps1"
# macOS / Linux
pwsh -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/ctx.ps1"
Session default is high and needs no skill. A gear costs one extra request, so the router only asks for one on a clear signal.
| Gear | When |
|---|---|
gear-low | mechanical, bulk, and context already large |
gear-medium | light edits, docs |
| (high) | default |
gear-xhigh | hard reasoning, or a failed attempt |
gear-max | a wrong answer would cost a full turn; capped per session |
If the router injects [tuner] gear=X, invoke /gear-X as your first action.
Full tactics: references/playbook.md.
README.md (opens in a new tab)VERSION (opens in a new tab)references/playbook.md (opens in a new tab)references/pricing.json (opens in a new tab)scripts/_common.ps1 (opens in a new tab)scripts/_pricing.ps1 (opens in a new tab)scripts/audit.ps1 (opens in a new tab)scripts/brief.ps1 (opens in a new tab)scripts/ctx.ps1 (opens in a new tab)scripts/doctor.ps1 (opens in a new tab)scripts/post-tool.ps1 (opens in a new tab)scripts/pre-compact.ps1 (opens in a new tab)scripts/pre-tool.ps1 (opens in a new tab)scripts/profile.ps1 (opens in a new tab)scripts/route.ps1 (opens in a new tab)scripts/selftest.ps1 (opens in a new tab)scripts/session-end.ps1 (opens in a new tab)scripts/session-start.ps1 (opens in a new tab)scripts/stats.ps1 (opens in a new tab)scripts/statusline.ps1 (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
7 skills in this plugin
/gear-xhighHard reasoning - tricky refactors, unfamiliar code, debugging that already failed once.npx claudepluginhub yahyalendani/opus-tuner-claude-skill --plugin opus-tunerOther plugins' skills for the same job