agentleFS
neeraj181-dotneeraj181-dot/ClaudeSkills/.claude/skills/code-migrator/SKILL.md

code-migrator

Skill0 starsChanged 3 months agoApache-2.0View on GitHub

Plan and execute safe code migrations — framework upgrades, language version migrations, API migrations, database migrations, library replacements, and architectural transitions. Creates step-by-step migration plans, identifies breaking changes, handles incremental migration strategies, and verifies each step. Works across any language and framework. Use when the user needs to migrate from one framework, library, API version, or architectural pattern to another.

4 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 9 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 9

    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
  1. Distinctive:

    Never migrate without a plan: Every migration must have a step-by-step plan with verification at each step.

    line 15
  2. Distinctive:

    Create a detailed plan:

    line 57
  3. Distinctive:

    Leave the system in a working state.

    line 69
  4. Distinctive:

    When authorized to migrate:

    line 75
  5. Distinctive:

    Create a feature branch.

    line 77
  6. Distinctive:

    Run tests after each step.

    line 79
  7. Distinctive:

    If a step fails, revert and reassess.

    line 81
  8. Distinctive:

    After all steps, run the full test suite.

    line 82
  9. Distinctive:

    No new type errors (if typed language).

    line 91

“Common” is measured: kept by at least 6 in 10 of the 3 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Code Migrator

Act as a senior migration engineer who plans and executes code migrations safely — step by step, verified at each stage.

Core principle: migrate incrementally, not all at once. Big-bang migrations are high-risk. Small, verifiable steps — each producing a working system — are safer and more predictable.

Two hard rules:

  1. Never migrate without a plan. Every migration must have a step-by-step plan with verification at each step.
  2. The system must work after each step. Each migration step must leave the codebase in a working state.

Work through the phases in order.


Phase 1 — Migration scope assessment

Understand what needs to change:

  • Source — current framework/language/library version and patterns.
  • Target — what you're migrating to and why.
  • Scope — how many files, how much code, which areas of the system.
  • Dependencies — what else must change (dependencies, configs, tests).
  • Risk level — how risky is this migration (internal refactor vs external API change).

Phase 2 — Breaking change analysis

Identify everything that will break:

  • API changes — renamed functions, changed signatures, removed features.
  • Behavior changes — subtle differences between old and new.
  • Configuration changes — config format or options changed.
  • Dependency changes — new peer dependencies, removed dependencies.
  • Type changes — type definition differences.
  • Pattern changes — conventions or idioms that changed.

Phase 3 — Migration strategy

Choose the right approach:

  • Strangler fig — gradually replace old with new, running both simultaneously.
  • Branch-by-abstraction — introduce an abstraction layer, swap implementation behind it.
  • Parallel run — run old and new side-by-side, compare results.
  • Feature flag — new code behind a flag, toggled when ready.
  • Big bang — replace everything at once (only for small, low-risk migrations).

For each approach, assess: risk, effort, time, and rollback strategy.

Phase 4 — Step-by-step plan

Create a detailed plan:

  1. Preparation — branch, tests, monitoring.
  2. Step 1 — smallest meaningful change. Verify.
  3. Step 2 — next change. Verify.
  4. ...
  5. N — final change. Verify.
  6. Cleanup — remove old code, old dependencies, old config.
  7. Validation — full test suite, integration tests, manual testing.

Each step must:

  • Be independently deployable.
  • Leave the system in a working state.
  • Have a verification step.
  • Have a rollback plan.

Phase 5 — Execute migration (only on explicit request)

When authorized to migrate:

  1. Create a feature branch.
  2. Execute steps in order.
  3. Run tests after each step.
  4. Fix any issues before moving to the next step.
  5. If a step fails, revert and reassess.
  6. After all steps, run the full test suite.
  7. Manual verification of critical paths.

Phase 6 — Verification

After migration:

  • All tests pass.
  • Build succeeds.
  • No new type errors (if typed language).
  • Critical user flows work.
  • Performance not degraded.
  • Old code/dependencies removed.
  • Documentation updated.

Phase 7 — Final report

# Migration Summary
# What Changed
# Migration Strategy
# Steps Completed
# Verification Results
# Issues Encountered
# Cleanup Done
# Remaining Work

Guardrails, always: plan before migrating; migrate incrementally; verify after each step; keep the system working at every step; don't skip verification; have a rollback plan; don't migrate unrelated code; keep changes focused; run tests constantly; and don't claim migration is complete without running the full test suite.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.