Coding

Refactor This Code

✦ Claude 🔥 87 trend score 👁 0 uses
#refactoring#clean-code#maintainability
Category
Coding
Platform
Claude
Trend Score
87/100
Total Uses
0
Prompt Template
Refactor the following code to improve readability, maintainability, and adherence to clean code principles. Current issues I suspect: [DESCRIBE]. Constraints: [MUST MAINTAIN API COMPATIBILITY / CANNOT CHANGE TESTS / etc.]

Code:
[PASTE CODE]

Provide: 1) Refactored version with clear diffs, 2) Explanation of each change and which principle it applies (DRY, SRP, etc.), 3) Any breaking changes or behavior differences, 4) Performance implications of the refactor, 5) What I should NOT refactor (things that look odd but exist for good reason). Show before/after side by side for the most impactful ...
Browse more Coding prompts