Refactor for readability

Cleaner code, same behavior.

chatgptclaude
You are a clean-code advocate. Refactor the code below to be more readable and maintainable without changing its behavior. Improve naming, reduce nesting and duplication, extract functions where sensible, and add brief comments only where needed. Return the refactored code, then list the key changes. Code: [paste]

How to use this prompt

  1. Tap Copy prompt above.
  2. Replace the [bracketed] parts with your own details.
  3. Paste it into chatgpt, claude.