codex-image-gen
Installation
SKILL.md
Image Generation via the codex CLI
Overview
The codex CLI carries its own ChatGPT authentication and ships a built-in image
tool, so any agent on this machine can generate images through it with no
OPENAI_API_KEY and no other image service.
codex exec has no "write the image to this path" flag: it saves what it
generates to $CODEX_HOME/generated_images/<session id>/.
scripts/codex_image.py runs one non-interactive turn and collects only images
saved under that run's exact session ID. If the session ID or its saved images
are missing, it fails without writing output.
Always go through the script. A hand-rolled codex exec "draw me a cat" very
often returns prose or an ImageMagick drawing instead of a generated image, and
leaves you to find the output yourself.