agentleFS
YahyaLendaniYahyaLendani/opus-tuner-claude-skill/skills/opus-tuner/SKILL.md

opus-tuner

Skill14 starsChanged 16 days agoMITView on GitHub

Token-budget discipline for long sessions - context size, session limits, compaction, handoff, tier and gear routing.

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 5 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every request re-reads the whole context, so these rules are about how much gets re-read and how many requests read it.

    line 8
  2. Distinctive:

    Never recursive-scan a repo to find one symbol.

    line 17
  3. Very specific:

    Hand off when the user asks: Do it at a boundary, not mid-task, with /wrap.

    line 23
  4. Very specific:

    When the user wants to continue in a fresh session, prepare and verify a handoff.

    line 24
  5. Very specific:

    If CLAUDE_CONFIG_DIR is set, substitute it for ~/.claude in that path.

    line 52
  6. Very specific:

    If the router injects [tuner] gear=X, invoke /gear-X as your first action.

    line 67
  7. Distinctive:

    Do not suggest switching the main-thread model mid-session.

    line 71
  8. Distinctive:

    Do not read a large file "to get context".

    line 73
  9. Distinctive:

    Do not restate the plan back to the user before acting on a mechanical turn.

    line 74

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

opus-tuner

Every request re-reads the whole context, so these rules are about how much gets re-read and how many requests read it.

The five rules

  1. Batch independent tool calls. Four greps in one message read the context once; four separate messages read it four times.
  2. Grep before read, and bound every read. 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.
  3. Never trade verification for tokens. A "saving" that causes rework is a loss.
  4. Delegate breadth, not judgement. Exploration, mechanical multi-file edits and test runs go to a subagent: the built-in 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.
  5. Hand off when the user asks. Do it at a boundary, not mid-task, with /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.

Tiers

TierCeilingUse
routine150kdefault
deep250krefactors, 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 "$env:USERPROFILE\.claude\skills\opus-tuner\scripts\ctx.ps1"

# macOS / Linux
pwsh -NoProfile -File "$HOME/.claude/skills/opus-tuner/scripts/ctx.ps1"

If CLAUDE_CONFIG_DIR is set, substitute it for ~/.claude in that path.

Gears

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.

GearWhen
gear-lowmechanical, bulk, and context already large
gear-mediumlight edits, docs
(high)default
gear-xhighhard reasoning, or a failed attempt
gear-maxa wrong answer would cost a full turn; capped per session

If the router injects [tuner] gear=X, invoke /gear-X as your first action.

What not to do

  • Do not suggest switching the main-thread model mid-session. The new model starts without the prompt cache.
  • Do not read a large file "to get context". Grep for the symbol.
  • Do not restate the plan back to the user before acting on a mechanical turn.

Full tactics: references/playbook.md.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.