Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
jeffallan avatar

Legacy Modernizer

  • 3k installs
  • 10.8k repo stars
  • Updated May 20, 2026
  • jeffallan/claude-skills

legacy-modernizer is an agent skill that plans incremental legacy modernization with strangler fig facades, feature flags, characterization tests, and phased rollout.

About

Legacy Modernizer is a Jeffallan agent skill for incremental legacy system modernization without big-bang rewrites. The five-step workflow assesses dependencies and risks with documented external integrations, plans phased migration with rollback triggers and owners, builds an 80 percent characterization test safety net that passes green on unmodified legacy code, migrates incrementally via strangler fig facades and feature flags with gradual traffic shifts at 5, 25, 50, and 100 percent, and validates monitoring before retiring legacy paths after one stable release cycle at full traffic. Code examples include OrderServiceFacade routing between legacy and new services, flag_enabled environment wrappers, and pytest golden-master characterization tests. Constraints forbid big-bang replacements, skipping legacy behavior tests, deploying without rollback, breaking integrations, or removing legacy code before new paths are proven. Output templates deliver assessment summaries, migration plans, facade and adapter code, test coverage, and monitoring setup. Reference files cover strangler fig pattern, branch by abstraction, migration strategies, legacy testing, and system assessment templa.

  • Five-step assess, plan, safety net, incremental migrate, and validate workflow.
  • Strangler fig facade routes traffic via USE_NEW_ORDER_SERVICE style feature flags.
  • Requires 80 percent characterization test coverage green before touching legacy code.
  • Traffic migration checkpoints at 5, 25, 50, and 100 percent with metric thresholds.
  • Forbids big-bang rewrites and legacy removal before one stable release at full traffic.

Legacy Modernizer by the numbers

  • 3,025 all-time installs (skills.sh)
  • +86 installs in the week ending Jul 28, 2026 (Skillselion tracking)
  • Ranked #56 of 1,382 Code Review & Quality skills by installs in the Skillselion catalog
  • Security screen: MEDIUM risk (skills.sh audit)
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
At a glance

legacy-modernizer capabilities & compatibility

Capabilities
dependency and risk assessment with integration · strangler fig facade and feature flag routing pa · characterization and golden master test template · phased traffic migration with metric checkpoints · monitoring, rollback, and legacy retirement crit
Use cases
refactoring · testing · devops · api development
From the docs

What legacy-modernizer says it does

Maintain zero production disruption during all migrations
SKILL.md
Create comprehensive test coverage before refactoring (target 80%+)
SKILL.md
New code must be proven stable at 100% traffic for at least one release cycle
SKILL.md
npx skills add https://github.com/jeffallan/claude-skills --skill legacy-modernizer

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs3k
repo stars10.8k
Security audit3 / 3 scanners passed
Last updatedMay 20, 2026
Repositoryjeffallan/claude-skills

How do I modernize a legacy system incrementally without big-bang rewrites or production disruption?

Plan incremental legacy modernization with strangler fig facades, feature flags, characterization tests, and phased traffic migration.

Who is it for?

Teams decomposing monoliths or upgrading frameworks who need strangler fig routing and rollback-safe incremental migration.

Skip if: Skip when a greenfield rewrite without legacy behavior preservation is acceptable or characterization tests cannot be run.

When should I use this skill?

User mentions legacy modernization, strangler fig, incremental migration, technical debt reduction, or monolith decomposition.

What you get

Assessment, phased migration plan, facade code, characterization tests, monitoring, and proven traffic cutover before legacy retirement.

  • assessment summary
  • migration plan with rollback
  • facade and adapter code

By the numbers

  • [object Object]
  • [object Object]
  • [object Object]

Files

SKILL.mdMarkdownGitHub ↗

Legacy Modernizer

Core Workflow

1. Assess system — Analyze codebase, dependencies, risks, and business constraints. Produce a dependency map and risk register before proceeding.

  • Validation checkpoint: Confirm all external integrations and data contracts are documented before moving to step 2.

2. Plan migration — Design an incremental roadmap with explicit rollback strategies per phase. Reference references/system-assessment.md for code analysis templates.

  • Validation checkpoint: Confirm each phase has a defined rollback trigger and owner.

3. Build safety net — Create characterization tests and monitoring before touching production code. Target 80%+ coverage of existing behavior.

  • Validation checkpoint: Run the characterization test suite and confirm it passes green on the unmodified legacy system before proceeding.

4. Migrate incrementally — Apply strangler fig pattern with feature flags. Route traffic via a facade; shift load gradually.

  • Validation checkpoint: Verify error rates and latency metrics remain within baseline thresholds after each traffic increment (e.g., 5% → 25% → 50% → 100%).

5. Validate & iterate — Run full test suite, review monitoring dashboards, and confirm business behavior is preserved before retiring legacy code.

  • Validation checkpoint: New code must be proven stable at 100% traffic for at least one release cycle before legacy path is removed.

Reference Guide

Load detailed guidance based on context:

TopicReferenceLoad When
Strangler Figreferences/strangler-fig-pattern.mdIncremental replacement, facade layer, routing
Refactoringreferences/refactoring-patterns.mdExtract service, branch by abstraction, adapters
Migrationreferences/migration-strategies.mdDatabase, UI, API, framework migrations
Testingreferences/legacy-testing.mdCharacterization tests, golden master, approval
Assessmentreferences/system-assessment.mdCode analysis, dependency mapping, risk evaluation

Code Examples

Strangler Fig Facade (Python)

# facade.py — routes requests to legacy or new service based on a feature flag
import os
from legacy_service import LegacyOrderService
from new_service import NewOrderService

class OrderServiceFacade:
    def __init__(self):
        self._legacy = LegacyOrderService()
        self._new = NewOrderService()

    def get_order(self, order_id: str):
        if os.getenv("USE_NEW_ORDER_SERVICE", "false").lower() == "true":
            return self._new.fetch(order_id)
        return self._legacy.get(order_id)

Feature Flag Wrapper

# feature_flags.py — thin wrapper around an environment or config-based flag store
import os

def flag_enabled(flag_name: str, default: bool = False) -> bool:
    """Check whether a migration feature flag is active."""
    return os.getenv(flag_name, str(default)).lower() == "true"

# Usage
if flag_enabled("USE_NEW_PAYMENT_GATEWAY"):
    result = new_gateway.charge(order)
else:
    result = legacy_gateway.charge(order)

Characterization Test Template (pytest)

# test_characterization_orders.py
# Captures existing legacy behavior as a golden-master safety net.
import pytest
from legacy_service import LegacyOrderService

service = LegacyOrderService()

@pytest.mark.parametrize("order_id,expected_status", [
    ("ORD-001", "SHIPPED"),
    ("ORD-002", "PENDING"),
    ("ORD-003", "CANCELLED"),
])
def test_order_status_golden_master(order_id, expected_status):
    """Fail loudly if legacy behavior changes unexpectedly."""
    result = service.get(order_id)
    assert result["status"] == expected_status, (
        f"Characterization broken for {order_id}: "
        f"expected {expected_status}, got {result['status']}"
    )

Constraints

MUST DO

  • Maintain zero production disruption during all migrations
  • Create comprehensive test coverage before refactoring (target 80%+)
  • Use feature flags for all incremental rollouts
  • Implement monitoring and rollback procedures
  • Document all migration decisions and rationale
  • Preserve existing business logic and behavior
  • Communicate progress and risks transparently

MUST NOT DO

  • Big bang rewrites or replacements
  • Skip testing legacy behavior before changes
  • Deploy without rollback capability
  • Break existing integrations or APIs
  • Ignore technical debt in new code
  • Rush migrations without proper validation
  • Remove legacy code before new code is proven

Output Templates

When implementing modernization, provide: 1. Assessment summary (risks, dependencies, approach) 2. Migration plan (phases, rollback strategy, metrics) 3. Implementation code (facades, adapters, new services) 4. Test coverage (characterization, integration, e2e) 5. Monitoring setup (metrics, alerts, dashboards)

Knowledge Reference

Strangler 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

Documentation

Related skills

How it compares

Choose legacy-modernizer over generic TDD or refactoring skills when the codebase lacks reliable tests and you need golden-master safety nets plus phased strangler-fig migration plans.

FAQ

Are big-bang rewrites allowed?

No. The skill explicitly forbids big-bang replacements and requires incremental migration with rollback capability.

What test coverage is required before refactoring?

Create characterization tests targeting 80 percent or higher coverage of existing behavior and confirm they pass on unmodified legacy code.

When can legacy code be removed?

Only after new code is proven stable at 100 percent traffic for at least one release cycle.

Is Legacy Modernizer safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.