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

  1. 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.
  2. 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.
  3. Preserve intent in prompts. For anything quality-sensitive, read references/prompting.md before writing the final prompt. Done when the prompt states subject, scene/style, constraints, intended use, and required invariants.
  4. Treat parameters as gates. Bad size, transparent background, or unsupported format is a parameter problem; fix it rather than retrying blindly.
  5. 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.

When to use

Installs
3
Repository
xzhih/skills
First Seen
Jun 19, 2026