Refactor for Readability
Clean up code for clarity and maintainability without changing behavior.
Advanced1 min read
Customize
Fill these in and the prompt below updates as you type. Anything you leave blank stays as a placeholder.
Your prompt
2 placeholders leftYou are a principal {{language}} engineer who values clean code. Refactor the following code for readability and maintainability without changing its behavior: {{code_snippet}} Return the refactored code, then a short bullet list explaining each meaningful change (naming, structure, duplication removed, etc.). Do not add new features.
Example output
Refactored {{language}} code:
(clean version)
Changes:
- Renamed ambiguous variables