SKILL.md
Anthropic Upgrade & Migration
Overview
Upgrade the Anthropic SDK to new versions and migrate between Claude model generations. Covers version checking, changelog review, model ID updates across the codebase, output comparison testing, and gradual rollout via environment variables.
SDK Upgrade
# Check current version
npm list @claude-ai/sdk
pip show anthropic
# Upgrade to latest
npm install @claude-ai/sdk@latest
pip install --upgrade anthropic
# Check changelog for breaking changes
#
Model Migration Checklist
When Anthropic releases new model versions:
- Read the model card — check for behavior changes, new capabilities
- Update model IDs — find and replace old IDs
# Find all model references in your codebase
grep -r "claude-" --include="*.ts" --include="*.py" --include="*.json" .
- Test with new model — run integration tests against both old and new
- Compare outputs — spot-check key prompts for quality regression
- Update max_tokens — new models may have different limits
- Gradual rollout — use env var to control model selection
// Environment-based model selection for safe rollout
const MODEL = process.env.CLAUDE_MODEL || 'claude-sonnet-4-20250514';
const message = await client.messages.create({
model: MODEL,
max_tokens: 1024,
messages,
});
Common Migration Issues
| Issue | Fix |
|---|---|
| Model ID not found (404) | Update to current model ID |
| Different output format | Adjust parsing — test with real prompts |
| Higher/lower token usage |
