Refactor Legacy Code

Transform legacy code into modern, maintainable patterns.

ChatGPTClaudeCopilot
Refactoringrefactoringmodernizationclean-code
by Clean Code Team
Feb 1, 2024
0upvotes
Variables
Prompt Template
Act as a refactoring expert specializing in {{language}}. Here is legacy code that needs modernization: ```{{language}} {{code}} ``` Target patterns/frameworks: {{targetPatterns}} Please: 1. Analyze current code structure and issues 2. Propose refactoring strategy 3. Provide refactored code with comments 4. Explain changes and benefits 5. List any breaking changes 6. Suggest tests to ensure functionality

Other Useful Prompts