
code-migrator
Migrate legacy code to modern frameworks through automated refactoring, with a plugin focused on the migration step.
- version
- 1.0.0
- GitHub stars
- 38
What it does
- Covers conversion of legacy code to modern framework patterns using automated refactoring passes
- Designed for teams planning a framework upgrade that want repetitive edits handled automatically
Add marketplace
/plugin marketplace add glincker/claude-code-marketplaceRun it inside Claude Code once, then install the plugin below.
Install
/plugin install code-migrator@glincker-marketplaceRun it inside Claude Code after adding the marketplace.
Files
Discovered from sourceCode Migrator
⚡ UNIQUE FEATURE: Automated legacy code modernization with AI-powered migration paths, dependency resolution, test generation, and risk analysis. Migrate between languages, frameworks, or architectural patterns with confidence.
What This Skill Does
Intelligently migrates codebases with minimal manual intervention:
Language Migrations
- Python 2 → Python 3: Syntax, imports, unicode handling
- JavaScript → TypeScript: Type inference and definitions
- Java 8 → Java 17+: Modern language features
- Angular.js → React/Vue: Complete framework migration
- PHP 5 → PHP 8: Modernize deprecated features
- Ruby 2 → Ruby 3: Update syntax and gems
Framework Upgrades
- React Class → Hooks: Convert class components
- Vue 2 → Vue 3: Composition API migration
- Django 2 → Django 4: Settings and ORM updates
- Rails 5 → Rails 7: Modern Rails patterns
- Express 4 → Express 5: Route handlers, middleware
Architectural Migrations
- Monolith → Microservices: Service extraction
- REST → GraphQL: API transformation
- Callback Hell → Async/Await: Promise modernization
- MVC → Component-Based: Architecture refactoring
Why This Is Revolutionary
First migration skill with:
- AI-powered analysis: Understands code context and intent
- Risk assessment: Identifies high-risk changes
- Incremental migration: Migrate module by module
- Automated testing: Generates tests to verify migration
- Rollback support: Safe migration with undo capability
- Dependency resolution: Automatically updates imports and packages
- Pattern recognition: Identifies and modernizes anti-patterns
Instructions
Phase 1: Migration Discovery & Analysis
-
Identify Migration Type:
Ask user: - What are you migrating FROM? - What are you migrating TO? - Full codebase or specific modules? - Any constraints or requirements? -
Analyze Current State:
# Discover project structure Use Glob to find all source files Use Grep to identify: - Framework versions - Import patterns - Deprecated APIs - Code smells -
Generate Migration Plan:
# Migration Plan: Python 2 → Python 3 ## Scope - Files to migrate: 247 - Estimated effort: 2-3 days - Risk level: Medium ## Changes Required ### High Priority (Breaking Changes) 1. Print statements → print() function (187 occurrences) 2. Unicode strings (u'') → default strings (423 occurrences) 3. Dict.iteritems() → Dict.items() (89 occurrences) ### Medium Priority (Deprecated APIs) 1. urllib → urllib.request (34 occurrences) 2. ConfigParser → configparser (12 occurrences) ### Low Priority (Best Practices) 1. Old-style classes → new-style classes 2. % formatting → f-strings ## Dependencies to Update - Django 1.11 → Django 4.2 - requests 2.9 → requests 2.31 - pytest 3.0 → pytest 7.4 ## Migration Strategy - Phase 1: Update dependencies (safe, reversible) - Phase 2: Automated syntax fixes (safe) - Phase 3: Manual code review (requires attention) - Phase 4: Test and validate ## Risk Assessment - **Critical**: Database migrations (manual review needed) - **High**: Third-party API calls (may have changed) - **Medium**: String encoding (test thoroughly) - **Low**: Print statements (auto-fixable)
Phase 2: Automated Migration
-
Create Migration Branch:
git checkout -b migrate-to-python3 -
Backup Current State:
# Create backup git tag pre-migration-backup -
Execute Migration (module by module):
For each file/module:
a. Read current code:
Use Read to load file contentsb. Apply transformations:
# Example: Python 2 → 3 print statements # Before print "Hello, World!" # After print("Hello, World!") # Example: Unicode strings # Before u"Hello, 世界" # After "Hello, 世界" # Example: Dict iteration # Before for key, value in my_dict.iteritems(): # After for key, value in my_dict.items():c. Update imports:
# Before import urllib import ConfigParser # After import urllib.request import configparserd. Modernize patterns:
# Before: Old-style formatting "Hello, %s!" % name # After: f-strings f"Hello, {name}!" # Before: Manual file handling f = open('file.txt') content = f.read() f.close() # After: Context manager with open('file.txt') as f: content = f.read() -
Use Edit tool to apply changes:
For each transformation: - Use Edit with old_string/new_string - Preserve formatting and style - Add comments where behavior changes
Phase 3: Dependency Migration
-
Update package manager files:
# requirements.txt migration # Before Django==1.11.29 requests==2.9.1 # After Django==4.2.0 requests==2.31.0// package.json migration // Before { "dependencies": { "react": "^16.8.0" } } // After { "dependencies": { "react": "^18.2.0" } } -
Install new dependencies:
pip install -r requirements.txt # or npm install
Phase 4: Test Generation & Validation
-
Generate Migration Tests:
# Use Task to launch test-generator agent Task: "Generate tests that verify migration correctness" For each migrated function: - Create test with Python 2/3 compatible inputs - Verify output is identical - Test edge cases -
Run Existing Tests:
# Run original test suite pytest tests/ # Report: - Tests passing: 247/250 - Tests failing: 3 - New errors: 0 -
Run Migration Validation:
# Custom validation checks - Import validation - Syntax check (python -m py_compile) - Linting (flake8, pylint) - Type checking (mypy for Python, tsc for TypeScript)
Phase 5: Manual Review Queue
For high-risk changes:
## Manual Review Required
### File: api/payments.py (Lines 45-67)
**Risk**: HIGH
**Reason**: External API call with changed response format
```python
# Original (Python 2)
response = urllib.urlopen(url)
data = json.loads(response.read())
# Migrated (Python 3)
response = urllib.request.urlopen(url)
data = json.loads(response.read().decode('utf-8'))
Action needed: Verify API still returns same data structure
File: database/models.py (Lines 102-115)
Risk: CRITICAL Reason: Database model migration
Action needed: Create and review Django migration files
### Phase 6: Documentation & Rollback Plan
1. **Generate Migration Report**:
```markdown
# Migration Report: Python 2 → Python 3
**Date**: 2025-01-13
**Duration**: 3.2 hours
**Status**: ✅ Complete (3 items need manual review)
## Statistics
- Files modified: 247
- Lines changed: 1,834
- Dependencies updated: 12
- Tests updated: 45
- New tests added: 18
## Breaking Changes
1. Unicode handling in API responses
2. Dictionary iteration in processors
3. Print output in CLI tools
## Rollback Instructions
```bash
git checkout pre-migration-backup
Next Steps
- Review 3 flagged items in review-queue.md
- Run integration tests
- Deploy to staging
- Monitor for issues
2. **Create Migration Documentation**:
- What changed and why
- How to use new patterns
- Common gotchas
- Troubleshooting guide
## Example Migrations
### Example 1: React Class → Hooks
**User**: "Migrate this component to hooks"
**Input**:
```javascript
class UserProfile extends React.Component {
constructor(props) {
super(props);
this.state = { user: null, loading: true };
}
componentDidMount() {
fetchUser(this.props.userId)
.then(user => this.setState({ user, loading: false }));
}
render() {
const { user, loading } = this.state;
if (loading) return <div>Loading...</div>;
return <div>{user.name}</div>;
}
}
Output:
import { useState, useEffect } from 'react';
function UserProfile({ userId }) {
const [user, setUser] = useState(null);
const [loading, setLoading] = useState(true);
useEffect(() => {
fetchUser(userId)
.then(user => {
setUser(user);
setLoading(false);
});
}, [userId]);
if (loading) return <div>Loading...</div>;
return <div>{user.name}</div>;
}
Example 2: Callback Hell → Async/Await
Before:
function processUser(userId, callback) {
getUser(userId, (err, user) => {
if (err) return callback(err);
getOrders(user.id, (err, orders) => {
if (err) return callback(err);
calculateTotal(orders, (err, total) => {
if (err) return callback(err);
callback(null, { user, total });
});
});
});
}
After:
async function processUser(userId) {
const user = await getUser(userId);
const orders = await getOrders(user.id);
const total = await calculateTotal(orders);
return { user, total };
}
Configuration
.code-migrator-config.yml:
migration:
backup_enabled: true
incremental: true
generate_tests: true
risk_threshold: medium # Require manual review for high/critical
patterns:
# Custom pattern replacements
- from: "old_api_call"
to: "new_api_call"
risk: high
exclusions:
# Files to skip
- "vendor/*"
- "node_modules/*"
- "*.min.js"
validation:
run_tests: true
run_linters: true
type_check: true
Supported Migrations
Languages
- Python 2 → 3
- JavaScript ES5 → ES6+ → TypeScript
- Java 8 → 11 → 17
- PHP 5 → 7 → 8
- Ruby 2 → 3
- Go 1.x → 1.21+
Frameworks
- React (any version upgrade)
- Vue 2 → 3
- Angular any → any
- Django 1.x → 4.x
- Rails 5 → 7
- Express 4 → 5
Patterns
- Callbacks → Promises → Async/Await
- Class components → Functional + Hooks
- Options API → Composition API
- MVC → MVVM
- REST → GraphQL
Tool Requirements
- Read: Load source files
- Write: Create new files and reports
- Edit: Transform code in-place
- Glob: Find all files to migrate
- Grep: Search for patterns
- Bash: Run tests, install dependencies
- Task: Generate tests, analyze risks
Best Practices
- Start small: Migrate one module at a time
- Test continuously: Run tests after each module
- Commit frequently: Easy rollback if needed
- Review high-risk: Never auto-migrate critical code
- Update docs: Keep documentation in sync
- Monitor production: Watch for issues post-migration
Limitations
- Cannot migrate business logic (requires human understanding)
- Complex macros/metaprogramming may need manual work
- Performance characteristics may change
- Some migrations require iterative refinement
Related Skills
- unit-test-generator - Generate migration tests
- refactor-master - Further code improvements
- pr-reviewer - Review migrated code
Changelog
Version 1.0.0 (2025-01-13)
- Initial release
- Support for 6 languages
- 10+ framework migrations
- Risk assessment
- Automated testing
- Rollback support
Contributing
Help add migration paths:
- New language pairs
- Framework upgrades
- Pattern transformations
- Risk detection rules
License
Apache License 2.0 - See LICENSE
Author
GLINCKER Team
- GitHub: @GLINCKER
- Repository: claude-code-marketplace
🌟 The most comprehensive code migration skill available - save weeks of manual work!
From the glincker/claude-code-marketplace README
GLINCKER Claude Code Marketplace
Community-Driven Agent Marketplace - A comprehensive collection of specialized agents, automation workflows, and developer productivity tools
What GLINCKER Offers
A comprehensive marketplace of production-ready agents and tools designed to solve real developer pain points. Built by the community, for the community.
| Category | What We Provide | How It Helps |
|---|---|---|
| Multi-Agent Coordination | 5 parallel agents for code review | Comprehensive analysis from security, performance, testing, architecture, and style perspectives |
| Workflow Orchestration | YAML-based agent chaining | Automate complex pipelines with conditional logic and parallel execution |
| Quick Access | 7 slash commands | Instant access to common development tasks |
| Integrations | Database queries + 100+ APIs | Natural language interface to your entire stack |
| Infrastructure | Docker, Kubernetes, CI/CD | Production-ready configurations and best practices |
| Full SDLC Coverage | 23+ specialized agents | End-to-end support from development to deployment |
Why Choose GLINCKER
Comprehensive: 23+ specialized agents covering every stage of development Collaborative: Multi-agent coordination for complex tasks Automated: Workflow orchestration to chain agents together Production-Ready: Battle-tested configurations and best practices Open Source: Community-driven with transparent development Extensible: Easy to add your own agents and workflows
We're always improving - contributions welcome! See our Contributing Guide to help make this marketplace even better.
Architecture
Multi-Agent Code Review System
graph TD
A[Pull Request] --> B[PR Reviewer Skill]
B --> C[Security Agent]
B --> D[Performance Agent]
B --> E[Testing Agent]
B --> F[Architecture Agent]
B --> G[Style Agent]
C --> H[Synthesizer]
D --> H
E --> H
F --> H
G --> H
H --> I[Comprehensive Review Report]
I --> J[Auto-Generated Fixes]
Workflow Composition Framework
┌─────────────────────────────────────────────────────────────┐
│ Workflow Composer │
├─────────────────────────────────────────────────────────────┤
│ │
│ Step 1: Code Quality Checks (Parallel) │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ Linter │ │ Security │ │ Tests │ │
│ └────┬─────┘ └────┬─────┘ └────┬─────┘ │
│ └─────────────┼─────────────┘ │
│ ↓ │
│ Step 2: Conditional Logic │
│ ┌─────────────────────────────────────┐ │
│ │ IF all_passed THEN proceed │ │
│ │ ELSE notify and exit │ │
│ └────────────────┬────────────────────┘ │
│ ↓ │
│ Step 3: Deployment │
│ ┌─────────────────────────────────────┐ │
│ │ Deploy with retry (max 3 attempts) │ │
│ └─────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────┘
Quick Start
1. Install Marketplace
/plugin marketplace add https://github.com/GLINCKER/claude-code-marketplace
2. Install Essential Agents
# Core development agents
/plugin install pr-reviewer@glincker-marketplace
/plugin install security-scanner@glincker-marketplace
/plugin install docker-wizard@glincker-marketplace
# Or install all
/plugin marketplace install glincker-marketplace
3. Use Slash Commands
/review # Multi-agent code review (5 agents)
/test # Generate unit tests
/security-scan # OWASP Top 10 audit
/docker-setup # Generate Docker config
/k8s-setup # Generate Kubernetes manifests
/deploy staging # Orchestrated deployment
/workflow # Create automated workflow
4. Natural Language Commands
# Database queries
"Show me users who signed up last month with revenue > $100"
# API integrations
"Send Slack message to #engineering: Deployment complete"
# Code migration
"Migrate this React component from class to hooks"
# Infrastructure
"Generate production-ready K8s manifests with autoscaling"
# Workflows
"Create workflow: test → security scan → deploy if all pass"
Featured Skills
Autonomous PR Reviewer
Location: skills/devops/pr-reviewer/
Multi-agent code review system with 5 specialized agents working in parallel.
- Security Agent: Vulnerability scanning, OWASP compliance
- Performance Agent: Bottleneck detection, optimization suggestions
- Testing Agent: Coverage analysis, test case generation
- Architecture Agent: Design pattern review, SOLID principles
- Style Agent: Code style, documentation quality
Unique value: 5x more thorough than single-agent reviews, generates actionable fixes.
Workflow Composer
Location: skills/automation/workflow-composer/
First skill composition framework for Claude Code. Chain multiple skills with YAML configuration.
steps:
- name: quality-checks
parallel:
- skill: security-scan
- skill: test-runner
- skill: linter
- name: deploy
when: ${steps.quality-checks.all_passed}
skill: deploy-orchestrator
retry:
max_attempts: 3
backoff: exponential
Unique value: Build complex automation pipelines without coding.
Database Query (Natural Language)
Location: skills/integrations/database-query/
Query any database using natural language with automatic optimization.
-- Input: "Show me users who signed up last month"
-- Generated:
SELECT * FROM users
WHERE created_at >= NOW() - INTERVAL '1 month'
ORDER BY created_at DESC;
-- Includes: Query optimization, index suggestions, EXPLAIN ANALYZE
Supported: PostgreSQL, MySQL, MongoDB, SQLite, Redis
Unique value: Only skill with query optimization and index suggestions.
Code Migrator
Location: skills/development/code-migrator/
Automated legacy code modernization with risk assessment.
Supported migrations:
- Python 2 to Python 3
- JavaScript to TypeScript
- React Classes to Hooks
- Callbacks to Async/Await
- Framework upgrades (Django, Rails, Express)
Unique value: AI-powered risk assessment + automated test generation.
API Connector
Location: skills/integrations/api-connector/
Natural language interface to 100+ popular APIs.
Supported services:
- Development: GitHub, GitLab, Linear, Jira
- Communication: Slack, Discord, Twilio
- Payments: Stripe, PayPal, Square
- Cloud: AWS, Google Cloud, Azure
- AI: OpenAI, Anthropic, Hugging Face
- And 90+ more
Unique value: Handles authentication (OAuth, JWT), generates integration code.
Essential Skills
- README Generator (
skills/documentation/readme-generator/): Analyze project structure and generate comprehensive documentation - Unit Test Generator (
skills/testing/unit-test-generator/): Create tests for multiple languages with coverage analysis
Comparison
| Feature | GLINCKER | Other Marketplaces |
|---|---|---|
| Multi-Agent Skills | 5 parallel agents | None |
| Workflow Orchestration | YAML-based | None |
| API Integrations | 100+ services | Few (5-10) |
| Database Query | With optimization | Basic/None |
| Code Migration | AI + risk assessment | None |
| Code Generation | Multi-language | Limited |
Use Cases
Startup: "Set up CI/CD, generate tests, create documentation" → Automated workflow handles everything
Enterprise: "Migrate Python 2 monolith to Python 3 microservices" → Risk-assessed migration with automated testing
Developer: "Review code, optimize, and deploy" → Multi-agent review with automated deployment
Skill Categories
skills/
├── development/ # Code migration, refactoring, architecture
├── devops/ # PR review, CI/CD, deployment
├── testing/ # Unit tests, integration tests, coverage
├── documentation/ # README, API docs, changelogs
├── integrations/ # APIs, databases, external services
├── automation/ # Workflows, task automation
├── data-science/ # Data analysis, visualization
└── security/ # Audits, vulnerability scanning
Skill Structure
skills/category/your-skill/
├── SKILL.md # Required: Skill definition with YAML frontmatter
├── scripts/ # Optional: Helper scripts
└── templates/ # Optional: File templates
Minimal SKILL.md
---
name: your-skill
description: What your skill does
allowed-tools: ["Read", "Write"]
version: 1.0.0
author: Your Name
---
# Instructions
Clear instructions for Claude on executing this skill.
## Examples
Concrete usage examples.
Contributing
- Fork repository
- Create skill in appropriate category
- Follow Skill Template
- Submit pull request
- Pass community review
Resources:
- Contributing Guide - Detailed instructions
- Quick Start - Fast-track guide
- Unique Features - What makes us different
Quality Standards
All skills must have:
- Clear documentation with examples
- Minimal tool permissions (principle of least privilege)
- Security-conscious implementation
- Error handling for edge cases
- Automated testing where applicable
Safety
Skills execute code on your system. Before installing:
- Review source code
- Check author reputation
- Understand required permissions
- Only install from trusted sources
Community
- Discussions: Ask questions, share workflows
- Issues: Report bugs, request features
- Contributing: Contribution guidelines
Resources
License
Apache License 2.0 - See LICENSE
Acknowledgments
Built on:
- Anthropic's Skills - Foundation
- Claude Code community - Inspiration
- Open source contributors - Innovation
Made with Claude Code by the GLINCKER community
Details
- Marketplace
- glincker/claude-code-marketplace
- Source
- skills/development/code-migrator
- Category
- Community
- Keywords
- migration, modernization, refactoring, legacy-code
- Listed since
- Apr 7, 2026
More from glincker/claude-code-marketplace
All 24- data-engineerv1.0.0
- database-queryv1.0.0
- deployment-managerv1.0.0
- devops-specialistv1.0.0
- docker-wizardv1.0.0
- environment-managerv1.0.0
- frontend-specialistv1.0.0
- git-hooks-managerv1.0.0
- hello-worldv1.0.0
- k8s-generatorv1.0.0
- performance-optimizerv1.0.0
- pr-reviewerv1.0.0
- qa-engineerv1.0.0
- readme-generatorv1.0.0
- security-scannerv1.0.0
- tech-writerv1.0.0
- unit-test-generatorv1.0.0
- workflow-composerv1.0.0
- aident-skillv0.4.0
- api-connectorv1.0.0
- backend-architectv1.0.0
- changelog-generatorv1.0.0
- cicd-pipeline-builderv1.0.0
Similar to code-migrator
More Code Review & Quality
framework-migrationPluginwshobson/agents42.8K starsFramework updates, migration planning, and architectural transformation workflows
migration-helperPlugindevsforge/marketplace79 starsCode migration and framework upgrade assistant
code-modernizationPluginanthropics/claude-plugins-official47.9K starsGuided modernization for any legacy codebase: start with /modernize, get an assessment, an interactive map, the business rules mined from the code, and a plan y
refactor-enginePluginrohitg00/awesome-claude-code-toolkit2.8K starsExtract functions, simplify complex code, and reduce cognitive complexity
legacy-modernizerSkilljeffallan/claude-skills4.6K installsIncremental legacy modernization skill that plans strangler fig migrations, dependency maps, and API facades without production disruption.
dotnet-upgradePlugindotnet/skills6.3K starsSkills for migrating and upgrading .NET projects across framework versions, language features, and compatibility targets.