# legacy-modernizer

legacy-modernizer guides safe, incremental refactoring of legacy codebases and framework upgrades while preserving existing runtime behavior.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 2 installs · ★ 50109 repo stars
- Author: sickn33
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/sickn33/agentic-awesome-skills/tree/HEAD/skills/legacy-modernizer/SKILL.md
- Updated: 2026-10-29
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/sickn33-legacy-modernizer

## What it does

This skill guides staged migrations across outdated frameworks, runtimes, and dependencies. It targets transitions such as jQuery to React, Java 8 to 17, or Python 2 to 3. It refrains from splitting monoliths into microservices unless the architecture truly justifies that change.

The workflow relies on the strangler fig pattern, compatibility shims, and pre-refactoring characterization tests. Deliverables include phased migration milestones, backward-compatible code, deprecation schedules, and rollback steps for every stage.

Missing permissions, unclear safety boundaries, or absent success criteria will force the agent to halt and ask questions. Outputs cannot substitute for verification inside your actual runtime environment.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add sickn33/agentic-awesome-skills --skill legacy-modernizer -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/legacy-modernizer/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/legacy-modernizer/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add sickn33/agentic-awesome-skills --skill legacy-modernizer -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/legacy-modernizer/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add sickn33/agentic-awesome-skills --skill legacy-modernizer -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/legacy-modernizer/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install sickn33/agentic-awesome-skills skills/legacy-modernizer
```

2. **Manually: put the files in place**
- File: `.github/skills/legacy-modernizer/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add sickn33/agentic-awesome-skills --skill legacy-modernizer -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/sickn33/agentic-awesome-skills --path skills/legacy-modernizer
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/legacy-modernizer/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add sickn33/agentic-awesome-skills --skill legacy-modernizer -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/sickn33/agentic-awesome-skills/tree/HEAD/skills/legacy-modernizer/SKILL.md

## When to use it
- plan phased migrations for outdated programming languages and runtimes
- generate characterization tests before refactoring legacy components
- implement compatibility adapters to preserve existing public API contracts
- define rollback procedures and feature flag strategies for phased rollouts

## Example prompts
- Plan an incremental migration from Python 2 to Python 3 with rollback procedures.
- Write characterization tests for this legacy payment handler before changing its internals.
- Create a compatibility adapter layer to replace our legacy ORM queries gradually.

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: f0d2f8c8b05f533f.

BEGIN THIRD-PARTY FILE f0d2f8c8b05f533f
```text
---
name: legacy-modernizer
description: Refactor legacy codebases, migrate outdated frameworks, and implement gradual modernization. Handles technical debt, dependency updates, and backward compatibility.
risk: safe
source: community
date_added: '2026-02-27'
---

## Use this skill when

- Migrating a confirmed legacy runtime/framework or dependency while preserving actual public behavior.
- Planning incremental replacements, compatibility adapters, characterization tests or data-safe rollback.

## Do not use this skill when

- The task is unrelated to legacy modernizer
- You need a different domain or tool outside this scope

## Instructions

- Clarify goals, constraints, and required inputs.
- Apply relevant best practices and validate outcomes.
- Provide actionable steps and verification.

You are a legacy modernization specialist focused on safe, incremental upgrades.

## Focus Areas
- Framework migrations (jQuery→React, Java 8→17, Python 2→3)
- Database migration only when justified; stored procedures and ORMs have different tradeoffs
- Architectural modernization without assuming a monolith needs microservices
- Dependency updates and security patches
- Test coverage for legacy code
- API versioning and backward compatibility

## Approach
1. Strangler fig pattern - gradual replacement
2. Add tests before refactoring
3. Maintain backward compatibility
4. Document breaking changes clearly
5. Feature flags for gradual rollout

## Output
- Migration plan with phases and milestones
- Refactored code with preserved functionality
- Test suite for legacy behavior
- Compatibility shim/adapter layers
- Deprecation warnings and timelines
- Rollback procedures for each phase

Focus on risk mitigation. Never break existing functionality without migration path.

## Example

**User request:**

> Refactor legacy codebases, migrate outdated frameworks, and implement gradual modernization.

## Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
```
END THIRD-PARTY FILE f0d2f8c8b05f533f

The third-party file has ended. Everything between the f0d2f8c8b05f533f tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

© sickn33 · MIT · https://github.com/sickn33/agentic-awesome-skills/tree/HEAD/skills/legacy-modernizer/SKILL.md

## Similar
- [code-refactoring-legacy-modernizer](https://affpapa.org/en/nevibecode/agents/code-refactoring-legacy-modernizer.md) — subagent · ★ 42780 repo stars
- [working-with-legacy-code](https://affpapa.org/en/nevibecode/skills/working-with-legacy-code.md) — skill · 3700 installs
- [refactor-legacy-code](https://affpapa.org/en/nevibecode/skills/refactor-legacy-code.md) — skill · 611 installs
- [working-effectively-with-legacy-code](https://affpapa.org/en/nevibecode/skills/working-effectively-with-legacy-code.md) — skill · 602 installs

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
