/model-right-sizer:model-right-sizer-installfrom model-right-sizer
Stamps a model-right-sizer mandate onto the current repo's agent-instructions file (CLAUDE.md, AGENTS.md, or both). Idempotent and append-only. Also installs the model-right-sizer plugin if missing.
Ships in model-right-sizer. 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.
None: SKILL.md is the whole skill.
This skill installs one thing, and only one thing: a standalone,
organization-agnostic mandate that every substantive task in this repo
must consult the model-right-sizer agent for model-selection guidance,
bookended around the work itself. It targets whichever agent-instructions
file(s) the repo actually uses — CLAUDE.md, AGENTS.md, or both — see
step 3 below. (It will also install the model-right-sizer plugin itself,
if the agent it points at isn't already discoverable — see step 2 below —
but that's making its own prerequisite true, not scope creep.) It does not
install a broader development process
(no worktree discipline, no review pipeline, no ticket reconciliation) —
those belong to whatever flow your own org already runs, if any. This
mandate is scoped narrowly on purpose so any repo, in any org, can adopt it
independent of everything else.
It is the companion to
model-right-sizer.md: that file is the
portable agent; this skill is the portable mandate to use it. Both are
meant to be dropped (or submoduled + composed, per the plugin README) into a
target repo's Claude tooling — this skill is not something you run against
this repo, it's something you run in the repo you want to onboard.
Not every keystroke deserves a blueprint — a one-line clarifying question
doesn't spend meaningful model budget. Scope "every turn" to: any turn
where the assistant is about to do non-trivial work — write or edit code or
docs, dispatch a sub-agent, run a multi-step tool chain, or otherwise spend a
real slice of model reasoning. Trivial conversational turns are exempt, and
model-right-sizer already scales its own output to the size of the task
(one-line skip for a tiny change, full blueprint/report for a substantial
one) — see model-right-sizer.md's "Your output shape" section. Don't fight
that scaling by forcing a full blueprint on every micro-edit.
Confirm the target. This skill always targets the current repo — the one the user wants onboarded — never a copy elsewhere.
Check the agent — and the dry-run skill — are actually discoverable,
and install what's missing. The mandate's "before" hook (step 3 below)
now invokes model-right-sizer-dryrun directly, not just the agent, so
both need to resolve. Look for model-right-sizer.md somewhere your
tooling reads agent personas from (e.g. .claude/agents/model-right-sizer.md,
or a plugin's agents/model-right-sizer.md) and for
model-right-sizer-dryrun somewhere it reads skills from. If either is
not there:
/plugin marketplace add cloudzero/cloudzero-claude-marketplace
/plugin install model-right-sizer@cloudzero
Do not run these without confirming first — installing a plugin is a
change to the user's environment, not just this repo. This installs the
agent and both companion skills (model-right-sizer-dryrun,
model-right-sizer-install) together. Then re-check discoverability —
the plugin's agents/model-right-sizer.md and
skills/model-right-sizer-dryrun/ should now resolve.plugins/model-right-sizer/agents/model-right-sizer.md into
.claude/agents/ and
plugins/model-right-sizer/skills/model-right-sizer-dryrun/ into
.claude/skills/ (both from
https://github.com/cloudzero/cloudzero-claude-marketplace) in this
repo, or follow the plugin README's submodule + compose pattern if they
want it to stay upgradeable independently. If only the agent gets
copied and not the skill, say so explicitly in the report — the
mandate's "before" hook would then be pointing at a skill that doesn't
exist.Detect which file(s) to target: CLAUDE.md, AGENTS.md, or both.
Look in the repo root for each. Do not assume — check for both, every
time, since a repo can adopt either convention (or migrate between them)
independently of this skill.
AGENTS.md exists (no CLAUDE.md) → target AGENTS.md
alone. Do not also create a CLAUDE.md — the repo has already opted
into the AGENTS.md convention, respect that instead of adding a
second, redundant instructions file it didn't ask for.CLAUDE.md exists (no AGENTS.md) → target CLAUDE.md
alone, as before.CLAUDE.md (create it fresh, with just
this block). This is the same default this skill has always had;
AGENTS.md isn't invented as a target unless the repo already has
one.Say in your step 6 report which file(s) you found and which you targeted — don't let this decision happen silently.
Insert or refresh the marker-delimited block below in every file targeted in step 3 — append-only, per file: create the file if it's the target and doesn't exist yet (the "neither exists" case above); if a targeted file already exists, replace only the text between the markers in that file, leaving everything else in it untouched. The block's content is identical regardless of which file(s) it lands in.
<!-- model-right-sizer-mandate:begin (managed by model-right-sizer-install — do not hand-edit; re-run the skill to refresh) -->
## MANDATE — consult model-right-sizer before and after every substantive turn
**Before starting any substantive task** in this repo (writing or editing
code or docs, dispatching a sub-agent, running a multi-step tool chain),
run the **`model-right-sizer-dryrun`** skill against the task at hand (its
plain-English description as the intent). That returns a **right-sizing
blueprint** — a single JSON object, schema-conformant per
`model-right-sizer`'s `schemas/blueprint.schema.json` — saying which model
and effort level each piece of the work should run on, weighing
effectiveness need against efficiency pressure and difficulty, biased
toward the smallest model that clears the bar. Hand that JSON blueprint to
the orchestrating session/agent driving this task, and route every
sub-agent or model dispatch by its `blueprint_rows` / `work_routing_map`
picks rather than by default or gut feel.
**After the task closes**, consult the `model-right-sizer` agent directly
for a **model-usage report** (this pass runs the agent itself, not the
dry-run skill — there's a real "actual" to reconcile against now, which a
dry run never has): recommended vs. actual model per stage, the reasoning
behind each pick, and an order-of-magnitude cost estimate — so model spend
on this repo stays as measurable and intentional as any other resource it
consumes.
Both passes scale to the size of the task — a trivial turn gets a one-line
skip, a substantial one gets the full blueprint (Pass A) or report (Pass
B). `model-right-sizer` is **read-only**: it reports and recommends, it
never edits files or makes the call for you — you (or your own tooling)
apply its picks.
This mandate is intentionally narrow — model selection only. It does not
presume any particular development process. If this repo already follows
a broader flow (design review, code review, integration testing, etc.),
fold these two consults into that flow's existing bookends rather than
running them as a separate, disconnected step.
Do not edit this block by hand — re-run the `model-right-sizer-install`
skill (source: https://github.com/cloudzero/cloudzero-claude-marketplace)
to refresh it, so the wording stays traceable to one source instead of
drifting per repo.
<!-- model-right-sizer-mandate:end -->
Verify, don't assume. Re-read every file targeted in step 3 after writing and confirm the markers and content landed as expected in each one — don't declare success on the strength of only one when two were targeted.
Report what happened: which file(s) you found (CLAUDE.md,
AGENTS.md, or both) and targeted; created vs. refreshed, per file; and
whether the agent and the dry-run skill were already present, freshly
installed via the plugin, or — if plugin-install wasn't available and
either is still missing — the one-line manual instruction to add it.
Some organizations run this same mandate as one bookend inside a much larger
process (design review → right-sizing → build → code review → integration →
…). That full process is out of scope for this repo by design —
model-right-sizer ships as a portable, single-agent core (see the plugin
README's scope discipline), and this skill mirrors that discipline: it
installs only the right-sizing mandate, worded generically enough to slot
into any org's existing process or stand alone with none. If you want to
layer your own organization's broader flow on top, write your own overlay
skill the same way the README's "Extending this agent for your own
organization" section suggests overlaying the agent file itself — don't fork
this skill's text to do it.
model-right-sizer.md — the agent
this mandate points at, and the sole source for Pass B (the usage report).model-right-sizer-dryrun — the
skill this mandate's "before" hook now runs directly to produce the JSON
blueprint; see its own file for what it returns and why.README.md — "Using it" / "Importing it into another
repo without duplicating it" — how to get the agent file itself into a
target repo, the same pattern this skill's file follows.What SKILL.md sets; muted values are Claude Code's defaults
11 skills in this plugin
/model-right-sizer-auditOne-shot, PER-CALL-SITE audit of a repo's EXISTING LLM calls — every place code invokes a model (an SDK/API call, a sub-agent dispatch, an agent frontmatter definition), decomposed by INTENT into the distinct jobs it does, never a grep hit on a model name and never one candidate per file. A skill pinned by one static `model:` key still gets its steps split by intent when severable under Claude Code's per-turn model binding. DELEGATES each call to `model-right-sizer-dryrun` (never re-implements its scoring) and merges results into ONE schema-conformant JSON blueprint committed at the TARGET REPO'S ROOT via a PR — never a markdown table. Distinct from `model-right-sizer-dryrun` (invoke directly for one hypothetical task) and `model-right-sizer-install` (the standing before/after mandate). Use when someone says "audit this repo's model calls", "right-size the models in <repo> per call site", "find every LLM call and right-size it", or "commit a model right-sizing blueprint for <repo>"./model-right-sizer-budget-guardThe while-work-is-in-flight companion to `model-right-sizer-dryrun`: once `work_routing_map[]` is real and being dispatched as sub-agents, the runbook for keeping two things honest — the status ledger (`status`/`status_updated_at`/`status_note` per row, flipped at every real transition) and the token-budget guard (checking real spend against `budget.token_ceiling`; once `budget_threshold.py`'s `threshold_crossed()` trips at `warning_threshold_pct`, sending `format_budget_warning()`'s string into that unit's next turn). Checks at turn boundaries with whatever usage the dispatch mechanism reports — never a fabricated live ticker. Only applies to rows actually dispatched, never design-time-only `blueprint_rows[]`, and never replaces Pass B's usage report. Use when someone says "dispatch the work-routing map", "run the budget guard while units are in flight", "update the status ledger for unit X", or "did unit X cross its warning threshold"./model-right-sizer-dryrunPreview the model-routing MAP for an intent without building anything. You give it a free-text INTENT — "build a CLI that…", "add a feature that…", "refactor X into Y" — and it invokes the `model-right-sizer` agent in BLUEPRINT-ONLY mode: decompose the work, score each piece, and emit a single schema-conformant JSON blueprint (task→model→effort→budget→ schema→confidence, per `schemas/blueprint.schema.json`), then STOP. No build, no file edits, no after-the-fact usage report — it is the what-would-this-cost / how-would-this-route preview lever, safe to run against any idea, and the JSON it returns is what an orchestrator parses to route dispatch. Read-only. Use when someone says "dry-run the right-sizer on …", "what's the map for …", "how would you route …", or "show me the blueprint for … before I build it"./model-right-sizer-holdout-tuningTune model-right-sizer's wording knobs (`eval/tuning/knobs.py`) against a REAL, already-measured build's actual token spend — not the synthetic benchmark `model-right-sizer-prompt-tuning` searches, nor a fresh build per candidate. Picks a task from `overfitting_guard.py`'s `HOLDOUT_TASKS` registry (real actual/budgeted pairs already recorded), dispatches 3 INDEPENDENT BLIND dry-runs per candidate (no calibration-ledger access), averages the budget across draws (single-draw noise can flip within/over-budget calls), maps to real actuals, scores via `classify_budget_adherence` + `score_candidate`, diagnoses the miss pattern, proposes ONE wording change, and re-runs to check improvement. n stays fixed per task — flags rather than silently continues once squeezing looks like overfitting. Use when someone says "tune the knobs against this blueprint/build", "iterate the dry run with no prior context against the real actuals", "keep tuning until N%", or "how close does a blind estimate get to the actual cost"./model-right-sizer-layer-ablationEmpirically measure what each of model-right-sizer's four research-grounded citation layers (Token Economics, IBPO, BudgetThinker, Speculative Decoding) actually does to its blueprints — instead of trusting the citations alone. Renders layer-ablated variants (any of the 16 layer subsets), runs a fixed six-task benchmark through each variant's Pass A blueprint, and for a scoped subset actually executes the recommended build and scores whether real effort stayed within the predicted budget (wrapping `classify_budget_adherence`). Reports each layer's effect in ISOLATION vs. a zero-layer baseline, and every COMBINATION across the full 16-subset grid, so synergy or redundancy is visible, not assumed away. Read-mostly: writes only a scratch directory and a final report, never `agents/model-right-sizer.md`. Use when someone says "does the Token Economics layer actually change anything", "ablate the research layers", "run the layer-ablation study", or "audit model-right-sizer's citations empirically"./model-right-sizer-prompt-tuningTune the exact WORDING of model-right-sizer's four already-shipped research-grounded layers to maximize real-execution accuracy (effort stayed within budget, per `classify_budget_adherence`) — not whether to include a layer (see `model-right-sizer-layer-ablation`), but how an included layer should be phrased. Runs a discrete coordinate-ascent search (the finite-difference analog of gradient descent for prose) over four wording knobs in `eval/tuning/knobs.py`, each anchored at one spot in the shipped agent text plausibly moving the accuracy ratio: `token_ceiling` margin, how hard the effort dial leans down under difficulty-uncertainty, and the calibration/adherence knobs. Read-mostly: never edits the agent file directly, only proposes the winning wording as a diff to review. Use when someone says "tune model-right-sizer's wording for accuracy", "optimize the budget-ceiling wording", "run a gradient descent / hill-climbing search on the agent prompt", or "which wording maximizes budget-adherence accuracy".npx claudepluginhub cloudzero/cloudzero-claude-marketplace --plugin model-right-sizerOther plugins' skills for the same job