Claude Model Migration Assistant
Migrate code and prompts between Claude models — update model strings, remove incompatible beta headers, and adjust prompts only for reported behavioral differences.
A new Claude model ships and your codebase has model strings scattered across a dozen files, each formatted differently for whatever platform touches it — and if you migrate blind, you'll also break the smaller model you deliberately kept for cost reasons.
Who it's for: developers upgrading Claude API integrations, teams managing multi-platform deployments (Bedrock, Vertex, Azure), engineers debugging behavioral differences after a model upgrade, anyone maintaining prompts across model versions
Example
"Migrate my codebase to the latest Opus model" → Every model string updated to the correct platform-specific format across Anthropic API, Bedrock, and Vertex, incompatible beta headers removed with an explanatory comment, and a summary of every file changed — prompts left untouched unless you report a specific issue
CLAUDE.md Template
New here? 3-minute setup guide → | Already set up? Copy the template below.
npx ccplaybooks add claude-model-migration# Claude Model Migration Assistant
## Your Role
You are my model migration specialist. When I move a codebase from one Claude model to another, you update model strings, remove incompatible beta headers, and — only when I ask — adjust prompts for the new model's behavioral differences.
## Migration Workflow
1. Search the codebase for model strings and API calls
2. Identify which platform the code targets (Anthropic API, Bedrock, Vertex, Foundry)
3. Replace model strings with the target model's platform-specific ID
4. Remove beta headers the target model doesn't supportGet new playbooks like this one
One email a week with new Claude Code workflows. Free, like everything here.
No spam. Unsubscribe anytime.
What This Does
Systematically updates model strings across your codebase when moving between Claude models — matching the correct format per platform (Anthropic API, AWS Bedrock, Google Vertex AI, Azure AI Foundry) — and removes beta headers the target model doesn't support. Prompt adjustments for behavioral differences are applied only when you explicitly ask or report a specific symptom, never preemptively.
Quick Start
Step 1: Navigate to Your Project
cd ~/your-project
Step 2: Download the Template
Click Download above, then:
mv ~/Downloads/CLAUDE.md ./
Step 3: Migrate
claude
Then ask: "Migrate my codebase to [target model]"
How It Works
- Searches the codebase for every model string and API call
- Identifies which platform each reference targets
- Looks up the current model ID from official docs — never from memory, since IDs and dates change
- Replaces strings in the platform-specific format
- Removes unsupported beta headers, leaving an explanatory comment instead of a silent deletion
- Summarizes every change made
Tips & Best Practices
- Scope the migration to what you asked for. If you say "migrate to Opus," a smaller model used elsewhere in the codebase for cost reasons is left alone — that's often a deliberate choice, not an oversight.
- Prompt adjustments are opt-in only. By default this only touches model strings. Behavioral tuning — softening aggressive trigger language, adding scope constraints, adjusting for the word "think" — is applied only when you report the specific symptom.
- Model IDs differ by platform format, not just by model: Anthropic API uses
claude-<model>-<version>-<date>, Bedrock prefixes withanthropic.and suffixes-v1:0, Vertex uses@<date>instead of a hyphen.
Common Prompt Adjustment Triggers
If you report one of these after migrating, the assistant knows what to adjust:
| Symptom | Fix |
|---|---|
| Tools firing too often | Soften aggressive trigger language (CRITICAL:, MUST, ALWAYS) |
| Extra files, unrequested abstractions | Add explicit scope constraints |
| Proposes fixes without reading code | Add instruction to explore before proposing |
| Generic-looking frontend output | Add specific aesthetic direction |
| Odd behavior around "think" | Replace with "consider" / "evaluate" (only relevant without extended thinking enabled) |
Limitations
- Requires you to specify (or have Claude look up) the correct target model ID — this playbook doesn't hardcode one, since IDs change with each release
- Doesn't touch model tiers you didn't mention, by design
- Prompt-adjustment snippets are meant to be integrated thoughtfully into existing prompt structure, not appended blindly