Coding Editorial example

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: fill the variables, run it in OpenAI Codex, check the resultYOU FILL INReady to runPaste the prompt as isNo variables to replaceTHE PROMPTOpenAI Codex33 words · 1 linesource: editorial exampleYOU GETThe resultAn editorial example for reviewin…check the result against the tipscopy, paste, run in OpenAI Codexfill → run → check · prompts are copied word for word from their source
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.

Where to run it

More coding prompts

Coding Vendor library

Sample prompt for frontend aesthetics

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…
241 words · for Claude