dotsfeed
← Updates

Codex

Make design mocks with Codex image generation: get four style options first, then fix one thing per round

Verified· Oct 6, 2026Published Oct 6, 2026

A shared prompt turns Codex's built-in image generation into a design-mock step: ask for four style directions, pick one, attach references with -i, and refine one change at a time.

What changed

Vox (@Voxyz_ai) shared a reusable prompt that turns Codex's built-in image generation into a design-mock step. Instead of asking for one image and hoping, you have Codex propose four clearly different style directions in one sentence each, pick one, and only then let it draw. The result is a mock a coding agent can build from. In Vox's setup, Claude Code calls Codex through codex exec, but the same flow works directly inside Codex.

Who is affected

Anyone using Codex (CLI, the ChatGPT desktop app, or the IDE extension) to make landing-page heroes, app screens, product shots, or posters, and anyone redesigning an existing page from a screenshot.

What to do now

  • Invoke the image skill explicitly by putting $imagegen in your prompt. OpenAI's docs name this skill.
  • Attach reference images with -i or --image, and say what each one controls by order, for example "image 1 sets the layout, image 2 sets the colors."
  • To keep editing the same image from a script or another agent, continue the session with codex exec resume --last (or a session ID). Resume also accepts -i for new references.
  • If you don't have a style in mind, ask for four distinct style directions first and tell Codex not to generate anything until you choose.
  • Put any in-image text in quotes exactly as it should appear. For a redesign, tell it to copy all text from image 1 exactly, or say "no text at all."
  • After each image, have Codex check it against the purpose, references, text, and constraints, list what missed, and change only one thing per round. OpenAI's own prompting guidance says the same: adjust one element at a time so the rest doesn't drift.
  • Once the mock is final, have your coding agent build the page from the image.

What is not confirmed

OpenAI documents $imagegen, the -i flag, and codex exec resume, but the four-styles-first pattern and the Claude Code to Codex handoff are Vox's own workflow, not an official recipe, and we haven't tested output quality ourselves. Image turns also cost more: OpenAI says built-in image generation uses gpt-image-2, counts toward your general Codex usage limits, and uses included limits 3 to 5 times faster on average. For large batches, the docs suggest setting OPENAI_API_KEY so API pricing applies instead.

Sources: Vox on X, Codex image generation docs, Codex CLI reference.

Sources

Get updates like this every morning

  1. ① Email
  2. ② Card on Stripe
  3. ③ 7 days free

Then $2/month · cancel anytime in one click