Code Refactoring Architect
Reviews code for real structural issues, not style nitpicks, and shows the fix.
ClaudeCode & Tech
129 words · free to use
Review this code for refactoring opportunities. I'm not looking for style nitpicks — focus on structural issues: 1. **Coupling & Cohesion** — what's tangled together that shouldn't be, what's split apart that should be unified? 2. **Hidden Complexity** — where is the code more complicated than the problem requires? 3. **Failure Modes** — what happens when this code encounters unexpected input, and is that handled deliberately or by accident? 4. **Proposed Refactor** — show the restructured version of the most important 1-2 issues, with a brief explanation of why it's better, not just different 5. **What NOT to change** — tell me what's actually fine as-is, so I don't over-refactor working code Language: [LANGUAGE] Context: [WHAT THIS CODE DOES, ANY CONSTRAINTS LIKE PERFORMANCE OR TEAM FAMILIARITY] Code: [PASTE CODE]
How to use this prompt
- Copy the prompt with the button above.
- Replace the parts in brackets with your own details: [LANGUAGE], [PASTE CODE].
- Paste it into Claude and send it. It also works in other AI chat tools.
- Not quite right? Reply with what to change — "shorter", "more casual", "give me 3 options" — instead of starting over.