migrate-config-to-opus-5
Migrate a Claude Code Config to Opus 5
Opus 5 changed what good config looks like. Config written for Opus 4.x often compensated for that era's failure modes (under-verification, under-delegation, under-triggering on instructions). Opus 5 inverts those defaults, so the old compensations now actively fight the model.
Ground rule: the harness (Claude Code's own system prompt) is re-tuned by Anthropic per model. Config should carry only what the harness can't know — the user's policies, environment facts, and preferences. Anything duplicating harness behavior is dead weight; anything compensating for a pre-Opus-5 failure mode is now harmful.
Step 0 — Scope interview (required, before touching anything)
Ask the user which surface to migrate, via AskUserQuestion:
- Global setup —
~/.claude: CLAUDE.md,rules/**,skills/**,commands/,agents/,settings.json(+ hooks), statusline script, plugin registrations. Affects every session on the machine (and, if the directory syncs via git, every machine). - This project — the cwd:
./CLAUDE.md,.claude/(settings, skills, agents, commands, rules), plus project scripts/CI workflows that embed Claude model IDs or API params.
If the user picked global and ~/.claude is a git repo shared across machines, every path fix must be machine-agnostic ($HOME, ~/, resolver scripts) — a literal home-dir path that is correct on this machine is silently wrong on the others.
In the same interview, ask one execution question: apply edits directly with granular commits (the default), or propose the full diff for review first. For project scope on a shared repo, apply the edits on a new branch off the repo's default branch (origin/main or equivalent, not the current checkout) and deliver them as a PR — matching this plugin's skill-doctor delivery rule.