Home
cd ../playbooks
Developer ToolsBeginner

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.

5 minutes
By Anthropic (William Hu)Source
#claude-api#migration#model-strings#bedrock#vertex#official

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.

Or install from your terminal:
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 support

Get new playbooks like this one

One email a week with new Claude Code workflows. Free, like everything here.

No spam. Unsubscribe anytime.

README.md

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

  1. Searches the codebase for every model string and API call
  2. Identifies which platform each reference targets
  3. Looks up the current model ID from official docs — never from memory, since IDs and dates change
  4. Replaces strings in the platform-specific format
  5. Removes unsupported beta headers, leaving an explanatory comment instead of a silent deletion
  6. 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 with anthropic. 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

$Related Playbooks

Developer Tools

Claude Code Plugin Builder

End-to-end guided workflow for building Claude Code plugins — structure, commands, agents, skills, hooks, and MCP integration — with a validation checklist before you distribute.

15 minutes
Advanced
Developer Tools

CLAUDE.md Progressive Disclosurer

Slim down and restructure a bloated CLAUDE.md (or AGENTS.md) using progressive disclosure — move low-frequency detail to Level 2 references while keeping Level 1 lean, with zero information loss.

15 minutes
Intermediate
Developer Tools

Claude Usage Analyst

Analyze Claude Code token usage, cost, quota burn, model mix, and cache read/write using ccusage evidence — and explain in human terms why your quota got exhausted.

10 minutes
Beginner
Developer Tools

CLI Demo Generator

Generate professional animated CLI demos as GIFs using VHS terminal recordings — with self-bootstrapping setup, output filtering, and frame-level verification.

15 minutes
Intermediate
Developer Tools

Cloudflare Troubleshooting

Investigate and resolve Cloudflare issues with API-driven evidence — ERR_TOO_MANY_REDIRECTS, SSL mode mismatches, DNS, and proxy problems — instead of guessing.

15 minutes
Intermediate
Developer Tools

Changelog Generator

Generate release notes from git commits, updates, or feature lists

10 minutes
Advanced
Developer Tools

CI/CD Pipeline Generator

Create production-ready CI/CD pipeline configurations for GitHub Actions, GitLab CI, CircleCI, and Jenkins with deployment to Vercel, Netlify, or AWS.

15 minutes
Intermediate
Developer Tools

Codebase Documenter

Create comprehensive, beginner-friendly documentation for codebases including READMEs, architecture guides, API docs, and code comments.

10 minutes
Beginner
Developer Tools

Datadog Error Triage to PR

Take Datadog Error Tracking issues from raw occurrence counts to a reviewable, tested PR — a five-class bug taxonomy that filters out infra noise and deploy-skew before ranking, a recency premium that catches fresh regressions early, a mandatory approval gate before any fix is written, and a test-first fix workflow that generalizes past the one reported occurrence.

10 minutes
Advanced
Developer Tools

Documentation Review System

Mode-routed documentation review that diagnoses a page against its doc type and seven quality dimensions before touching a sentence, then picks the intervention level — maintenance, improve, rewrite, author, or strategy — that actually matches what's wrong.

10 minutes
Intermediate
Developer Tools

Designer's Figma-to-Production Workflow

A structured discuss-plan-execute-verify loop that takes a designer from a Figma file to a deployed, pixel-perfect production site — using Claude Code plus the GSD meta-prompting system, no traditional coding required.

20 minutes
Intermediate
Developer Tools

Distinctive Frontend Design

Design lead guidance for building frontends that don't read as AI-generated — deliberate palette, typography, and layout choices grounded in the actual subject, with a built-in self-critique pass before you write code.

5 minutes
Intermediate

Browse all Developer Tools playbooks →