home / skills / anthropics / claude-code / claude-opus-4-5-migration

This skill migrates prompts and code to Opus 4.5 by updating model strings and handling prompt adjustments for known differences.

npx playbooks add skill anthropics/claude-code --skill claude-opus-4-5-migration

Review the files below or copy the command above to add this skill to your agents.

Files (3)
SKILL.md
4.6 KB
---
name: claude-opus-4-5-migration
description: Migrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5. Use when the user wants to update their codebase, prompts, or API calls to use Opus 4.5. Handles model string updates and prompt adjustments for known Opus 4.5 behavioral differences. Does NOT migrate Haiku 4.5.
---

# Opus 4.5 Migration Guide

One-shot migration from Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5.

## Migration Workflow

1. Search codebase for model strings and API calls
2. Update model strings to Opus 4.5 (see platform-specific strings below)
3. Remove unsupported beta headers
4. Add effort parameter set to `"high"` (see `references/effort.md`)
5. Summarize all changes made
6. Tell the user: "If you encounter any issues with Opus 4.5, let me know and I can help adjust your prompts."

## Model String Updates

Identify which platform the codebase uses, then replace model strings accordingly.

### Unsupported Beta Headers

Remove the `context-1m-2025-08-07` beta header if present—it is not yet supported with Opus 4.5. Leave a comment noting this:

```python
# Note: 1M context beta (context-1m-2025-08-07) not yet supported with Opus 4.5
```

### Target Model Strings (Opus 4.5)

| Platform | Opus 4.5 Model String |
|----------|----------------------|
| Anthropic API (1P) | `claude-opus-4-5-20251101` |
| AWS Bedrock | `anthropic.claude-opus-4-5-20251101-v1:0` |
| Google Vertex AI | `claude-opus-4-5@20251101` |
| Azure AI Foundry | `claude-opus-4-5-20251101` |

### Source Model Strings to Replace

| Source Model | Anthropic API (1P) | AWS Bedrock | Google Vertex AI |
|--------------|-------------------|-------------|------------------|
| Sonnet 4.0 | `claude-sonnet-4-20250514` | `anthropic.claude-sonnet-4-20250514-v1:0` | `claude-sonnet-4@20250514` |
| Sonnet 4.5 | `claude-sonnet-4-5-20250929` | `anthropic.claude-sonnet-4-5-20250929-v1:0` | `claude-sonnet-4-5@20250929` |
| Opus 4.1 | `claude-opus-4-1-20250422` | `anthropic.claude-opus-4-1-20250422-v1:0` | `claude-opus-4-1@20250422` |

**Do NOT migrate**: Any Haiku models (e.g., `claude-haiku-4-5-20251001`).

## Prompt Adjustments

Opus 4.5 has known behavioral differences from previous models. **Only apply these fixes if the user explicitly requests them or reports a specific issue.** By default, just update model strings.

**Integration guidelines**: When adding snippets, don't just append them to prompts. Integrate them thoughtfully:
- Use XML tags (e.g., `<code_guidelines>`, `<tool_usage>`) to organize additions
- Match the style and structure of the existing prompt
- Place snippets in logical locations (e.g., coding guidelines near other coding instructions)
- If the prompt already uses XML tags, add new content within appropriate existing tags or create consistent new ones

### 1. Tool Overtriggering

Opus 4.5 is more responsive to system prompts. Aggressive language that prevented undertriggering on previous models may now cause overtriggering.

**Apply if**: User reports tools being called too frequently or unnecessarily.

**Find and soften**:
- `CRITICAL:` → remove or soften
- `You MUST...` → `You should...`
- `ALWAYS do X` → `Do X`
- `NEVER skip...` → `Don't skip...`
- `REQUIRED` → remove or soften

Only apply to tool-triggering instructions. Leave other uses of emphasis alone.

### 2. Over-Engineering Prevention

Opus 4.5 tends to create extra files, add unnecessary abstractions, or build unrequested flexibility.

**Apply if**: User reports unwanted files, excessive abstraction, or unrequested features. Add the snippet from `references/prompt-snippets.md`.

### 3. Code Exploration

Opus 4.5 can be overly conservative about exploring code, proposing solutions without reading files.

**Apply if**: User reports the model proposing fixes without inspecting relevant code. Add the snippet from `references/prompt-snippets.md`.

### 4. Frontend Design

**Apply if**: User requests improved frontend design quality or reports generic-looking outputs.

Add the frontend aesthetics snippet from `references/prompt-snippets.md`.

### 5. Thinking Sensitivity

When extended thinking is not enabled (the default), Opus 4.5 is particularly sensitive to the word "think" and its variants. Extended thinking is enabled only if the API request contains a `thinking` parameter.

**Apply if**: User reports issues related to "thinking" while extended thinking is not enabled (no `thinking` parameter in request).

Replace "think" with alternatives like "consider," "believe," or "evaluate."

## Reference

See `references/prompt-snippets.md` for the full text of each snippet to add.

See `references/effort.md` for configuring the effort parameter (only if user requests it).

Overview

This skill migrates prompts, model strings, and related API calls from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5. It automates code searches and replacements, removes unsupported beta headers, and prepares prompts for known Opus 4.5 behavioral differences. It does not migrate Haiku models.

How this skill works

The skill scans your codebase for platform-specific model strings and replaces them with the correct Opus 4.5 identifiers for Anthropic, AWS Bedrock, Google Vertex AI, or Azure. It removes unsupported 1M context beta headers, adds the recommended effort parameter, and can optionally apply targeted prompt adjustments for known behavioral differences when you request them. Finally, it summarizes all changes and gives a short troubleshooting follow-up message.

When to use it

  • You need to upgrade model strings in an existing codebase from Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5.
  • You want an automated pass to remove unsupported beta headers and add the effort parameter.
  • You want a safe default migration that updates only model identifiers by default.
  • You want optional prompt tuning for Opus 4.5 behavioral differences when encountering issues.

Best practices

  • Back up your codebase or work on a feature branch before running the migration.
  • Run the migration first with model-string-only mode, then request prompt adjustments only if you see issues.
  • Leave a comment where the unsupported context-1m beta header is removed to document the change.
  • Integrate any prompt snippets into existing XML tags or prompt structure rather than appending them blindly.
  • Test end-to-end flows (tooling, file writes, UI generation) after migration to catch overtriggering or over-engineering.

Example use cases

  • Replace Anthropic API model strings like claude-sonnet-4-20250514 with claude-opus-4-5-20251101 across a repo.
  • Update AWS Bedrock or Google Vertex AI model identifiers to their Opus 4.5 equivalents.
  • Remove context-1m-2025-08-07 beta headers and add a comment noting the unsupported header.
  • Enable effort:"high" in API calls to take advantage of Opus 4.5 effort tuning.
  • Apply targeted prompt edits to reduce tool overtriggering after observing excessive tool calls.

FAQ

Will this migrate Haiku models?

No. This migration explicitly excludes Haiku models; only Sonnet 4.0/4.5 and Opus 4.1 are migrated to Opus 4.5.

Do you change prompts by default?

By default the tool updates model strings and required headers. Prompt behavior changes are applied only when you request them or report specific issues.