Opus 4 7 Migration logo

Opus 4 7 Migration

Community
Mathews-Tom
opus-4-7-migration

Scan a repository for Opus-4.6-era patterns that break or degrade on Opus 4.7 — fixed-budget Extended Thinking parameters, retired model ID aliases, and prompts that assumed verbose default output or eager sub-agent delegation. Produces a categorized report with file:line references and migration actions. Triggers on: "opus 4.7 migration", "migrate to opus 4.7", "audit for opus 4.7", "opus 4.6 to 4.7", "scan for budget_tokens", "find retired model IDs", "adapt repo to opus 4.7". NOT for implementing migrations — this skill identifies candidates.

Overview

PublisherMathews-Tom
Repositoryarmory
Skill nameopus-4-7-migration
Stars
318
Forks
47
Bundled files
5
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 5 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by Mathews-Tom on GitHub. Read the source before you install it.

Installation

Install the Opus 4 7 Migration AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Mathews-Tom/armory.git /tmp/armory
mkdir -p .claude/skills
cp -r /tmp/armory/skills/opus-4-7-migration .claude/skills/opus-4-7-migration
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Opus 4 7 Migration in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Opus 4 7 Migration on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Opus 4 7 Migration is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Opus 4.7 Migration Scanner

Identify patterns in a repository that break or silently degrade when the Anthropic platform routes to Opus 4.7. Produces a categorized report with file:line references so a maintainer can plan a scoped migration PR rather than chasing symptoms after the fact.

Reference Files

FileContentsLoad When
scripts/scan.pyRepo scanner producing a categorized findings reportAlways
references/migration-map.mdPer-category migration actions with before/after code samplesWhen a category returns findings

When to Run

  • Before upgrading a service or agent stack to Opus 4.7
  • When an existing Anthropic SDK integration starts returning errors after the platform rolled out 4.7
  • Periodically in a CI or weekly audit to prevent drift as the repo grows
  • Before publishing a package that downstream users will run against 4.7

Scope — What the Scanner Flags

The scanner is intentionally narrow. It reports three categories of deterministic patterns plus two heuristic categories that require manual review.

Category A — Fixed-budget Extended Thinking (deterministic)

Opus 4.7 does not support Extended Thinking with a fixed budget_tokens value. Code that still passes thinking={"type": "enabled", "budget_tokens": N} fails or is ignored depending on SDK version.

Patterns flagged:

  • Literal budget_tokens= in Python source
  • "budget_tokens" keys inside thinking={...} dict literals
  • .thinking.budget_tokens attribute references

Category B — Retired model ID aliases (deterministic)

Dated or superseded Claude model aliases that no longer map to the current model. Using them is not broken but defeats the platform's model routing.

Patterns flagged:

  • claude-opus-4-5, claude-opus-4-4, claude-opus-4-3, claude-opus-4-2, claude-opus-4-1, claude-opus-4-0
  • claude-sonnet-4-5, claude-sonnet-4-4, claude-sonnet-4-3, claude-sonnet-4-2, claude-sonnet-4-1, claude-sonnet-4-0
  • Dated format aliases: claude-*-20250514, claude-*-20241022, etc.
  • claude-3-* family (superseded)

Category C — Hardcoded model references outside config (deterministic)

Per the armory convention "model refs in config files only," any claude-* literal in .py / .ts / .js source code outside of config.toml, .env, or test-only sentinel strings is a candidate for extraction.

Category D — Opus-4.6-verbosity-assuming prompts (heuristic)

Opus 4.7 is less default-verbose than 4.6. Prompts that relied on Opus 4.6's eager output or never needed a depth cue may produce shorter-than-expected responses on 4.7.

Patterns flagged (review required):

  • Prompts requesting "detailed" or "comprehensive" output without matching length directive
  • Prompts that exceeded Opus 4.6's defaults by relying on implicit verbosity
  • Absence of first-turn specification completeness in agent prompts

Category E — Non-explicit parallel sub-agent dispatch (heuristic)

Opus 4.7 delegates more judiciously than 4.6. Agent prompts instructing "spawn in parallel" without the phrase "in a single message" or stating sub-task independence often serialize on 4.7.

Patterns flagged (review required):

  • Spawn + parallel language in agent prompts without "single message" or "independent"
  • subagent_type dispatches in loops or sequential blocks where parallelism was intended

Workflow

Phase 1: Run the Scanner

Execute:

bash
python3 scripts/scan.py /path/to/repo

Optional flags:

  • --categories A,B,C — run only deterministic categories (skip heuristics)
  • --exclude tests/,vendor/,node_modules/ — path exclusion
  • --format json — machine-readable output for CI integration
  • --exit-code — exit 1 if any findings (useful for pre-commit hooks)

Phase 2: Triage Findings

Group findings by category and sort by severity. Deterministic categories (A, B, C) are always actionable. Heuristic categories (D, E) require reading the surrounding prompt context before editing.

Priority order for a migration PR:

  1. Category A first — these either error out or silently do the wrong thing on 4.7
  2. Category B — rename to current logical aliases (claude-opus-4-7, claude-sonnet-4-6, claude-haiku-4-5) or to the platform's auto-routing name
  3. Category C — extract to config.toml per repo convention
  4. Category D, E — manual review; fix those that materially change behavior

Phase 3: Write the Migration PR

For each category with findings, apply the actions documented in references/migration-map.md. Prefer small PRs grouped by category over one large PR.

Pair the migration with:

  • Unit tests or integration tests that exercise the updated code paths on Opus 4.7
  • A short CHANGELOG entry noting "Opus 4.7 compatibility: removed budget_tokens from …"
  • A rollout plan if the service is production-critical (high/xhigh effort level on the targeted agents)

Output Format

The scanner produces a categorized report:

Opus 4.7 Migration Scan — /path/to/repo

Category A: Fixed-budget Extended Thinking       2 findings
  src/agent/reasoner.py:47   budget_tokens=8000
  src/agent/planner.py:112   thinking={"type": "enabled", "budget_tokens": 4096}

Category B: Retired model ID aliases             3 findings
  tests/test_agent.py:89     claude-opus-4-5
  config/dev.yaml:14         claude-sonnet-4-5
  src/llm/client.py:23       claude-sonnet-4-20250514

Category C: Hardcoded model refs outside config  1 finding
  scripts/bulk_process.py:8  DEFAULT_MODEL = "claude-sonnet-4-6"

Category D: Verbosity-assuming prompts          0 findings (heuristics disabled)
Category E: Non-explicit parallel dispatch      0 findings (heuristics disabled)

Total: 6 deterministic findings across 3 categories.

Error Handling

ConditionAction
Repo path does not existExit 2 with a clear error message
No Python / TypeScript / JS files in repoSkip Category A, C; continue with B, D, E on other file types
Regex error in scannerExit 3; file a bug with the offending pattern
False positives from Category B on changelogsExclude CHANGELOG.md by default; override with --include-changelogs

Limitations

  • Categories D and E are heuristic and will produce false positives on carefully written prompts. Review before changing.
  • The scanner does not exercise the code — it only does static pattern matching. A budget_tokens variable that is never passed to the Anthropic SDK will still be flagged.
  • The scanner cannot detect runtime dynamic model selection (e.g., model = config["models"][stage]) — those need integration tests, not static analysis.
  • Cross-language analysis is limited to Python, TypeScript, JavaScript, YAML, TOML, and Markdown. Other languages are skipped.

Related

  • rules/adaptive-thinking-control/RULE.md — prompt-level controls that replace fixed thinking budgets
  • skills/usage-audit/SKILL.md — broader context-bloat audit (complementary)
  • skills/mcp-to-skill/SKILL.md — MCP-to-skill conversion (relevant when migration surfaces heavy MCP usage)

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Opus 4 7 Migration AI skill do?

Scan a repository for Opus-4.6-era patterns that break or degrade on Opus 4.7 — fixed-budget Extended Thinking parameters, retired model ID aliases, and prompts that assumed verbose default output or eager sub-agent delegation. Produces a categorized report with file:line references and migration actions. Triggers on: "opus 4.7 migration", "migrate to opus 4.7", "audit for opus 4.7", "opus 4.6 to 4.7", "scan for budget_tokens", "find retired model IDs", "adapt repo to opus 4.7". NOT for implementing migrations — this skill identifies candidates.

Why use Opus 4 7 Migration on TypingMind?

Because you install it once and use it with any model. Opus 4 7 Migration is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Opus 4 7 Migration in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Mathews-Tom/armory/tree/main/skills/opus-4-7-migration. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Opus 4 7 Migration?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Opus 4 7 Migration?

As many as you like. As long as a model supports skills, you can use Opus 4 7 Migration with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Opus 4 7 Migration AI skill free?

Yes. It is published on GitHub by Mathews-Tom under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇