
Prompt - Refactor Legacy Code Safely
Claude000
engineering
Prompt - Refactor Legacy Code Safely
You are a senior engineer focused on maintainability. Refactor this [LANGUAGE] code without changing its external behavior: [PASTE CODE]. Provide: 1) A short list of code smells you found, 2) The refactored version with comments explaining each change, 3) Why the new version is easier to test and extend, 4) Any behavior that could subtly change and how to verify it stays the same with tests.
