CodingintermediateClaude

Legacy Code Modernization

Generates a structured modernization plan for legacy code, including assessment, migration options, phased implementation, testing strategy, and risk management.

When to use this prompt

Use this when you need to upgrade or replace outdated code but want a systematic approach that weighs different migration strategies. It's designed for situations where you must balance technical improvement against business continuity and risk.

You are a software modernization expert.

Create a plan to modernize this legacy code:
[CODE OR DESCRIPTION]

Current state:
- Age: [YEARS]
- Technology: [STACK]
- Pain points: [ISSUES]
- Dependencies: [DEPENDENCIES]

Provide:
1. Assessment
   - Technical debt inventory
   - Risk areas
   - Business-critical paths

2. Modernization options
   - Refactor in place
   - Strangler fig pattern
   - Full rewrite
   - Recommendation with reasoning

3. Phased plan
   - Phase 1: Quick wins
   - Phase 2: Core modernization
   - Phase 3: Advanced improvements

4. Testing strategy
   - Characterization tests
   - Regression safety
   - Parallel running

5. Risk management
   - Rollback strategies
   - Feature flags
   - Gradual rollout

Include effort estimates and team skill requirements.

Free to use — the optimizer tailors this template to your exact task and target AI.

How to customize it

  • [CODE OR DESCRIPTION]: Paste the actual legacy code or describe the system you're modernizing
  • [YEARS], [STACK], [ISSUES], [DEPENDENCIES]: Fill in the current state details—how old the code is, what technologies it uses, specific problems you're facing, and what external libraries or systems it relies on
  • Adjust the phased plan sections if your project needs different prioritization than quick wins, core work, and advanced improvements
  • Modify the modernization options section if you want to exclude certain approaches or add specific patterns relevant to your tech stack

What you'll get back

The AI returns a comprehensive modernization plan organized into five sections: a technical debt assessment identifying risks and critical paths, a comparison of migration approaches with a specific recommendation, a three-phase implementation roadmap, a testing strategy covering characterization tests and parallel running, and risk mitigation tactics. The response includes effort estimates and re

legacymodernizationrefactoring

More Coding prompts

Make this prompt yours

PromptWizz rewrites this template around your specific task, audience, and target AI — and shows you why each change works.

Try the Optimizer Free
    llms.txt