code-migration
Skill1 starsChanged 2 months agoMITView on GitHub
Cut over from an old implementation, API version, or service to a new one without downtime — dual-run behind a feature flag, ramp traffic gradually, fall back on error, keep a kill switch, then remove the old path once the new one is proven. Use when asked to "migrate to the new X", "cut over the API", "replace the old service", "roll out behind a flag", or "deprecate the old endpoint".
5 other projects use a version of this.
Adopted by
Most recently taken up by
- ishandutta2007/Awesome-Claude-Skillstheir own version, first seen Nov 8, 2026
- kucherenko/jscpdtheir own version, first seen Sep 2, 2026
- Abdox-menara/guard-skillstheir own version, first seen Aug 24, 2026
- anthropics/code-migration-kit-with-claude-codetheir own version, first seen Jul 8, 2026
- konveyor-ecosystem/playpen-pf-mig-skillstheir own version, first seen Apr 15, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- kucherenko/jscpd★ 6.5ksame name
- anthropics/code-migration-kit-with-claude-code★ 342same name
- ishandutta2007/Awesome-Claude-Skills★ 16same name
- konveyor-ecosystem/playpen-pf-mig-skills★ 2same name
- Abdox-menara/guard-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository73 other files it gives its agents.
- AGENTS.mdAGENTS.md
- bigquery-analyticsSkill
- cache-invalidationSkill
- mongo-aggregationSkill
- mongo-modelingSkill
- postgres-aggregationSkill
- postgres-indexingSkill
- redis-coordinationSkill
- redis-patternsSkill
- review-querySkill
- cut-releaseSkill
- data-migrationSkill
- deploy-serviceSkill
- hotfixSkill
- rollbackSkill
- design-endpointSkill
- design-eventSkill
- design-schemaSkill
- evolve-contractSkill
- scaffold-nestjs-moduleSkill
- scaffold-projectSkill
- incident-responseSkill
- investigate-bugSkill
- on-callSkill
- postmortemSkill
- audit-skillsSkill
- distill-review-styleSkill
- write-skillSkill
- debug-with-tracesSkill
- define-alertsSkill
- instrument-serviceSkill
- evaluate-dependencySkill
- grillSkill
- handoffSkill
- orientSkill
- phased-deliverySkill
- spikeSkill
- to-questionnaireSkill
- write-adrSkill
- write-prdSkill
- devops-pr-reviewSkill
- go-backend-pr-reviewSkill
- nestjs-backend-pr-reviewSkill
- python-backend-pr-reviewSkill
- react-frontend-pr-reviewSkill
- bisectSkill
- break-couplingSkill
- dead-code-sweepSkill
- deslopifySkill
- extract-moduleSkill
- rebase-cleanSkill
- resolve-merge-conflictsSkill
- split-commitSkill
- tddSkill
- wait-whatSkill
- wide-renameSkill
- bullmqSkill
- kafkaSkill
- sqs-consumerSkill
- audit-dependenciesSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 33
Run both paths, serve the old result, compare the two async, log divergences.
- Distinctive: line 47
Per-call fallback: if the new path throws or times out, catch it, fall back to the old path (if still present), and count it.
- Distinctive: line 56
Only after the new path has held at 100% for a agreed soak (days/weeks).
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Code migration (flagged cutover)
Swapping a live code path — a rewritten service, a new provider, a v2 API, a
different algorithm. Never a hard switch. Pairs with
deployment/data-migration (schema moves first, additively) and
planning/phased-delivery (each stage is a
phase with a checkable gate and a rollback point).
The stages
1. Build the new path, dark
New implementation lands fully but nothing routes to it. It compiles, has tests, is deployed. Old path unchanged.
2. Add the switch
A feature flag decides old vs new, per call. The flag is:
- Runtime-changeable — no deploy to flip it (config service / LaunchDarkly / a DB row / an env var read per request, not per boot).
- Scoped — global %, or per-tenant / per-user / per-route, matching the blast radius you want to control.
- Defaulted off.
3. Shadow / dual-run (optional, for risky swaps)
Run both paths, serve the old result, compare the two async, log divergences. Do not let the new path's errors or latency affect the response. Ramp to step 4 only when divergence is understood (some divergence is the new path being more correct — decide, don't just match).
4. Ramp
Flip the flag on for a small slice → watch → widen. 1% → 10% → 50% → 100%, hours
to days apart depending on risk. At each step check: error rate, latency (p50/p99),
the business metric the change was supposed to move, and downstream (queues, DB
load).
5. Fallback & kill switch
- Per-call fallback: if the new path throws or times out, catch it, fall back to the old path (if still present), and count it. A rising fallback rate is a stop signal.
- Kill switch: one flag flip returns 100% to the old path, instantly, no deploy. Know who can flip it and how.
- Alert on: new-path error rate, fallback rate, divergence rate.
6. Contract — remove the old path
Only after the new path has held at 100% for a agreed soak (days/weeks). Then, in
separate PRs: delete the old implementation, delete the flag, delete the fallback,
delete the comparison code. grep proves the old path has no callers
(quality/dead-code-sweep).
API version cutover specifics
v1andv2run side by side;v2is additive,v1untouched.- Migrate consumers off
v1(their PRs, blocked onv2shipping) — you don't get to changev1's contract (the review rule: "we cant change the contract on the old apis"). - Deprecate
v1with a sunset date + aDeprecation/Sunsetheader, tell every known consumer, then remove it once traffic is zero. - New public routes go in the RBAC / gateway allowlist in all envs before the ramp.
Anti-patterns
- ❌ A hard switch with no flag ("we'll just deploy it").
- ❌ A flag that needs a deploy to flip — that's not a kill switch.
- ❌ Ramping to 100% in one jump.
- ❌ New path's errors/latency leaking into responses during shadow mode.
- ❌ Removing the old path (or the fallback) before the soak.
- ❌ Changing the old API's contract instead of building a new version.
- ❌ Leaving the flag and comparison scaffolding in forever after cutover.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

