code-migration-helper
Skill3 starsChanged 11 months agoApache-2.0View on GitHub
Help migrate code between versions, frameworks, or languages. Use when the user needs to upgrade dependencies, migrate to new APIs, or convert code between technologies.
In this repository100 other files it gives its agents.
- accessibility-checkerSkill
- analytics-trackerSkill
- api-contract-testerSkill
- api-documentation-generatorSkill
- api-rate-limiterSkill
- appstore-screenshot-resizerSkill
- architecture-documenterSkill
- authentication-implementerSkill
- aws-resource-provisionerSkill
- browser-extension-builderSkill
- caching-implementerSkill
- changelog-generatorSkill
- chart-generatorSkill
- ci-pipeline-debuggerSkill
- cli-tool-builderSkill
- code-documenterSkill
- code-explainerSkill
- code-refactorerSkill
- code-reviewerSkill
- color-palette-generatorSkill
- comment-generatorSkill
- contributing-guide-writerSkill
- cron-job-schedulerSkill
- css-animatorSkill
- csv-processorSkill
- data-aggregatorSkill
- database-backup-restoreSkill
- database-migration-generatorSkill
- database-query-optimizerSkill
- data-transformerSkill
- data-validatorSkill
- date-time-helperSkill
- debug-helperSkill
- dependency-updaterSkill
- dependency-vulnerability-checkerSkill
- discord-bot-builderSkill
- docker-compose-builderSkill
- dockerfile-generatorSkill
- e2e-test-builderSkill
- email-template-builderSkill
- env-setupSkill
- error-handlerSkill
- error-message-writerSkill
- error-response-handlerSkill
- etl-pipeline-builderSkill
- file-organizerSkill
- form-builderSkill
- git-commit-messageSkill
- github-actions-builderSkill
- gitignore-generatorSkill
- graphql-schema-builderSkill
- icon-system-builderSkill
- input-validatorSkill
- integration-test-builderSkill
- jsdoc-generatorSkill
- json-schema-generatorSkill
- kubernetes-manifest-generatorSkill
- license-chooserSkill
- linter-fixerSkill
- load-testerSkill
- The first 60 shown.
The file
Files
Code Migration Helper
Assist with code migrations and upgrades.
Version Migration Strategies
Incremental Migration
v1.0 → v1.1 → v1.2 → v2.0Upgrade step by step, fixing deprecation warnings.
Big Bang Migration
v1.0 ─────────────────────→ v2.0Complete rewrite, higher risk but faster.
Strangler Fig Pattern
v1.0 ──┬── new feature → v2.0
├── new feature → v2.0
└── migrate ────→ v2.0Gradually replace old code with new.
React Migration Examples
Class to Functional Components
// Before (Class)
class UserProfile extends React.Component {
state = { user: null, loading: true };
componentDidMount() {
this.fetchUser();
}
fetchUser = async () => {
const user = await api.getUser(this.props.userId);
this.setState({ user, loading: false });
};
render() {
if (this.state.loading) return <Loading />;
return <div>{this.state.user.name}</div>;
}
}
// After (Functional + Hooks)
function UserProfile({ userId }) {
const [user, setUser] = useState(null);
const [loading, setLoading] = useState(true);
useEffect(() => {
async function fetchUser() {
const user = await api.getUser(userId);
setUser(user);
setLoading(false);
}
fetchUser();
}, [userId]);
if (loading) return <Loading />;
return <div>{user.name}</div>;
}Python 2 to Python 3
# Python 2
print "Hello"
raw_input("Enter: ")
xrange(10)
dict.iteritems()
unicode("text")
# Python 3
print("Hello")
input("Enter: ")
range(10)
dict.items()
str("text")# Automated conversion
2to3 -w script.py
# Check compatibility
python -m py_compile script.pyDatabase Migration
-- Add column with default
ALTER TABLE users ADD COLUMN status VARCHAR(20) DEFAULT 'active';
-- Backfill data
UPDATE users SET status = 'active' WHERE status IS NULL;
-- Make non-nullable after backfill
ALTER TABLE users ALTER COLUMN status SET NOT NULL;Migration Checklist
| Phase | Tasks |
| Prepare | Backup, read changelogs, plan rollback |
| Test | Run on staging, check for issues |
| Migrate | Apply changes, monitor |
| Verify | Run tests, check functionality |
| Cleanup | Remove old code, update docs |
Codemods (jscodeshift)
// codemod.js - Rename imports
module.exports = function(fileInfo, api) {
const j = api.jscodeshift;
return j(fileInfo.source)
.find(j.ImportDeclaration, {
source: { value: 'old-package' }
})
.forEach(path => {
path.node.source.value = 'new-package';
})
.toSource();
};
// Run: jscodeshift -t codemod.js src/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.

