Self-contained GPT image generation skill for creating PNG images through the ChatGPT Codex backend with prompt-file input and a minimal local Node CLI.
Self-contained GPT image generation skill for creating PNG images through the ChatGPT Codex backend with prompt-file input and a minimal local Node CLI.
Use when Codex needs to generate a new image from a text prompt, read a prompt verbatim from a local file, choose a backend-supported output size and quality, or save generated images to disk.
Stronger alternatives
This repository is archived — consider an actively maintained alternative.
Use --prompt for inline text or --prompt-file to read the prompt verbatim from disk.
Treat --size as a request to the current backend, not a guaranteed capability. Do not claim 4K support; use 1024x1024 as the safe default unless the backend confirms another size.
Report the absolute output path after generation.
Notes
Keep the prompt text unchanged when the user provides a finished prompt file.
The runtime entrypoint is scripts/cli.js; supporting validation tests live in scripts/test.js.
The CLI reads the local Codex login from ~/.codex/auth.json.
The CLI does not hardcode or derive any OAuth client identity; if the local access_token is near expiry, rerun codex login before generation.
The CLI writes PNG files and prints the backend-reported size when available.
If the backend rejects a requested size, retry with 1024x1024 instead of presenting the requested size as supported.