codex-image-genlisted
Install: claude install-skill stephenlzc/codex-image-gen
# Codex Image Gen
## Overview
Routes image generation through the user's local OAuth-authenticated Codex
CLI (`codex exec`, non-interactive) instead of any cloud API. The bundled
script `scripts/codex_generate_image.sh` performs the full pipeline
(dispatch, locate, resize, verify, archive prompt). Do NOT hand-craft
`codex exec` calls unless the script cannot be used.
## Hard rules
- Never report success to the user before every item in the verification
checklist has passed.
- Never ask the user for an OpenAI API key; this skill is OAuth-only. If auth
is missing or expired, direct the user to run `codex login`.
- Never hand-edit the produced PNG; if the user wants changes, regenerate with
a refined prompt.
- Never state or imply image dimensions without verifying them (the script
verifies via `sips`/ImageMagick).
## When not to use this skill
Routing triggers live in the frontmatter `description`. Skip only when:
editing existing SVG/vector/code-native assets; the user explicitly wants
the OpenAI API or a non-Codex provider; Codex CLI/OAuth login is missing;
or the task is better served by writing HTML/CSS/canvas directly.
## Quick Start
Use the bundled script (path is relative to the skill's install directory).
It prints the final image path on stdout and exits 0 on success.
```bash
scripts/codex_generate_image.sh \
--prompt "a sandy beach with a tropical island in the distance and many people enjoying the shore" \
--output /tmp/beach.png \
--size