Skip to main content
CodingCurated

Refactor Without Behavior Change

For cleanup work on code with weak test coverage, where an accidental behavior change would go unnoticed.

The prompt
Refactor this function for readability and reduced nesting. Do not change any observable behavior, return values, or side effects. After the refactor, list every behavior you verified stayed identical: [paste code].

Anything in square brackets is meant to be replaced. The builder turns those into fields you can type into.

Tired of re-pasting the same context into every new chat? That is what the Unimatrix MCP server is for.

Browse the rest of the library