agentleFS
gufrancogufranco/claude-engineering-rules/skills/migrate/SKILL.md

migrate

Skill3 starsChanged 30 days agoMITView on GitHub

Migrate a framework or library, or upgrade a major version, along the official migration path with one tested commit per step.

63 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use sdd, scaffold and 6 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • liatrio-labsSkill

    sdd

    Execute the Liatrio Spec-Driven Development (SDD) workflow when explicitly invoked by the user. NOTE: this skill is NOT intended to be dynamically loaded or automatically triggered; it should only ever be explicitly called by the user.

    Also in 4 projects that use this

  • BerryKuipersSkill

    scaffold

    Detect project stack, apply architecture patterns, wire quality gates, and scaffold features. Use when bootstrapping a project, adding a vertical slice, wiring CI/CD, adding Docker compose, or setting up quality gates.

    Also in 4 projects that use this

  • MicrosoftSkill

    init

    Also in 8 projects that use this

  • agenticnotetakingSkill

    upgrade

    Apply plugin knowledge base updates to an existing generated system. Consults the Ars Contexta research graph for methodology improvements, proposes skill upgrades with research justification. Never auto-implements. Triggers on "/upgrade", "upgrade skills", "check for improvements", "update methodology".

    Also in 3 projects that use this

  • PydanticSkill

    coverage

    Fetch coverage diff from Codecov for the current branch or a specific PR. Shows uncovered lines, patch coverage, and overall coverage change.

    Also in 3 projects that use this

  • JohnJBorenSkill

    ci-cd

    CI/CD pipeline design, GitHub Actions, testing automation, and deployment strategies

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

18 rules. 0 are common, 17 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 50 edited versions we read keep these.

  • 17

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the manifest file to find the current version.

    line 39
  2. Distinctive:

    Search the codebase for import statements and usage patterns.

    line 40
  3. Distinctive:

    Check for official migration guides from the target library or framework.

    line 46
  4. Distinctive:

    Generate migration plan: Create a step-by-step plan:

    line 51
  5. Distinctive:

    Verify final state: After all steps complete:

    line 75
  6. Distinctive:

    Run the full test suite one final time.

    line 78
  7. Distinctive:

    Run the build one final time.

    line 79
  8. Distinctive:

    Never execute without presenting the plan first.

    line 122
  9. Distinctive:

    Run the full test suite after every step, not just affected tests.

    line 124
  10. Distinctive:

    If a step fails tests and the fix is non-trivial, stop and report.

    line 125
  11. Distinctive:

    When the source and target have different paradigms, do not force a 1:1 mapping.

    line 126
  12. Distinctive:

    Do not add the target library without checking if it is already a dependency.

    line 128
  13. Very specific:

    Follow ../../rules/code-style.md dependency evaluation criteria when the migration involves choosing between alternatives.

    line 129
  14. Distinctive:

    Stop and present the plan when execution is about to start without the user's approval.

    line 142
  15. Distinctive:

    Stop and report when a step's test failures need a non-trivial fix.

    line 143
  16. Distinctive:

    Stop and redesign when a source feature has no target equivalent and a compatibility shim is the only mapping on offer.

    line 144
  17. Distinctive:

    Stop and read the manifest when the target is about to be added, since it can already be a dependency.

    line 145
  18. Distinctive:

    Stop and restore coverage when the test count or coverage after a step is lower than before it.

    line 146

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

Overview

Framework and library migration assistant. Applies changes incrementally with a separate commit per step and full test runs between steps, so any step can be rolled back independently.

When to Use

  • Replacing one library or framework with another across the codebase, such as Express to Fastify or Jest to Vitest.
  • Upgrading a dependency or runtime across a major version with breaking changes.
  • For planning a migration without executing it, use /plan; for a single-call API rename inside one module, use /refactor.

Invocation

InvocationAction
/migrate <from> <to>Migrate from one library/framework to another
/migrate <library> <version>Upgrade a library to a specific major version

Examples:

  • /migrate express fastify
  • /migrate jest vitest
  • /migrate react 19
  • /migrate node 22
  • /migrate typescript 5.5

Steps

  1. Detect current state. Analyze the current usage of the source library or framework:
    • Read the manifest file to find the current version.
    • Search the codebase for import statements and usage patterns.
    • Count affected files: grep -r "import.*from '<source>'" --include="*.ts" --include="*.tsx" | wc -l
    • Identify configuration files specific to the source.
    • List plugins, extensions, or addons that depend on the source.
  2. Research the migration path. Gather migration guidance:
    • Check for official migration guides from the target library or framework.
    • Identify breaking changes between the source and target versions.
    • Map source APIs to target equivalents.
    • Identify features with no direct equivalent that require redesign.
  3. Generate migration plan. Create a step-by-step plan:

    StepDescriptionRiskRollback
    1Install target, keep source as fallbackLowRemove target from dependencies
    2Migrate configuration filesMediumRestore config from git
    3Migrate utility and helper modulesLowRevert commit
    4Migrate core application codeHighRevert commit
    5Migrate test filesMediumRevert commit
    6Remove source dependencyLowRe-add to manifest
    7Clean up: remove compatibility shimsLowRevert commit

    Present the plan and wait for approval before proceeding.

  4. Execute each step. For every step in the plan: a. Make the code changes for this step only. b. Run the formatter. c. Run the linter. Fix any new warnings. d. Run the type checker. Fix any new errors. e. Run the full test suite. If tests fail because of the migration, fix them as part of this step. f. Run the build. Verify zero errors. g. Commit with a descriptive message: refactor(<scope>): migrate <component> from <source> to <target>. h. Report the step result before proceeding to the next.
  5. Verify final state. After all steps complete:
    • Confirm the source library is no longer in the dependency manifest.
    • Confirm no import statements reference the source.
    • Run the full test suite one final time.
    • Run the build one final time.
    • Report the migration summary.

Output per step

## Step <N>/<total>: <description>

**Files changed:** <count>
**Tests:** <passed>/<total>, <failed> failures
**Build:** pass/fail
**Commit:** <hash> <message>

Final output

## Migration Complete

**Source:** <library@version>
**Target:** <library@version>
**Steps completed:** <N>/<total>
**Total files changed:** <count>
**Total commits:** <count>

### Verification
- [ ] Source removed from dependencies
- [ ] No source imports remain
- [ ] All tests pass
- [ ] Build succeeds
- [ ] No linter warnings

### Breaking Changes Applied
| Change | Files affected | How resolved |
|--------|---------------|-------------|
| <API change> | <count> | <approach taken> |

### Manual Follow-up
- <Any items requiring manual verification or testing>

Rules

  • Never execute without presenting the plan first. Wait for approval.
  • Each step must be a separate commit. Never batch multiple migration steps into one commit.
  • Run the full test suite after every step, not just affected tests.
  • If a step fails tests and the fix is non-trivial, stop and report. Do not continue with a broken intermediate state.
  • When the source and target have different paradigms, do not force a 1:1 mapping. Redesign the affected code to be idiomatic in the target.
  • Preserve all existing test coverage. Migration must not reduce the test count or coverage percentage.
  • Do not add the target library without checking if it is already a dependency.
  • Follow ../../rules/code-style.md dependency evaluation criteria when the migration involves choosing between alternatives.
  • Prefix every gh or glab command with the appropriate token per standards/github-accounts.md or standards/gitlab-accounts.md.

Common Rationalizations

  • "A 1:1 API mapping is faster than a redesign": when the paradigms differ, the mapped code fights the target. Rewrite the affected code in the target's idiom.
  • "Configuration and helpers are small, one commit covers both steps": one commit per plan step keeps each step revertible alone.
  • "The affected tests pass, the full suite can run at the end": a break caught three steps late cannot be pinned to its step. Run the full suite after every step.
  • "The old test has no target equivalent, dropping it keeps the migration moving": the test count and coverage stay at or above the baseline. Port the test.
  • "The remaining failures will clear up in the next step": the intermediate state stays green. Stop and report instead of carrying a broken step forward.

Red Flags

  • Stop and present the plan when execution is about to start without the user's approval.
  • Stop and report when a step's test failures need a non-trivial fix.
  • Stop and redesign when a source feature has no target equivalent and a compatibility shim is the only mapping on offer.
  • Stop and read the manifest when the target is about to be added, since it can already be a dependency.
  • Stop and restore coverage when the test count or coverage after a step is lower than before it.

Verification

  • The source library is absent from the dependency manifest, and a search for its imports returns zero matches.
  • The full test suite and the build pass after the last step, and the linter reports zero warnings.
  • git log shows one commit per plan step, each with the refactor(<scope>): migrate subject.
  • The test count and coverage are equal to or above their values before the first migration step.
  • The Migration Complete report lists every breaking change applied and every manual follow-up.

Related skills

  • /plan -- Plan the migration without executing it.
  • /audit -- Check for vulnerabilities in the target library before migrating.
  • /test -- Run the test suite independently.
  • /ship commit -- Commit migration steps.
  • /review -- Review the migration diff.

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.