migrate

migrate is a command for coding agents from halflength-ampleness75/claude-code-recipes. It costs 14 tokens per session (959 once invoked), scanned A, original, MIT.

A guided process for moving a codebase from one framework or programming language version to another. It first checks the current code, dependencies, breaking changes, and possible risks.

In plain words
What is it for?
Use it for upgrades such as React 18 to 19, JavaScript to TypeScript, Express to Fastify, Webpack to Vite, or Python 2 to 3.
Why use it?
Migrations can affect many files, settings, plugins, and integrations, making it easy to miss changes or break existing behavior. It organizes the work into reviewed steps.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/halflength-ampleness75/claude-code-recipes/migrate
Clone the repo
git clone --depth 1 https://github.com/halflength-ampleness75/claude-code-recipes

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for migrate

README.md
[![agentmods](https://agentmods.dev/badge/commands/halflength-ampleness75/claude-code-recipes/migrate.svg)](https://agentmods.dev/commands/halflength-ampleness75/claude-code-recipes/migrate)
Your own site
<a href="https://agentmods.dev/commands/halflength-ampleness75/claude-code-recipes/migrate"><img src="https://agentmods.dev/badge/commands/halflength-ampleness75/claude-code-recipes/migrate.svg" alt="Measured on agentmods" height="20"></a>
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 959 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00014 $0.00959
Opus 5 $0.00007 $0.00479
Sonnet 5 $0.00003 $0.00192
Haiku 4.5 $0.00001 $0.00096

Measured 4d ago against content hash add1a337a3de, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

migrate scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/migrate.md · 111 lines

How it starts

The opening of the file, as written. The whole thing — 111 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a migration specialist. The user will describe the migration they need in $ARGUMENTS — for example, "React 18 to 19", "JavaScript to TypeScript", "Express to Fastify", "Webpack to Vite", or "Python 2 to 3".

Phase 1 — Audit Current State

  1. Identify the source and target. Parse $ARGUMENTS to determine what is being migrated from and to. If unclear, ask the user.
  2. Inventory current usage. Search the codebase to build a complete picture:
    • Which version of the source framework/language is currently in use? Check package.json, Cargo.toml, pyproject.toml, go.mod, etc.
    • How many files use the APIs/features being migrated?
    • Which specific APIs, patterns, or language features are in use?
    • Are there plugins, extensions, or integrations that also need migration?
  3. Identify breaking changes. Based on the migration target, list all known breaking changes, deprecated APIs, and required transformations. Consult your knowledge of the framework's migration guide.
  4. Assess risk areas. Flag:
    • Custom plugins or middleware that may not have equivalents
    • Monkey-patching or internal API usage
    • Version-locked peer dependencies
    • Configuration files that need rewriting

Output a migration audit:

## Migration Audit: [Source] -> [Target]

**Current version:** X.Y.Z
**Target version:** A.B.C
**Files affected:** (count)
**Risk level:** Low / Medium / High

### Breaking Changes That Apply to This Codebase
1. (change) — (N files affected) — (difficulty: trivial/moderate/complex)
2. ...

### Dependencies That Need Updating
| Package | Current | Target | Notes |
|---------|---------|--------|-------|
| ...     | ...     | ...    | ...   |

### Risk Areas
- (description of risk)

Phase 2 — Create the Migration Plan

Build a numbered, ordered plan. Each step should be:

  • Atomic: completable independently without breaking the build
  • Verifiable: the test suite should pass after each step (or at defined checkpoints)
  • Reversible: easy to roll back if something goes wrong

Read the full file on GitHub · 111 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 111 lines · 14 tokens per session scan A add1a337a3de

Subscribe to this mod's changes

migrate is a command published in the GitHub repository halflength-ampleness75/claude-code-recipes (2 stars, last pushed 5d ago), licensed MIT. It adds 14 tokens to every session and 959 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.