migration-upgrader
Scannednpx machina-cli add skill k1lgor/virtual-company/07-migration-upgrader --openclawMigration & Upgrade Specialist
You help users safely move from one version or library to another while minimizing breakage.
When to use this skill
- User says: "Migrate from X to Y", "Upgrade to version 3", "Replace this library."
- User is moving between frameworks or major API changes.
How to use it
- Understand the source and target:
- Source library/framework and version (e.g., React 17 to 18, Express 4 to 5).
- Target version and any major breaking changes listed in docs.
- Create a migration plan:
- List affected files and modules.
- Identify breaking changes (API signatures, config, behavior).
- Suggest order of changes (dependencies first, then leaf modules).
- Code updates:
- Show minimal, correct updates per file.
- Prefer new idioms of the target library/framework.
- Testing and validation:
- Suggest how to verify the migration:
- Run existing tests, fix failures.
- Add tests for changed behavior if gaps exist.
- Rollback advice:
- If something goes wrong, what can be reverted quickly?
Examples
User Request: "Migrate this usage of moment.js to date-fns."
Agent Action/Output:
"1. Identify: Found 5 calls to moment(). 2. Replace:
moment().format('YYYY')->format(new Date(), 'yyyy')moment(date).add(1, 'days')->addDays(new Date(date), 1)
- Verification: Run
npm testto ensure date logic holds."
// Before
import moment from "moment";
const nextWeek = moment().add(7, "days");
// After
import { addDays } from "date-fns";
const nextWeek = addDays(new Date(), 7);
User Request: "Upgrade Python 2 script to Python 3."
Agent Action/Output: "Plan:
- Run
2to3tool. - Fix print statements (
print "Hi"->print("Hi")). - Update specific standard libraries (
ConfigParser->configparser). - Check byte vs string handling (critical)."
Source
git clone https://github.com/k1lgor/virtual-company/blob/main/skills/07-migration-upgrader/SKILL.mdView on GitHub Overview
Migration-Upgrader helps you safely move between libraries, upgrade major versions, or switch frameworks with minimal breakage. It creates a concrete migration plan, suggests the order of changes, and outputs minimal, correct code updates. It also guides testing and rollback to ensure quick recovery if needed.
How This Skill Works
It starts by identifying the source and target versions and any documented breaking changes. It then generates a step-by-step migration plan that lists affected files, prioritizes dependency updates, and proposes minimal code updates in the target idiom. Finally, it outlines testing and rollback actions to validate the migration.
When to Use It
- Migrate from one library to another (e.g., moment.js to date-fns)
- Upgrade to a new major version with breaking changes (e.g., React 17→18)
- Replace a library with an alternative due to deprecation
- Move between frameworks or APIs with major changes (e.g., Express 4→5, Django 2→3)
- Refactor for new conventions or idioms in the target ecosystem
Quick Start
- Step 1: Collect source/target versions and breaking changes from docs
- Step 2: Create a per-file migration plan and outline minimal code updates
- Step 3: Apply changes, run tests, validate behavior, and document rollback
Best Practices
- Start with a clear source/target pair and gather docs on breaking changes
- List all affected files and modules before touching code
- Prioritize dependency upgrades before updating leaf modules
- Provide minimal, idiomatic updates in the target framework/library
- Thoroughly test, run existing tests, and have a rollback plan
Example Use Cases
- Migrate moment.js usage to date-fns in a frontend app
- Upgrade a Python 2 script to Python 3
- Migrate a Node.js app from Express 4 to Express 5
- Move from AngularJS to modern Angular
- Upgrade lodash from v3 to v4 to address breaking changes