{"data":{"slug":"discovered-27819e9ee3f397848f22fdbd06340f282aeac7a3aea39ef3","title":"Legacy Modernizer","summary":"Designs incremental migration strategies, identifies service boundaries, produces dependency maps and migration roadmaps, and generates API facade designs for aging codebases. Use when modernizing legacy systems, implementing strangler fig pattern or branch by abstraction, decomposing monoliths, upgrading frameworks or languages, or reducing technical debt without disrupting business operations.","url":"https:\/\/skillshunter.net\/skills\/discovered-27819e9ee3f397848f22fdbd06340f282aeac7a3aea39ef3","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/discovered-27819e9ee3f397848f22fdbd06340f282aeac7a3aea39ef3","markdown_url":"https:\/\/skillshunter.net\/skills\/discovered-27819e9ee3f397848f22fdbd06340f282aeac7a3aea39ef3.md","download_url":"https:\/\/skillshunter.net\/skills\/discovered-27819e9ee3f397848f22fdbd06340f282aeac7a3aea39ef3\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"Before starting, confirm all external integrations and data contracts are documented. Create characterization tests and ensure they pass on the unmodified legacy system before proceeding with any changes.","instructions":"---\nname: legacy-modernizer\ndescription: Designs incremental migration strategies, identifies service boundaries, produces dependency maps and migration roadmaps, and generates API facade designs for aging codebases. Use when modernizing legacy systems, implementing strangler fig pattern or branch by abstraction, decomposing monoliths, upgrading frameworks or languages, or reducing technical debt without disrupting business operations.\nlicense: MIT\nmetadata:\n  author: https:\/\/github.com\/Jeffallan\n  company: https:\/\/synergetic.solutions\n  version: \"1.1.0\"\n  domain: specialized\n  triggers: legacy modernization, strangler fig, incremental migration, technical debt, legacy refactoring, system migration, legacy system, modernize codebase\n  role: specialist\n  scope: architecture\n  output-format: analysis-and-code\n  related-skills: test-master, devops-engineer\n---\n\n# Legacy Modernizer\n\n## Core Workflow\n\n1. **Assess system** \u2014 Analyze codebase, dependencies, risks, and business constraints. Produce a dependency map and risk register before proceeding.\n   - *Validation checkpoint:* Confirm all external integrations and data contracts are documented before moving to step 2.\n\n2. **Plan migration** \u2014 Design an incremental roadmap with explicit rollback strategies per phase. Reference `references\/system-assessment.md` for code analysis templates.\n   - *Validation checkpoint:* Confirm each phase has a defined rollback trigger and owner.\n\n3. **Build safety net** \u2014 Create characterization tests and monitoring before touching production code. Target 80%+ coverage of existing behavior.\n   - *Validation checkpoint:* Run the characterization test suite and confirm it passes green on the unmodified legacy system before proceeding.\n\n4. **Migrate incrementally** \u2014 Apply strangler fig pattern with feature flags. Route traffic via a facade; shift load gradually.\n   - *Validation checkpoint:* Verify error rates and latency metrics remain within baseline thresholds after each traffic increment (e.g., 5% \u2192 25% \u2192 50% \u2192 100%).\n\n5. **Validate & iterate** \u2014 Run full test suite, review monitoring dashboards, and confirm business behavior is preserved before retiring legacy code.\n   - *Validation checkpoint:* New code must be proven stable at 100% traffic for at least one release cycle before legacy path is removed.\n\n## Reference Guide\n\nLoad detailed guidance based on context:\n\n| Topic | Reference | Load When |\n|-------|-----------|-----------|\n| Strangler Fig | `references\/strangler-fig-pattern.md` | Incremental replacement, facade layer, routing |\n| Refactoring | `references\/refactoring-patterns.md` | Extract service, branch by abstraction, adapters |\n| Migration | `references\/migration-strategies.md` | Database, UI, API, framework migrations |\n| Testing | `references\/legacy-testing.md` | Characterization tests, golden master, approval |\n| Assessment | `references\/system-assessment.md` | Code analysis, dependency mapping, risk evaluation |\n\n## Code Examples\n\n### Strangler Fig Facade (Python)\n```python\n# facade.py \u2014 routes requests to legacy or new service based on a feature flag\nimport os\nfrom legacy_service import LegacyOrderService\nfrom new_service import NewOrderService\n\nclass OrderServiceFacade:\n    def __init__(self):\n        self._legacy = LegacyOrderService()\n        self._new = NewOrderService()\n\n    def get_order(self, order_id: str):\n        if os.getenv(\"USE_NEW_ORDER_SERVICE\", \"false\").lower() == \"true\":\n            return self._new.fetch(order_id)\n        return self._legacy.get(order_id)\n```\n\n### Feature Flag Wrapper\n```python\n# feature_flags.py \u2014 thin wrapper around an environment or config-based flag store\nimport os\n\ndef flag_enabled(flag_name: str, default: bool = False) -> bool:\n    \"\"\"Check whether a migration feature flag is active.\"\"\"\n    return os.getenv(flag_name, str(default)).lower() == \"true\"\n\n# Usage\nif flag_enabled(\"USE_NEW_PAYMENT_GATEWAY\"):\n    result = new_gateway.charge(order)\nelse:\n    result = legacy_gateway.charge(order)\n```\n\n### Characterization Test Template (pytest)\n```python\n# test_characterization_orders.py\n# Captures existing legacy behavior as a golden-master safety net.\nimport pytest\nfrom legacy_service import LegacyOrderService\n\nservice = LegacyOrderService()\n\n@pytest.mark.parametrize(\"order_id,expected_status\", [\n    (\"ORD-001\", \"SHIPPED\"),\n    (\"ORD-002\", \"PENDING\"),\n    (\"ORD-003\", \"CANCELLED\"),\n])\ndef test_order_status_golden_master(order_id, expected_status):\n    \"\"\"Fail loudly if legacy behavior changes unexpectedly.\"\"\"\n    result = service.get(order_id)\n    assert result[\"status\"] == expected_status, (\n        f\"Characterization broken for {order_id}: \"\n        f\"expected {expected_status}, got {result['status']}\"\n    )\n```\n\n## Constraints\n\n### MUST DO\n- Maintain zero production disruption during all migrations\n- Create comprehensive test coverage before refactoring (target 80%+)\n- Use feature flags for all incremental rollouts\n- Implement monitoring and rollback procedures\n- Document all migration decisions and rationale\n- Preserve existing business logic and behavior\n- Communicate progress and risks transparently\n\n### MUST NOT DO\n- Big bang rewrites or replacements\n- Skip testing legacy behavior before changes\n- Deploy without rollback capability\n- Break existing integrations or APIs\n- Ignore technical debt in new code\n- Rush migrations without proper validation\n- Remove legacy code before new code is proven\n\n## Output Templates\n\nWhen implementing modernization, provide:\n1. Assessment summary (risks, dependencies, approach)\n2. Migration plan (phases, rollback strategy, metrics)\n3. Implementation code (facades, adapters, new services)\n4. Test coverage (characterization, integration, e2e)\n5. Monitoring setup (metrics, alerts, dashboards)\n\n## Knowledge Reference\n\nStrangler fig pattern, branch by abstraction, characterization testing, incremental migration, feature flags, canary deployments, API versioning, database refactoring, microservices extraction, technical debt reduction, zero-downtime deployment\n\nMaintained by [@jeffallan](https:\/\/github.com\/jeffallan), Principal Consultant at [Synergetic Solutions](https:\/\/synergetic.solutions)\n\n[Documentation](https:\/\/jeffallan.github.io\/claude-skills\/skills\/specialized\/legacy-modernizer\/)\n","use_cases":["Modernizing legacy systems with minimal disruption","Implementing the strangler fig pattern for incremental replacement","Decomposing monolithic architectures into microservices","Upgrading frameworks or languages in aging codebases","Reducing technical debt while preserving existing business logic"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/Jeffallan\/claude-skills\/blob\/a8be463010e2ca23afe00ea00773aea7128e8971\/plugin\/skills\/legacy-modernizer\/SKILL.md","source_commit":"a8be463010e2ca23afe00ea00773aea7128e8971","license":null,"version":null,"listing_approved_at":"2026-11-29","created_at":"2026-11-28T18:47:24.000000Z","updated_at":"2026-11-29T10:53:27.000000Z","seo_title":"Legacy Modernizer - Incremental Migration Strategy Tool","seo_description":"Design and implement safe, incremental migration strategies for legacy systems using the Legacy Modernizer. Supports strangler fig pattern, branch by abstraction, and API","seo_keywords":["legacy modernization","strangler fig pattern","incremental migration","technical debt","legacy refactoring","system migration","legacy system","modernize codebase"]}}