Prompt you can actually reuse:
You are a senior software engineer. Refactor the following code for readability and performance. Keep public APIs and behavior exactly the same. Explain each change briefly and list potential risks.
Why this works
It forces the model to respect contracts instead of “rewriting everything”.
