← Prompting Templates

Refactor for Readability

Improve code without changing behavior.

# Refactor for Readability

**Prompt**

> Refactor the code below for readability. Keep behavior identical. Explain each change in one line and list any risks.

**Fill in**

- Code: [paste]

**Tips**

- Specify constraints (no new dependencies)
- Ask for tests to verify