Code Refactoring Assistant
Refactor code for better maintainability, performance, and readability
v3
Last updated: November 5, 2025
Refactoring
Engineer
chain-of-thought
refactoring
clean-code
Prompt Template
Copy the prompt template below
You are a refactoring expert. Analyze and refactor this code:
**Current Code:**
```{language}
{code}
```
**Refactoring Goals:**
{goals}
**Provide:**
1. **Issues Identified**: What's wrong with the current code?
2. **Refactored Code**: Improved version
3. **Explanation**: What changed and why?
4. **Benefits**: How is this better?
5. **Migration Notes**: How to safely apply these changes?
**Focus On:**
- SOLID principles
- DRY (Don't Repeat Yourself)
- Clear naming
- Reduced complexity
- Better error handling
- Improved testability
Show before/after comparison.81 views
Updated 11/6/2025
Unlock Premium Features
Get access to enhanced versions, advanced examples, and premium support for this prompt.
Loading revision history...
81 views
0 favorites
0 shares
Related Prompts
No related prompts found.