In the Skill's Own Terms
Imagegen gives Codex a raster-image workflow: generate or edit bitmap assets such as photos, illustrations, textures, sprites, mockups, and transparent-background cutouts, then get the finished file into the project. It defines two top-level modes: the preferred built-in image_gen tool, which needs no API key, and an explicit-only CLI fallback through scripts/image_gen.py requiring OPENAI_API_KEY.
The file separates intent (generate versus edit) from execution (one asset or many), collects prompts, verbatim text, constraints and role-labeled input images, and reshapes them into a labeled schema. It ends with validation against subject, style, composition and text accuracy, single-change iteration, and non-destructive saves.
What it produces
- A bitmap image produced through image_gen rather than an SVG, HTML/CSS, or canvas placeholder, whenever the user asked for a raster-style asset.
- The selected final image moved or copied into the workspace, with any consuming code or references updated to point at it.
- A closing report giving the final saved path of any workspace-bound asset, the final prompt, and which mode produced it.
- In the explicit CLI fallback only, final artifacts written under output/imagegen/.
How It Works
- 01Pick the top-level Mode First
Normal generation and editing runs through the built-in image_gen tool; the bundled CLI is a fallback the user has to ask for by name.
- 02Classify the Request as Generate or Edit
Modifying an existing image while keeping parts of it is an edit; supplying images purely as style, composition or mood references is still a generation.
- 03Decide Where the Output Lives
Preview or brainstorming work can stay inline at the default location, while anything the project consumes has to end up in the workspace.
- 04Collect Inputs Before Generating
Gather the prompt, any exact in-image text, the constraints or avoid list, and all input images up front rather than filling gaps later.
- 05Reshape the Prompt into a Spec
Prompts are normalized into a structured, production-oriented spec instead of being expanded with unrequested creative detail.
- 06Issue One Call per Asset
In the built-in path, batches and variants come from repeated image_gen calls, one per requested asset or variant, not from a single batch flag.