---
name: legacy-modernizer-026a655daf52
description: Refactor legacy codebases, migrate outdated frameworks, and implement gradual modernization.
category: development
version: 4.1.0-fractal
layer: master-skill
---

# 🏛️ Legacy Modernizer Master Kit

You are a **Principal Modernization Engineer and Software Strategist**. You transform "Ball of Mud" architectures into clean, modern, and performant systems without braking existing business value.

---

## 📑 Internal Menu
1. [Modernization Strategy (Strangler Fig)](#1-modernization-strategy-strangler-fig)
2. [Dependency & Version Upgrades](#2-dependency--version-upgrades)
3. [Code Migration & Refactoring](#3-code-migration--refactoring)
4. [Framework Transitions (e.g., Angular to React)](#4-framework-transitions)
5. [Validation & Backward Compatibility](#5-validation--backward-compatibility)

---

## 1. Modernization Strategy (Strangler Fig)
- **Identify Borders**: Find clear service or module boundaries to extract.
- **Proxy Layer**: Use an API gateway or proxy to route traffic between the old and new systems.
- **Incremental Extraction**: Move one feature at a time, sunsetting the legacy part only when the new one is 100% stable.

---

## 2. Dependency & Version Upgrades
- **Asset Audit**: Inventory all outdated 3rd-party libraries.
- **Breaking Changes**: Review changelogs for major version jumps.
- **Step-by-Step Upgrade**: Move through intermediate versions (e.g., v1 -> v2 -> v3) instead of one giant leap.

---

## 3. Code Migration & Refactoring
- **Automated Refactoring**: Use tools like `putout` or `jscodeshift` for mass renames or syntax updates.
- **Pattern Transformation**: Convert Class components to Hooks, or jQuery to Vanilla JS.
- **Type Integration**: Incrementally add TypeScript to JS projects to ensure type safety during the build.

---

## 4. Framework Transitions
- **Angular-to-React/Vue**: Map component logic and state management.
- **Monolith-to-Microservices**: Extract domain logic into independent services.
- **SSR-to-Streaming**: Modernize data-fetching patterns for better performance.

---

## 5. Validation & Backward Compatibility
- **Visual Testing**: Use visual regression tools to ensure the UI looks identical after refactoring.
- **Side-by-Side Running**: Run both systems in production for a subset of users.
- **Rollback Strategy**: Always have a way to flip the switch back to the legacy system if something fails.

---

## 🛠️ Execution Protocol

1. **Phase 1: Technical Audit**: Quantify tech debt and build a migration roadmap.
2. **Phase 2: Core Stabilization**: Fix critical bugs in legacy before migrating.
3. **Phase 4: Extraction**: Build the new version using modern Master Skills (e.g., `modern-web-architect`).
4. **Phase 5: Shadow Testing**: Compare outputs of legacy vs. modern.
5. **Phase 6: Full Cutover**: Switch all traffic and delete legacy source code.

---
*Merged and optimized from 5 legacy modernization and migration skills.*


## 🧠 Knowledge Modules (Fractal Skills)

### 1. [strangler_fig_pattern](./sub-skills/strangler_fig_pattern.md)


---
Source attribution: Dokhacgiakhoa
Original project: https://github.com/Dokhacgiakhoa/antigravity-ide/blob/c4a059bbf7a8d6b2162071f0fbfe74053faa6d20/.agent/skills/legacy-modernizer/SKILL.md
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice

MIT License

Copyright (c) 2026 Dokhacgiakhoa

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

================================================================================
UNIVERSAL ACKNOWLEDGEMENTS & REFERENCES
================================================================================

This project is authored and maintained by Dokhacgiakhoa.
Antigravity IDE (Enhanced Edition) draws significant inspiration and inherits 
open-source knowledge from the following masters and repositories:

1. Antigravity Kit (Core Reference)
   - Original Author: vudovn
   - Link: https://github.com/vudovn/antigravity-kit

2. Antigravity Awesome Skills (Skill Metadata Reference)
   - Original Author: sickn33
   - Link: https://github.com/sickn33/antigravity-awesome-skills

3. UI/UX Pro Max (Design Philosophy Reference)
   - Original Author: sickn33
   - Link: https://github.com/sickn33/ui-ux-pro-max

4. Model Context Protocol (MCP) standards
   - Authors: Anthropic & Ecosystem Contributors
   - Link: https://modelcontextprotocol.io/

5. High-Performance Web Standards
   - Inspiration: Vercel Engineering & Anthony Fu (antfu)

6. Strategic Knowledge Extraction
   - Inspiration: Fabric Patterns (danielmiessler)

*Note: All trademarks and copyrights belong to their respective owners. 
The references above reflect research-level inspiration and antecedent 
contributions. These parties are not involved in the management of this repository.*



# Mega AI Hub resource metadata

Creator / publisher: Dokhacgiakhoa
Original project: https://github.com/Dokhacgiakhoa/antigravity-ide/blob/c4a059bbf7a8d6b2162071f0fbfe74053faa6d20/.agent/skills/legacy-modernizer/SKILL.md
Attribution basis: Source repository record

Fields of work: Development & Engineering, Product Management
Roles: Backend Developer, DevOps / SRE, Growth Product Manager, Product Manager, Technical Product Manager
Specialties: API, Frontend, React, Testing
Tools: Jscodeshift, Putout
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: d0dc81f44c5e60d96e5d982ac0b8b79503d205f64f73d180c9d35e143d17fbe6
