← ClaudeAtlas

codex-imagelisted

Generate images via Codex CLI's built-in `image_generation` tool (`codex exec`), single or many in parallel. Use when the user wants images from codex, or batch/parallel image generation.
zeikar/dotfiles · ★ 1 · Data & Documents · score 74
Install: claude install-skill zeikar/dotfiles
# Codex Image Generation Drive Codex CLI's built-in `image_generation` tool non-interactively with `codex exec`. The point of this skill is throughput: each `codex exec` is an isolated session, so running several in the background gives near-true parallelism without touching an API key. ## Preflight ```bash codex --version # recent build codex login status # expect "Logged in using ChatGPT" codex features list | grep image_generation # the tool must be enabled ``` If not logged in, ask the user to run `codex login` once before proceeding. If `image_generation` is absent, the tool is disabled — surface that rather than retrying blindly. ## Single image ```bash codex exec \ --sandbox workspace-write \ --skip-git-repo-check \ -c project_doc_max_bytes=0 \ -c model_reasoning_effort=low \ --cd <work_dir> \ -o /tmp/codex-img.md \ "Use the image generation tool to create an image of '<prompt>'. Save it to ./<output>.png. Reply with only the file path on one line." ``` The two `-c` overrides are what keep a job from paying for work it does not do: - **`project_doc_max_bytes=0`** — codex walks up from `--cd` and injects the enclosing repo's `AGENTS.md` and `README.md` as project context. A `work_dir` inside a repo therefore ships that repo's instructions with every image. Measured on one real run: 19,277 tokens for a single drawing, most of it a README the image tool never sees. Harmless when `work_dir`