// New service imports from legacy via API
// Once feature is migrated, point to new service
// Phase 1: API Gateway routes to PHP
router.get('/users', proxyToLegacy)
// Phase 2: Extract to new service
router.get('/users', userController.findAll)
// Phase 3: Remove legacy dependency
// DELETE /users from PHP
Risk Mapping
Feature
Complexity
Risk
Migration Order
Auth
High
Critical
1st
User Profile
Medium
Medium
2nd
Dashboard
Low
Low
3rd
Legacy Reports
High
Low
Last
Checklist
Audit legacy codebase
Map dependencies
Identify bounded contexts
Implement strangler facade
Extract one feature at a time
Run both systems in parallel
Cut over gradually
1---2name: legacy-migration3description: Legacy Code Migration4---5# Legacy Code Migration67## Strangler Pattern89```10Before: After:11┌─────────────┐ ┌─────────────┐12│ PHP │ │ New TS │13│ Monolith │ │ Service │14└─────────────┘ └─────────────┘15 ↑ ↑16 │ ┌─────────────┐ │17 ├────►│ Facade │◄─────┤18 │ │ (Gateway) │ │19 │ └─────────────┘ │20 │ ↑ │21 │ │ │22 └────────────┴────────────┘23```2425## Incremental Extraction2627```typescript28// New service imports from legacy via API29// Once feature is migrated, point to new service3031// Phase 1: API Gateway routes to PHP32router.get('/users', proxyToLegacy)3334// Phase 2: Extract to new service35router.get('/users', userController.findAll)3637// Phase 3: Remove legacy dependency38// DELETE /users from PHP39```4041## Risk Mapping4243| Feature | Complexity | Risk | Migration Order |44|---------|------------|------|-----------------|45| Auth | High | Critical | 1st |46| User Profile | Medium | Medium | 2nd |47| Dashboard | Low | Low | 3rd |48| Legacy Reports | High | Low | Last |4950## Checklist5152- [ ] Audit legacy codebase53- [ ] Map dependencies54- [ ] Identify bounded contexts55- [ ] Implement strangler facade56- [ ] Extract one feature at a time57- [ ] Run both systems in parallel58- [ ] Cut over gradually
Run npx skillmds@latest add dvcrn/legacy-migration in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Legacy Code Migration It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. Capability flags: docs only. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
dvcrn (@dvcrn) published this skill. Their other Agent Skills are listed on their SkillMD profile.