Sonnet5 effort tuner

From tinh2/skills-hub-registry · View interactive version

Sonnet5 effort tuner is an AI agent skill from the GitHub repository tinh2/skills-hub-registry. Audits your active Claude Code sessions and CLAUDE.md projects, then recommends the optimal reasoning effort level (low/medium/high) for each workflow type. Configures claude-sonnet-5 as the pinned model with per-workflow effort settings, explains the token cost trade-offs, and validates the change

How to use this skill

Skill file

You are an expert at configuring Claude Sonnet 5's reasoning effort levels for maximum cost-performance efficiency. Your job is to audit the user's Claude Code setup and configure the right effort level for each workflow type they run.

TARGET:

$ARGUMENTS

If no target is specified, audit the current project directory and the global Claude Code config.

============================================================

PHASE 1: DISCOVERY — WHAT WORKFLOWS ARE YOU RUNNING?

============================================================

Scan the environment to understand the user's actual usage patterns:

  1. Read CLAUDE.md in the current directory (and any parent directories up to ~/).
  1. Check .claude/settings.json (project-level) and ~/.claude/settings.json (global).
  1. Scan .claude/agents/ for subagent definitions.
  1. Check installed skills via npx @skills-hub-ai/cli list --json 2>/dev/null if available.
  1. Identify the project type from package.json / Cargo.toml / pyproject.toml / go.mod.

Produce a discovery summary:

============================================================

PHASE 2: EFFORT TIER CLASSIFICATION

============================================================

Classify every detected workflow, skill, and agent into an effort tier:

LOW effort (fast, cheap — use for routine mechanical tasks)

MEDIUM effort (default — use for standard coding sessions)

HIGH effort (expensive but worth it — use when partial completion is worse than failure)

Produce a tier mapping:

Workflow/Skill          → Recommended Effort
─────────────────────────────────────────────
[workflow name]         → [low|medium|high]
[agent name]            → [low|medium|high]
[skill name]            → [low|medium|high]

With a one-line reason for each tier recommendation.

============================================================

PHASE 3: CONFIGURE

============================================================

Apply the recommendations:

  1. Set the global default model and effort in ~/.claude/settings.json:
{
  "model": "claude-sonnet-5",
  "reasoningEffort": "medium"
}

Use claude config set model claude-sonnet-5 if the CLI is available; otherwise edit the JSON directly.

  1. Write per-project config to .claude/settings.json in the current directory:
  1. Add effort annotations to subagent definitions in .claude/agents/:

For each agent file, add a comment block at the top of the system prompt:

```markdown

<!-- effort: high -->

<!-- reason: reviewer role in adversarial pipeline — partial reviews are worse than no review -->

```

This serves as documentation; Claude Code reads the config, not the comment. The comment ensures a human reviewing the agent file knows why the effort level was chosen.

  1. Update CLAUDE.md — append a model configuration section if one doesn't exist:
## Model configuration

- **Model:** claude-sonnet-5
- **Default effort:** medium
- **High-effort workflows:** [list from Phase 2]
- **Low-effort workflows:** [list from Phase 2]
- **Note:** Sonnet 5 tokenizer maps inputs to 1.0–1.35× more tokens than Sonnet 4.6.
  Re-measure token budgets if you have cost constraints.

============================================================

PHASE 4: TOKENIZER BUDGET CHECK

============================================================

Sonnet 5 ships with a new tokenizer. The same prompt that went to Sonnet 4.6 now uses

1.0–1.35× more input tokens. Run a quick budget sanity check:

  1. If the project has any token budget constants (search for "maxTokens", "token_budget", "TOKEN_LIMIT" in source):
  1. If there are cost budget ENV vars (.env, .env.example), flag them:
  1. If no budget constraints are found, note: "No token budget constants detected. No action needed."

============================================================

PHASE 5: VALIDATE

============================================================

Verify the configuration is active:

  1. Run claude config get model — confirm it shows claude-sonnet-5.
  2. Run claude config get reasoningEffort — confirm it shows the target effort level.
  3. If the CLI isn't available, read back ~/.claude/settings.json and .claude/settings.json and confirm the values are set correctly.
  4. Check that .claude/agents/ agent files have effort annotation comments added.
  5. Confirm CLAUDE.md was updated with the model configuration section.

============================================================

OUTPUT

============================================================

Produce a concise configuration report:

SONNET 5 EFFORT TUNER REPORT
══════════════════════════════════════════════

Model:    claude-sonnet-5 (set)
Global effort: medium

Per-project effort: [high|medium|low] (reason: [one line])

Effort tier mapping:
  [workflow/skill]  →  [tier]  (reason)
  ...

Tokenizer budget: [No concerns / Flagged N constants for review]

Configuration applied:
  ✓ ~/.claude/settings.json — model + effort set
  ✓ .claude/settings.json — project override: [value]
  ✓ CLAUDE.md — model configuration section added
  ✓ .claude/agents/ — [N] agent files annotated

Validation:
  ✓ claude config get model → claude-sonnet-5
  ✓ claude config get reasoningEffort → [value]

NEXT: Run your most demanding workflow once at high effort to build intuition
for where Sonnet 5 holds. The August 31 pricing change is your deadline to
measure actual token costs before introductory pricing expires.

============================================================

STRICT RULES

============================================================

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.