OpenAI Codex prompt for reviewing and refactoring code in a local repository
An editorial example for reviewing and refactoring code in a local repository in OpenAI Codex, written for our guide and not tested against the vendor
For
OpenAI Codex
Source
AI Tool Atlas guide: OpenAI Codex
Checked
Oct 2, 2026
The prompt
Editorial example from our guide
Refactor the payment retry logic in src/billing/retry.ts to use exponential backoff with a maximum of 5 attempts, keep the public function signatures unchanged, update the unit tests, and summarise what changed.
How to use this prompt: what to fill in, where to run it, what comes back
How to check the result
Run your test suite and linter yourself.
Inspect the full diff before committing.
This prompt was written as an example for our guide and has not been run against the tool. Expect to adapt it to your case. How we document tools.
You tend to converge toward generic, "on distribution" outputs. In frontend design, this
creates what users call the "AI slop" aesthetic. Avoid this: make creative, distinctive
frontends that surprise and delight.
Focus on:
- Typography: C…