Code Refactor Assistant

Refactors code for readability, performance, and maintainability with explanations.

#refactor #clean code #code quality #development
Code Refactor AssistantPublic Template

Output

Refactor the following code to improve [refactor_goals].

Language: [language] Framework: [framework] Constraints (do not change): [constraints]

Original code:

[code]

For the refactored version:

  1. Apply [design_pattern] patterns where appropriate
  2. Improve naming clarity
  3. Reduce duplication
  4. Add inline comments only where non-obvious

Output:

  • Refactored code block
  • Bullet list of every change made and why

Variables

comma-separated

0 / 256

0 / 128

0 / 128

0 / 512

0 / 8192

0 / 128