Agent skill

Legacy Modernizer

by Jeffallan in Jeffallan/claude-skills

Plans incremental migrations of aging systems with the strangler fig pattern, using dependency maps, rollback plans, characterization tests and gradual traffic shifts.

MITAuto-check passedDevelopment

Install Legacy Modernizer

skills CLI
$ npx skills add Jeffallan/claude-skills --skill legacy-modernizer -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Jeffallan/claude-skills legacy-modernizer --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Jeffallan/claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/legacy-modernizer .claude/skills/legacy-modernizer && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
legacy-modernizer
GitHub stars
12k
Token cost
~1.6k tokens
SKILL.md length
415 words
Files
6 (incl. references)
Skills in repo
58
Repo updated
First seen
Licence
MIT

At a glance

Plans incremental migrations of aging systems with the strangler fig pattern, using dependency maps, rollback plans, characterization tests and gradual traffic shifts.

  • Works in 5 steps: Assess system — Analyze codebase,… → Plan migration — Design an incremental… → Build safety net — Create… → …
  • Replacing a legacy module piece by piece without a big-bang rewrite
  • SKILL.md covers Core Workflow, Reference Guide, Code Examples and Constraints, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

The skill runs five phases, each with a validation checkpoint: assess the system and produce a dependency map and risk register, plan an incremental roadmap with a rollback trigger and owner per phase, build a safety net of characterization tests and monitoring, migrate behind a facade with feature flags, then validate and iterate. The safety net targets 80% or more coverage of existing behavior and must pass on the unmodified legacy system.

During migration, traffic moves in steps such as 5%, 25%, 50% and 100% while error rates and latency stay within baseline, and legacy code is removed only after the new path has been stable at full traffic for a release cycle. Reference files cover strangler fig, refactoring patterns such as branch by abstraction, migrations for databases, UI, APIs and frameworks, golden master testing, and system assessment. Python examples show a routing facade and a feature-flag wrapper.

When your agent uses it

  • Replacing a legacy module piece by piece without a big-bang rewrite
  • Mapping dependencies and risks before touching an old codebase
  • Adding characterization tests around code nobody dares to change
  • Routing traffic between old and new services behind a feature flag
  • Upgrading a framework or language version in stages

Example prompts

  • “Assess our legacy billing module and produce a dependency map and risk register.”
  • “Plan a strangler fig migration of the order service with a rollback trigger for each phase.”
  • “Write characterization tests for the pricing code before we refactor it.”
  • “Sketch a facade that sends five percent of requests to the new service behind a flag.”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Assess system — Analyze codebase, dependencies, risks, and business constraints. Produce a dependency map and risk register before…
  2. Plan migration — Design an incremental roadmap with explicit rollback strategies per phase. Reference references/system-assessment.md for…
  3. Build safety net — Create characterization tests and monitoring before touching production code. Target 80%+ coverage of existing behavior.
  4. Migrate incrementally — Apply strangler fig pattern with feature flags. Route traffic via a facade; shift load gradually.
  5. Validate & iterate — Run full test suite, review monitoring dashboards, and confirm business behavior is preserved before retiring legacy…

What it can do on your machine

Read from SKILL.md and the folder at commit 1be15d8. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com
    • synergetic.solutions
    • jeffallan.github.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Legacy Modernizer loads about 1.6k tokens when it runs, and up to ~16k if it reads all its reference files. Until then it costs about 104 tokens; SKILL.md has 415 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~104
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~16k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Jeffallan/claude-skills at commit 1be15d8, republished under its MIT licence (© Jeffallan). 415 words, ~1,568 tokens.

Download SKILL.mdSave it as .claude/skills/legacy-modernizer/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
legacy-modernizer
description
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.
license
MIT
metadata.author
https://github.com/Jeffallan
metadata.company
https://synergetic.solutions
metadata.version
1.1.0
metadata.domain
specialized
metadata.triggers
legacy modernization, strangler fig, incremental migration, technical debt, legacy refactoring, system migration, legacy system, modernize codebase
metadata.role
specialist
metadata.scope
architecture
metadata.output-format
analysis-and-code
metadata.related-skills
test-master, devops-engineer

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)
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
python
# 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)
Show full SKILL.md (167 more words)Show less
Characterization Test Template (pytest)
python
# 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

Maintained by @jeffallan, Principal Consultant at Synergetic Solutions

Documentation

© Jeffallan, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (references) in skills/legacy-modernizer of Jeffallan/claude-skills.

  • SKILL.md
  • references/legacy-testing.md
  • references/migration-strategies.md
  • references/refactoring-patterns.md
  • references/strangler-fig-pattern.md
  • references/system-assessment.md

Open the folder on GitHubat commit 1be15d8

Compare with similar skills

Legacy Modernizer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Legacy Modernizer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Legacy Modernizer this skillJeffallan/claude-skills12k—~1.6kAutomated safety check: PassMIT
Code Refactoring Workflowluongnv89/claude-howto42k—~3.1kAutomated safety check: PassMIT
Rails Upgrade Assistantombulabs/claude-code_rails-upgrade-skill391—~2.7kAutomated safety check: PassMIT
Fowler-Style Refactoringlhfer/claude-howto-zh-cn2.3k—~156Automated safety check: PassMIT
Extract Command from Git::Libruby-git/ruby-git1.8k—~4.4kAutomated safety check: PassMIT
Refactoring Skill (Vietnamese)luongnv89/claude-howto42k—~3.1kAutomated safety check: PassMIT

Similar skills

  • Code Refactoring Workflow

    luongnv89/claude-howto

    Guides systematic, test-backed refactoring in the style of Martin Fowler, moving through research, planning and small incremental changes with your approval at each phase.

    42k GitHub stars~3.1k tokensUpdated today
    DevelopmentAuto-check passed
  • Rails Upgrade Assistant

    ombulabs/claude-code_rails-upgrade-skill

    Analyzes a Rails app and builds an upgrade report with breaking changes, deprecations and step-by-step migration guides, one version at a time from Rails 2.3 through 8.1.

    391 GitHub stars~2.7k tokensUpdated 10 days ago
    DevelopmentAuto-check passed
  • Fowler-Style Refactoring

    lhfer/claude-howto-zh-cn

    基于 Martin Fowler 方法论做系统化重构。Use when users ask to refactor code, improve structure, reduce technical debt, clean up legacy code, or improve maintainability.

    2.3k GitHub stars~156 tokensUpdated 2 mo ago
    DevelopmentAuto-check passed
  • Migrates a direct command call in Ruby Git's Git::Lib to a Git::Commands class, as part of a Strangler Fig redesign, with a plan, legacy tests and a pull request.

    1.8k GitHub stars~4.4k tokensUpdated 9 days ago
    DevelopmentAuto-check passed
  • Refactoring Skill (Vietnamese)

    luongnv89/claude-howto

    Vietnamese edition of a systematic refactoring skill based on Martin Fowler's book, working in approved phases with small, test-backed changes.

    42k GitHub stars~3.1k tokensUpdated today
    DevelopmentAuto-check passed
  • Moai Workflow Ddd

    modu-ai/moai-adk

    Domain-Driven Development workflow specialist using ANALYZE-PRESERVE-IMPROVE cycle for behavior-preserving code transformation.

    1.2k GitHub stars~3.6k tokensUpdated yesterday
    DevelopmentAuto-check passed

More from Jeffallan/claude-skills

All 58 skills in this repo
  • API Designer

    Jeffallan/claude-skills

    Designs REST and GraphQL APIs from resource modeling to an OpenAPI 3.1 contract, with versioning, pagination and RFC 7807 error handling.

    12k GitHub starsUsed in 1 repo~2k tokens
    Auto-check passed
  • CLI Developer

    Jeffallan/claude-skills

    Walks through designing, building and polishing a command-line tool: user workflow and command hierarchy, implementation in commander, click, typer or cobra, completions and cross-platform testing.

    12k GitHub starsUsed in 1 repo~1.2k tokens
    Auto-check passed
  • Kubernetes Specialist

    Jeffallan/claude-skills

    Creates and checks Kubernetes manifests, Helm charts, RBAC and network policies, and helps debug pod problems, with kubectl checks and rollback steps.

    12k GitHub starsUsed in 1 repo~2.1k tokens
    Auto-check passed
  • Laravel Specialist

    Jeffallan/claude-skills

    Builds Laravel 10+ applications with Eloquent models, Sanctum authentication, Horizon queues, API resources and Livewire components, tested with Pest or PHPUnit.

    12k GitHub starsUsed in 1 repo~2.1k tokens
    Auto-check passed
  • Pandas Pro

    Jeffallan/claude-skills

    Handles pandas DataFrame work: cleaning, merging, groupby aggregation, pivots, time-series resampling and memory tuning, with checks on dtypes, shapes and nulls.

    12k GitHub starsUsed in 1 repo~1.5k tokens
    Auto-check passed
  • Apache Spark Engineer

    Jeffallan/claude-skills

    Guides writing and tuning Apache Spark jobs: DataFrame and RDD code, Spark SQL, partitioning, caching, shuffle tuning and structured streaming.

    12k GitHub starsUsed in 1 repo~1.7k tokens
    Auto-check passed

Categories

Questions about Legacy Modernizer

What does Legacy Modernizer do?

Plans incremental migrations of aging systems with the strangler fig pattern, using dependency maps, rollback plans, characterization tests and gradual traffic shifts. The skill runs five phases, each with a validation checkpoint: assess the system and produce a dependency map and risk register, plan an incremental roadmap with a rollback trigger and owner per phase, build a safety net of characterization tests and monitoring, migrate behind a facade with feature flags, then validate and iterate. The safety net targets 80% or more coverage of existing behavior and must pass on the unmodified legacy system.

When should I use Legacy Modernizer?

Legacy Modernizer fits situations like: replacing a legacy module piece by piece without a big-bang rewrite; mapping dependencies and risks before touching an old codebase; adding characterization tests around code nobody dares to change; routing traffic between old and new services behind a feature flag.

How do I install Legacy Modernizer in Claude Code?

Run `npx skills add Jeffallan/claude-skills --skill legacy-modernizer -a claude-code`. Or copy the skill folder (skills/legacy-modernizer in Jeffallan/claude-skills) into .claude/skills/legacy-modernizer in your project. Claude Code loads it when a task matches its description.

How do I install Legacy Modernizer in Codex?

Run `npx skills add Jeffallan/claude-skills --skill legacy-modernizer -a codex`. Or copy the skill folder (skills/legacy-modernizer in Jeffallan/claude-skills) into .agents/skills/legacy-modernizer in your project. Codex loads it when a task matches its description.

Can I use Legacy Modernizer in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Jeffallan/claude-skills --skill legacy-modernizer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/legacy-modernizer, .gemini/skills/legacy-modernizer, .github/skills/legacy-modernizer and .opencode/skills/legacy-modernizer in your project.

What does Legacy Modernizer need to run?

SKILL.md names no scripts, command-line tools or credentials: Legacy Modernizer is instructions for the agent only.

Does Legacy Modernizer access the network?

SKILL.md names 3 domains. As links in the text: github.com, synergetic.solutions and jeffallan.github.io. This is read from the text; nothing was executed.

Is Legacy Modernizer safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Legacy Modernizer use?

Legacy Modernizer is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Legacy Modernizer use?

About 1.6k tokens (SKILL.md is roughly 6.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 15k tokens, read only when the agent opens those files.

What are the alternatives to Legacy Modernizer?

Skills that share tags, products or a category with Legacy Modernizer: Code Refactoring Workflow (luongnv89/claude-howto, 42k stars), Rails Upgrade Assistant (ombulabs/claude-code_rails-upgrade-skill, 391 stars), Fowler-Style Refactoring (lhfer/claude-howto-zh-cn, 2.3k stars) and Extract Command from Git::Lib (ruby-git/ruby-git, 1.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Legacy Modernizer?

Jeffallan (a GitHub user) maintains it in Jeffallan/claude-skills, which has 11,802 GitHub stars. The repository holds 58 skills in this directory. The repository was last updated on October 3, 2026.

Source: Jeffallan/claude-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.