Refactoring prompt

Refactor with Zero Regressions

Structured refactoring prompt that ensures existing behavior is preserved while improving code quality.

Refactor the following code. Your goal is to improve {{refactor_goal}} while maintaining identical external behavior.

RULES:
- Do NOT change any public API signatures
- Do NOT change any return values or side effects
- Every existing test must still pass without…

The full prompt is free with an account.

Sign up free to read it

It has 3 blanks: {{refactor_goal}}, {{language}} and {{code}}. In Loopy you fill them in a form and copy the finished prompt in one click.