model-switch

model-switch is a skill for Claude Code from sonichi/sutando. It costs 80 tokens per session (4,641 once invoked), scanned A, original, MIT.

A command-line helper for changing the model used by a live coding-agent session through its existing terminal pane.

In plain words
What is it for?
It helps switch among supported model aliases or identifiers, optionally confirm the change, and record an accepted switch.
Why use it?
It checks that the session is suitable, avoids conflicting changes, and waits for the command-line interface to confirm the new model.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: mentions CLAUDE.md; mentions Claude Code; mentions Codex.

Good fit It helps switch among supported model aliases or identifiers, optionally confirm the change, and record an accepted switch.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sonichi/sutando/model-switch
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add sonichi/sutando --skill model-switch
Clone the repo
git clone --depth 1 https://github.com/sonichi/sutando

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for model-switch

README.md
[![agentmods](https://agentmods.dev/badge/skills/sonichi/sutando/model-switch/github.svg)](https://agentmods.dev/skills/sonichi/sutando/model-switch)
Your own site
<a href="https://agentmods.dev/skills/sonichi/sutando/model-switch"><img src="https://agentmods.dev/badge/skills/sonichi/sutando/model-switch/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for model-switch

Your own site · 80×15
<a href="https://agentmods.dev/skills/sonichi/sutando/model-switch"><img src="https://agentmods.dev/badge/skills/sonichi/sutando/model-switch.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 80 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,641 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00080 $0.04641
Opus 5.5 $0.00032 $0.01856
Sonnet 5.5 $0.00016 $0.00928
Haiku 4.5 $0.00008 $0.00464

Measured today against content hash 3a87cdbca37b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

model-switch scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

The scan reads SKILL.md. This mod also ships 4 executable files (scripts/model_card.py, scripts/pane-observe.sh, scripts/switch-model.sh, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/model-switch/SKILL.md · 217 lines

How it starts

The opening of the file, as written. The whole thing — 217 lines — stays where its author put it; the contents beside it link to each section on GitHub.

model-switch

scripts/switch-model.sh <model> [--dry-run] [--confirm] [--accept-timeout S] [--target core|worker] — <model> is one of the CLI's aliases (default|opus|sonnet|haiku|fable) or a claude-* id, either with an optional [1m] tag (default takes none); anything else is refused before any write (exit 2).

Order, under one lock per brain (<workspace>/state/.model-switch.lock, held across preflight, send, observation and record so overlapping switches linearize): (1) preflight through the shared sender (scripts/tmux-send-line.sh --dry-run --refuse-if-pending) — refuse on an unresolved runtime (exit 4) or when the core's input box carries text (exit 5), nothing written; exit 3 when no live pane exists; (2) count the Set model to lines already on screen (scripts/pane-observe.sh --count), so a stale acceptance from an earlier switch cannot pass as this one; (3) /model <model> + Enter through the shared sender; (4) wait for the CLI to accept: a NEW Set model to line is the switch. A [1m] switch the CLI answers without naming the context size (Claude Code 2.1.322: "Set model to Sonnet 5.5 and saved as your default for new sessions") counts only when that line is new and the runtime's settings.json was saved after the send and names exactly that model (pane-observe.sh --settings); a line stating another size never counts. A warm core (cached conversation) first shows "Yes, switch / No, go back"; with --confirm — pass it on an owner instruction, the flag is the authorization — the helper answers Enter once and waits again; without it the dialog is cancelled (Escape) and the script exits 6 with nothing recorded. No acceptance within --accept-timeout (default 20 s) is exit 8, nothing recorded. (5) Only then record <workspace>/state/model-switch.json {model, previous, previous_source, accepted, confirmed, ts, by, settings_read} — previous from the runtime's settings.json, else the last record (the CLI does not persist every /model pick, so the file can lag the live session), else null. The script never writes settings.json: Claude Code's own /model persists the choice there (measured 2026-09-04: the key changed hours into a session with no repo writer). Measured the same day on a live core: the send alone exited 0 while the CLI sat at the confirm dialog and the model had not changed — which is why the send is treated as initiation and the record follows acceptance.

--offline (core down). With no core process for the session there is no CLI to take /model, so --offline writes model into the runtime's settings.json (other keys kept) and records model-switch.json with accepted: false; the core starts on it at its next launch. It is refused (exit 9) while a claude process named for the session runs (the launcher's own test, from src/agent/claude/cli/session-launch.sh; the tmux server, whose argv also names the session, is not a core), and never overwrites a settings file it cannot read (exit 1). The launcher's provider-limit hold uses it for the owner's "switch to " reply.

Held for a provider limit (no flag needed). When no core process runs and src/core_limit_hold.py held reports a hold in force, a plain switch (the desktop's Model picker) takes the --offline write, releases the switch lock, and starts the core through src/agent/start-cli.sh (--launcher overrides it), whose limit gate lets a launch on another model family through. Exit 0: the core is starting on the new model; exit 10: the model is set but the launcher did not start the core (its reason and log path on stderr). Without a hold, a down core is never started from here.

A picker left on screen. Right before the send the script writes an attribution record through src/self_opened_gate.py (<workspace>/state/self-opened-gate.<session>.json) and clears it once the CLI accepted or the script cancelled its own dialog. On exit 8 the record stays, its claim window closed a few seconds after the exit (a /model the owner opens after that is never attributed to the script): if the send left a picker up (e.g. "Enter to set as default · s to use this session only · Esc to cancel"), the core supervisor (src/core-input-watch.py) presses Escape once after it has sat unchanged for MODEL_SWITCH_PICKER_DISMISS_AFTER_S (manifest default 300; env, then --picker-dismiss-after, override; 0 = never). A picker first seen outside the record's claim window, one someone is moving through, a picker with no record (a human opened it) and any usage/spend gate are never touched; until then the owner's chat card can still answer it.

Read the full file on GitHub · 217 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today Changed · +2 lines 3a87cdbca37b
  2. 3d ago Changed · +52 lines · +24 tokens per session a0d0e45258f1
  3. 5d ago Changed · +49 lines bcc4041ba98a
  4. 8d ago Changed · +47 lines 8bbed1217ae2
  5. 23d ago Changed · +10 lines 646555a3c736
  6. 27d ago Changed · +6 lines 99571fd8be54
  7. 1mo ago Changed · +1 lines ed4f3d043970
  8. 1mo ago Changed · +11 lines 03e6d82da0de
  9. 2mo ago First seen · 39 lines · 56 tokens per session scan A 9559005f70c6

Subscribe to this mod's changes

model-switch is a skill published in the GitHub repository sonichi/sutando (413 stars, last pushed today), licensed MIT. It adds 80 tokens to every session and 4,641 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.

Related

model-switch compared with skills from other repositories

model-switch next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
model-switchsonichi/sutandoSkill413todayMITA80Claude Code
gmailvellum-ai/vellum-assistantSkill1.5k6d agoMITA20Claude Code, Codex
app-buildervellum-ai/vellum-assistantSkill1.5k6d agoMITA162Claude Code, Codex
assistant-migrationvellum-ai/vellum-assistantSkill1.5k6d agoMITA90Claude Code, Codex
guardian-verify-setupvellum-ai/vellum-assistantSkill1.5k6d agoMITA26Claude Code, Codex
stripe-link-walletvellum-ai/vellum-assistantSkill1.5k6d agoMITA52Claude Code, Codex
vellum-memory-v2-migrationvellum-ai/vellum-assistantSkill1.5k6d agoMITA34Claude Code, Codex