/model-id-upgrade:claude-model-upgrade [directory ...]from model-id-upgrade
Scans code, configs, and prompts for stale Claude model IDs (Fable, Mythos, Opus, Sonnet, Haiku) and upgrades them after a new release. Read-only scan first, then approval gate, then edits.
Ships in model-id-upgrade. 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.
Read when SKILL.md points to them; scripts run unread.
Nothing changes before the approval gate in step 4.
Scan roots: $ARGUMENTS, or the current repository when empty. Scanning a home directory or several repos is fine when the user names them.
Fetch https://platform.claude.com/docs/en/about-claude/models/overview (WebFetch) and take each family's current Claude API ID from the comparison table; legacy models are listed below it. Cross-check the format rules at https://platform.claude.com/docs/en/about-claude/models/model-ids-and-versions:
claude-{name}-{major}[-{minor}] (claude-sonnet-4-6, claude-opus-5). A dateless ID is a pinned snapshot, not an alias.claude-{name}-{major}-{minor}-YYYYMMDD; the short form (claude-haiku-4-5) is an alias to it. Both count as current when the dated model is still the family's latest.anthropic. prefix, optional us./eu./global. region prefix; dated models end -v1:0, newer ones drop the suffix.@YYYYMMDD (claude-haiku-4-5@20251001); newer ones match the API form.Also fetch https://platform.claude.com/docs/en/about-claude/model-deprecations and https://platform.claude.com/docs/en/about-claude/pricing. A stale model at or near its retirement date makes its runtime callers urgent - list them first in the report. Quote the current model's rates from the pricing page, because a runtime move changes cost.
A run aimed at one family ("especially Haiku") still scans every family, but classifies and edits only that one; report the others' TARGET counts and offer a follow-up.
Done when: you have stated one current ID per family, with its rates and any retirement date for the models it replaces. Ask the user only if the docs offer two candidates for a family.
Run the scanner once per family from a scratch directory (it writes scan-<family>.tsv to --out, default the working directory):
uv run "${CLAUDE_SKILL_DIR}/scripts/scan.py" sonnet <current-sonnet-id> <root>... [--exclude GLOB] [--record REGEX]
It needs ripgrep (rg). It splits hits into TARGET and RECORD (rule below) and skips, automatically: the current ID in every platform form, its gateway form (anthropic/claude-sonnet-5.5), its prose name ("Sonnet 5.5", also regex-escaped), and truncated matches ending in - or . (an ID built from a template variable). Eyeball the odd remainder, for example a bare claude-sonnet CLI alias.
It also prints a Made-up or malformed ID table, and the TSV's fifth column says why: a date on a 4.6+ model, a snapshot date that never shipped, the wrong name order for 3.x versus 4+, a dotted API ID, or -v1 on a 4.6+ Bedrock ID. Put every TARGET row from that table in the report. KNOWN_DATED in the scanner lists the real pre-4.6 snapshots; later models are dateless, so it should need no new entries. A version that never shipped at all (claude-sonnet-4-7) passes this check - compare it with the docs' model list.
Done when: every family has a TSV and a TARGET count.
RECORD - never rewrite. Rewriting a record falsifies history or gets overwritten upstream: changelogs and release notes, logs, transcripts and session stores (~/.claude/projects, ~/.claude.json), backups and archives, caches, telemetry snapshots, generated reports, and third-party trees that update themselves (plugin caches, vendored code, site-packages). The scanner classes these by path; anything else historical that it misses, reclassify by hand.
TARGET - candidates for editing. Instructions and code that choose a model going forward: skills, agents, commands, prompts, templates, examples and integration docs; runtime defaults, config files, docker-compose.yml, environment templates, and test fixtures that pass an ID through.
Extend the exclusions. Add a path regex per line to ~/.config/claude-model-upgrade/ignore (or pass --ignore-file) to class a path as RECORD on every run; use --exclude GLOB to skip a tree entirely. Offer to add any new record class you find to that file.
Leave, but list in the report:
"model": "sonnet" - not stale.Edit rules:
us.anthropic.claude-sonnet-4-5-20250929-v1:0 becomes us.anthropic.claude-sonnet-5-5.claude-sonnet-4-6-20250414), a wrong snapshot date (claude-sonnet-4-5-20250514; the real one is -20250929), the wrong name order (claude-haiku-3-5 for claude-3-5-haiku, claude-4-sonnet), a dotted API ID (claude-sonnet-5.5 without anthropic/). In RECORD files, report them and leave them.SONNET_3_5, SONNET_4) get renamed and the obsolete duplicate removed, not just re-valued.- or . (${VAR:-claude-sonnet-5}) slips past word-boundary regexes; the leftover re-scan in step 5 catches it.sed on macOS needs sed -i ''.Done when: every hit is classed RECORD, TARGET or leave-and-list.
Print, as tables in the reply:
| Family | Current ID | Stale variants found | Files to edit | Files skipped |
|---|
Then per repo: repo | branch | files | already dirty?, marking runtime-code files (behaviour and cost change), directories that are not git repos, and repos on a non-default branch. Then the skipped items with the reason.
Ask with AskUserQuestion:
A new ID in runtime code is an API migration, not a rename - say so when the user picks runtime code. Step 5 covers what to check.
Wait for both answers. "Report only" ends here. The answer authorises edits in the listed repos and no others.
https://platform.claude.com/docs/en/about-claude/models/migration-guide), because an ID-only swap can break the call. Sampling parameters, assistant prefills, thinking configuration, forced tool_choice and max_tokens sizing have each changed between releases, and code that reads content[0].text can find a thinking block there. Fix the call in the same commit, as the guide directs for that model, and update any doc that explains the old parameter. Where the claude-api skill is installed, its migrate flow does this.git diff for runtime-code files and say which tests were not run.Per repo, following the repo's own commit conventions (AGENTS.md, CLAUDE.md):
git diff --name-only, leaving files that were dirty before you started.chore(models): move Claude model IDs to <ids> (fix(<scope>): ... when a runtime call changed), with a body saying what changed and why.git fetch and check whether the same change already landed upstream; drop duplicate edits..git stay uncommitted - say so.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
model-upgrade, model-migration, claude-models, bedrock, vertex
npx claudepluginhub henkisdabro/wookstar-claude-plugins --plugin model-id-upgradeOther plugins' skills for the same job