spacehub

surshar / claude-code

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

Built by Anthropic · github.com/anthropics

Claude Opus 4.5 migration pluginBrowse files
William Hu authored on Nov 24, 2025 parent eb39543 · commit a194a9d41b73
6 changed files+322 -0compared with eb39543
M.claude-plugin/marketplace.json
Aplugins/claude-opus-4-5-migration/.claude-plugin/plugin.json
Aplugins/claude-opus-4-5-migration/README.md
Aplugins/claude-opus-4-5-migration/skills/claude-opus-4-5-migration/SKILL.md
Aplugins/claude-opus-4-5-migration/skills/claude-opus-4-5-migration/references/effort.md
Aplugins/claude-opus-4-5-migration/skills/claude-opus-4-5-migration/references/prompt-snippets.md
@@ -134,6 +134,17 @@
134134 },
135135 "source": "./plugins/plugin-dev",
136136 "category": "development"
137+ },
138+ {
139+ "name": "claude-opus-4-5-migration",
140+ "description": "Migrate your code and prompts from Sonnet 4.x and Opus 4.1 to Opus 4.5.",
141+ "version": "1.0.0",
142+ "author": {
143+ "name": "William Hu",
144+ "email": "whu@anthropic.com"
145+ },
146+ "source": "./plugins/claude-opus-4-5-migration",
147+ "category": "development"
137148 }
138149 ]
139150 }
@@ -1,0 +1,9 @@
1+{
2+ "name": "claude-opus-4-5-migration",
3+ "version": "1.0.0",
4+ "description": "Migrate your code and prompts from Sonnet 4.x and Opus 4.1 to Opus 4.5.",
5+ "author": {
6+ "name": "William Hu",
7+ "email": "whu@anthropic.com"
8+ }
9+}
@@ -1,0 +1,21 @@
1+# Claude Opus 4.5 Migration Plugin
2+
3+Migrate your code and prompts from Sonnet 4.x and Opus 4.1 to Opus 4.5.
4+
5+## Overview
6+
7+This skill updates your code and prompts to be compatible with Opus 4.5. It automates the migration process, handling model strings, beta headers, and other configuration details. If you run into any issues with Opus 4.5 after migration, you can continue using this skill to adjust your prompts.
8+
9+## Usage
10+
11+```
12+"Migrate my codebase to Opus 4.5"
13+```
14+
15+## Learn More
16+
17+Refer to our [prompting guide](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-4-best-practices) for best practices on prompting Claude models.
18+
19+## Authors
20+
21+William Hu (whu@anthropic.com)
@@ -1,0 +1,105 @@
1+---
2+name: claude-opus-4-5-migration
3+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.
4+---
5+
6+# Opus 4.5 Migration Guide
7+
8+One-shot migration from Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5.
9+
10+## Migration Workflow
11+
12+1. Search codebase for model strings and API calls
13+2. Update model strings to Opus 4.5 (see platform-specific strings below)
14+3. Remove unsupported beta headers
15+4. Add effort parameter set to `"high"` (see `references/effort.md`)
16+5. Summarize all changes made
17+6. Tell the user: "If you encounter any issues with Opus 4.5, let me know and I can help adjust your prompts."
18+
19+## Model String Updates
20+
21+Identify which platform the codebase uses, then replace model strings accordingly.
22+
23+### Unsupported Beta Headers
24+
25+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:
26+
27+```python
28+# Note: 1M context beta (context-1m-2025-08-07) not yet supported with Opus 4.5
29+```
30+
31+### Target Model Strings (Opus 4.5)
32+
33+| Platform | Opus 4.5 Model String |
34+|----------|----------------------|
35+| Anthropic API (1P) | `claude-opus-4-5-20251101` |
36+| AWS Bedrock | `anthropic.claude-opus-4-5-20251101-v1:0` |
37+| Google Vertex AI | `claude-opus-4-5@20251101` |
38+| Azure AI Foundry | `claude-opus-4-5-20251101` |
39+
40+### Source Model Strings to Replace
41+
42+| Source Model | Anthropic API (1P) | AWS Bedrock | Google Vertex AI |
43+|--------------|-------------------|-------------|------------------|
44+| Sonnet 4.0 | `claude-sonnet-4-20250514` | `anthropic.claude-sonnet-4-20250514-v1:0` | `claude-sonnet-4@20250514` |
45+| Sonnet 4.5 | `claude-sonnet-4-5-20250929` | `anthropic.claude-sonnet-4-5-20250929-v1:0` | `claude-sonnet-4-5@20250929` |
46+| Opus 4.1 | `claude-opus-4-1-20250422` | `anthropic.claude-opus-4-1-20250422-v1:0` | `claude-opus-4-1@20250422` |
47+
48+**Do NOT migrate**: Any Haiku models (e.g., `claude-haiku-4-5-20251001`).
49+
50+## Prompt Adjustments
51+
52+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.
53+
54+**Integration guidelines**: When adding snippets, don't just append them to prompts. Integrate them thoughtfully:
55+- Use XML tags (e.g., `<code_guidelines>`, `<tool_usage>`) to organize additions
56+- Match the style and structure of the existing prompt
57+- Place snippets in logical locations (e.g., coding guidelines near other coding instructions)
58+- If the prompt already uses XML tags, add new content within appropriate existing tags or create consistent new ones
59+
60+### 1. Tool Overtriggering
61+
62+Opus 4.5 is more responsive to system prompts. Aggressive language that prevented undertriggering on previous models may now cause overtriggering.
63+
64+**Apply if**: User reports tools being called too frequently or unnecessarily.
65+
66+**Find and soften**:
67+- `CRITICAL:` → remove or soften
68+- `You MUST...` → `You should...`
69+- `ALWAYS do X` → `Do X`
70+- `NEVER skip...` → `Don't skip...`
71+- `REQUIRED` → remove or soften
72+
73+Only apply to tool-triggering instructions. Leave other uses of emphasis alone.
74+
75+### 2. Over-Engineering Prevention
76+
77+Opus 4.5 tends to create extra files, add unnecessary abstractions, or build unrequested flexibility.
78+
79+**Apply if**: User reports unwanted files, excessive abstraction, or unrequested features. Add the snippet from `references/prompt-snippets.md`.
80+
81+### 3. Code Exploration
82+
83+Opus 4.5 can be overly conservative about exploring code, proposing solutions without reading files.
84+
85+**Apply if**: User reports the model proposing fixes without inspecting relevant code. Add the snippet from `references/prompt-snippets.md`.
86+
87+### 4. Frontend Design
88+
89+**Apply if**: User requests improved frontend design quality or reports generic-looking outputs.
90+
91+Add the frontend aesthetics snippet from `references/prompt-snippets.md`.
92+
93+### 5. Thinking Sensitivity
94+
95+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.
96+
97+**Apply if**: User reports issues related to "thinking" while extended thinking is not enabled (no `thinking` parameter in request).
98+
99+Replace "think" with alternatives like "consider," "believe," or "evaluate."
100+
101+## Reference
102+
103+See `references/prompt-snippets.md` for the full text of each snippet to add.
104+
105+See `references/effort.md` for configuring the effort parameter (only if user requests it).
@@ -1,0 +1,70 @@
1+# Effort Parameter (Beta)
2+
3+**Add effort set to `"high"` during migration.** This is the default configuration for best performance with Opus 4.5.
4+
5+## Overview
6+
7+Effort controls how eagerly Claude spends tokens. It affects all tokens: thinking, text responses, and function calls.
8+
9+| Effort | Use Case |
10+|--------|----------|
11+| `high` | Best performance, deep reasoning (default) |
12+| `medium` | Balance of cost/latency vs. performance |
13+| `low` | Simple, high-volume queries; significant token savings |
14+
15+## Implementation
16+
17+Requires beta flag `effort-2025-11-24` in API calls.
18+
19+**Python SDK:**
20+```python
21+response = client.messages.create(
22+ model="claude-opus-4-5-20251101",
23+ max_tokens=1024,
24+ betas=["effort-2025-11-24"],
25+ output_config={
26+ "effort": "high" # or "medium" or "low"
27+ },
28+ messages=[...]
29+)
30+```
31+
32+**TypeScript SDK:**
33+```typescript
34+const response = await client.messages.create({
35+ model: "claude-opus-4-5-20251101",
36+ max_tokens: 1024,
37+ betas: ["effort-2025-11-24"],
38+ output_config: {
39+ effort: "high" // or "medium" or "low"
40+ },
41+ messages: [...]
42+});
43+```
44+
45+**Raw API:**
46+```json
47+{
48+ "model": "claude-opus-4-5-20251101",
49+ "max_tokens": 1024,
50+ "anthropic-beta": "effort-2025-11-24",
51+ "output_config": {
52+ "effort": "high"
53+ },
54+ "messages": [...]
55+}
56+```
57+
58+## Effort vs. Thinking Budget
59+
60+Effort is independent of thinking budget:
61+
62+- High effort + no thinking = more tokens, but no thinking tokens
63+- High effort + 32k thinking = more tokens, but thinking capped at 32k
64+
65+## Recommendations
66+
67+1. First determine effort level, then set thinking budget
68+2. Best performance: high effort + high thinking budget
69+3. Cost/latency optimization: medium effort
70+4. Simple high-volume queries: low effort
@@ -1,0 +1,106 @@
1+# Prompt Snippets for Opus 4.5
2+
3+Only apply these snippets if the user explicitly requests them or reports a specific issue. By default, the migration should only update model strings.
4+
5+## 1. Tool Overtriggering
6+
7+**Problem**: Prompts designed to reduce undertriggering on previous models may cause Opus 4.5 to overtrigger.
8+
9+**When to add**: User reports tools being called too frequently or unnecessarily.
10+
11+**Solution**: Replace aggressive language with normal phrasing.
12+
13+| Before | After |
14+|--------|-------|
15+| `CRITICAL: You MUST use this tool when...` | `Use this tool when...` |
16+| `ALWAYS call the search function before...` | `Call the search function before...` |
17+| `You are REQUIRED to...` | `You should...` |
18+| `NEVER skip this step` | `Don't skip this step` |
19+
20+## 2. Over-Engineering Prevention
21+
22+**Problem**: Opus 4.5 may create extra files, add unnecessary abstractions, or build unrequested flexibility.
23+
24+**When to add**: User reports unwanted files, excessive abstraction, or unrequested features.
25+
26+**Snippet to add to system prompt**:
27+
28+```
29+- Avoid over-engineering. Only make changes that are directly requested or clearly necessary. Keep solutions simple and focused.
30+- Don't add features, refactor code, or make "improvements" beyond what was asked. A bug fix doesn't need surrounding code cleaned up. A simple feature doesn't need extra configurability.
31+- Don't add error handling, fallbacks, or validation for scenarios that can't happen. Trust internal code and framework guarantees. Only validate at system boundaries (user input, external APIs). Don't use backwards-compatibility shims when you can just change the code.
32+- Don't create helpers, utilities, or abstractions for one-time operations. Don't design for hypothetical future requirements. The right amount of complexity is the minimum needed for the current task. Reuse existing abstractions where possible and follow the DRY principle.
33+```
34+
35+## 3. Code Exploration
36+
37+**Problem**: Opus 4.5 may propose solutions without reading code or make assumptions about unread files.
38+
39+**When to add**: User reports the model proposing fixes without inspecting relevant code.
40+
41+**Snippet to add to system prompt**:
42+
43+```
44+ALWAYS read and understand relevant files before proposing code edits. Do not speculate about code you have not inspected. If the user references a specific file/path, you MUST open and inspect it before explaining or proposing fixes. Be rigorous and persistent in searching code for key facts. Thoroughly review the style, conventions, and abstractions of the codebase before implementing new features or abstractions.
45+```
46+
47+## 4. Frontend Design Quality
48+
49+**Problem**: Default frontend outputs may look generic ("AI slop" aesthetic).
50+
51+**When to add**: User requests improved frontend design quality or reports generic-looking outputs.
52+
53+**Snippet to add to system prompt**:
54+
55+```xml
56+<frontend_aesthetics>
57+You tend to converge toward generic, "on distribution" outputs. In frontend design, this creates what users call the "AI slop" aesthetic. Avoid this: make creative, distinctive frontends that surprise and delight.
58+
59+Focus on:
60+- Typography: Choose fonts that are beautiful, unique, and interesting. Avoid generic fonts like Arial and Inter; opt instead for distinctive choices that elevate the frontend's aesthetics.
61+- Color & Theme: Commit to a cohesive aesthetic. Use CSS variables for consistency. Dominant colors with sharp accents outperform timid, evenly-distributed palettes. Draw from IDE themes and cultural aesthetics for inspiration.
62+- Motion: Use animations for effects and micro-interactions. Prioritize CSS-only solutions for HTML. Use Motion library for React when available. Focus on high-impact moments: one well-orchestrated page load with staggered reveals (animation-delay) creates more delight than scattered micro-interactions.
63+- Backgrounds: Create atmosphere and depth rather than defaulting to solid colors. Layer CSS gradients, use geometric patterns, or add contextual effects that match the overall aesthetic.
64+
65+Avoid generic AI-generated aesthetics:
66+- Overused font families (Inter, Roboto, Arial, system fonts)
67+- Clichéd color schemes (particularly purple gradients on white backgrounds)
68+- Predictable layouts and component patterns
69+- Cookie-cutter design that lacks context-specific character
70+
71+Interpret creatively and make unexpected choices that feel genuinely designed for the context. Vary between light and dark themes, different fonts, different aesthetics. You still tend to converge on common choices (Space Grotesk, for example) across generations. Avoid this: it is critical that you think outside the box!
72+</frontend_aesthetics>
73+```
74+
75+## 5. Thinking Sensitivity
76+
77+**Problem**: When extended thinking is not enabled (the default), Opus 4.5 is particularly sensitive to the word "think" and its variants.
78+
79+Extended thinking is not enabled by default. It is only enabled if the API request contains a `thinking` parameter:
80+```json
81+"thinking": {
82+ "type": "enabled",
83+ "budget_tokens": 10000
84+}
85+```
86+
87+**When to apply**: User reports issues related to "thinking" while extended thinking is not enabled (no `thinking` parameter in their request).
88+
89+**Solution**: Replace "think" with alternative words.
90+
91+| Before | After |
92+|--------|-------|
93+| `think about` | `consider` |
94+| `think through` | `evaluate` |
95+| `I think` | `I believe` |
96+| `think carefully` | `consider carefully` |
97+| `thinking` | `reasoning` / `considering` |
98+
99+## Usage Guidelines
100+
101+1. **Integrate thoughtfully** - Don't just append snippets; weave them into the existing prompt structure
102+2. **Use XML tags** - Wrap additions in descriptive tags (e.g., `<coding_guidelines>`, `<tool_behavior>`) that match or complement existing prompt structure
103+3. **Match prompt style** - If the prompt is concise, trim the snippet; if verbose, keep full detail
104+4. **Place logically** - Put coding snippets near other coding instructions, tool guidance near tool definitions, etc.
105+5. **Preserve existing content** - Insert snippets without removing functional content
106+6. **Summarize changes** - After migration, list all model string updates and prompt modifications made