rightsize
Make every Claude token count.

rightsize is a Claude Code plugin. It sends each prompt to the cheapest model and effort that does the job, raises effort only when Claude is stuck, and keeps the cache and context from costing more than they should. It logs every choice, learns how you work, and shows what each choice cost.

claude plugin marketplace add archid21/rightsize
claude plugin install rightsize@archid21 --scope user
Works with a Claude subscription (Pro, Max, Ultra) or an API key · MIT license · New in 0.16.3: one Changes setting (Auto or Ask) with Redo buttons, a band that folds, compacts counted in Total saved, and more /rightsize optimize suggestions (changelog).
Contents
Why use it · Quickstart · How it works · What you'll see · Features · Make it yours · Commands · Privacy and safety · FAQ · Limits · Get involved
Why use it
Claude Code runs every prompt on the model and effort you picked. On Opus, renaming a variable costs as much as reviewing a pull request, and you reach your usage limit early. On Sonnet, your usage lasts, but reviews and hard bugs get a weaker answer. Switching by hand with /model works until you forget.
- From an Opus start: same results, lower cost. Routine work goes to Haiku or Sonnet helpers and lower effort; Opus keeps the work that needs it. On our coding benchmark it matched Opus at up to 30% lower cost (API-equivalent).
- From a Sonnet start: Opus-grade reviews. Reviews switch to Opus for one turn, then come back. This costs more than Sonnet alone: on our benchmark about 1.4x to 2x, almost all of it from reviews.
- Effort follows evidence. Effort goes up mid-turn only when the turn shows trouble: repeated failures, a loop, or two fixes in a row that leave the tests red.
- It learns which routes to trust. Every hand-off, lowering, test run and 👍/👎 scores the rater per kind of work and model. A route that keeps missing is paused.
- Cache and compact costs under control. It keeps the cache warm only while your own record says that pays, warns as the context fills, and compacts only when you press a button or set a row to.
| Opus on everything | Sonnet on everything | rightsize |
|---|
| Results on our benchmark | Baseline | Fewer tasks passed | Matched Opus |
| Reviews | Opus | Sonnet | Opus, for that turn |
| Routine work | Opus | Sonnet | Cheapest model that fits |
| Remembering to switch | You | You | rightsize |
Benchmark: real tasks from open-source repositories, each graded by hidden tests the model never sees. Your results depend on your work and settings. Method: docs/METHOD.md.
Quickstart
You need Claude Code 2.1.287 or newer (2.1.286 in the desktop app) and a Claude subscription or API key. The handoff compact text also needs python3 (on a Mac it comes with the Xcode command line tools); without it a compact uses Claude Code's own summary.
- Install with the two commands above.
- Start a new session and type
/rightsize. If the settings pane opens, it works.
- On an Opus start, the band offers Switch: /model sonnet once. Press it, then Enter. rightsize never changes your saved default model.
- Work as usual. After a few sessions, run
/rightsize report.
- Optional: install whatsnext for compacts that keep better notes.
Want to watch first? In /config, set Mode to watch only. rightsize rates every prompt and changes nothing; run /rightsize report after a week to see what it would have saved.
How it works