codex-image-gen
Installation
SKILL.md
Codex Image Generation
Generate or edit images via the direct Images API by default (gpt-image-2),
working with two interchangeable auth modes. The request body is identical
across modes for the default path; only the endpoint and auth headers differ — and
the bundled Node script hides all of that. Use --api responses only when you need
the Responses image_generation compatibility path. The Node script is standalone:
it does not fall back to Python or curl.
Core Contract
- Classify the ask. Decide whether this is generation, edit, reference-guided generation, transparent cutout, or prompt help. Done when the output path, format, size, and source image roles are clear.
- Use the script. Prefer
scripts/generate.mjs; do not hand-roll HTTP unless debugging or porting. Done when the script prints its JSON summary and saved paths. - Preserve intent in prompts. For anything quality-sensitive, read
references/prompting.mdbefore writing the final prompt. Done when the prompt states subject, scene/style, constraints, intended use, and required invariants. - Treat parameters as gates. Bad size, transparent background, or unsupported format is a parameter problem; fix it rather than retrying blindly.
- Report evidence. Return saved path(s), mode, size/format when known, and any limitation such as ChatGPT-login fixed quality or chroma-key transparency risk.