Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/chenrui333/codex-docs/imagegennpx skills add chenrui333/codex-docs --skill imagegengit clone --depth 1 https://github.com/chenrui333/codex-docsWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00113 | $0.04949 |
| Opus 5 | $0.00056 | $0.02475 |
| Sonnet 5 | $0.00023 | $0.00990 |
| Haiku 4.5 | $0.00011 | $0.00495 |
Grade A, and why
imagegen scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
This is a copy
89% identical to imagegen — 12 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 324 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Image Generation Skill
Generates or edits images for the current project (for example website assets, game assets, UI mockups, product mockups, wireframes, logo design, photorealistic images, or infographics).
Top-level modes and rules
This skill has exactly two top-level modes:
- Default built-in tool mode (preferred): built-in
image_gentool for image generation, editing, and transparent-image requests. Does not requireOPENAI_API_KEY. - Fallback CLI mode:
scripts/image_gen.pyCLI. Use when the user explicitly asks for or confirms the CLI/API/model path. RequiresOPENAI_API_KEY.
Within CLI fallback, the CLI exposes three subcommands:
generateeditgenerate-batch
Rules:
- Use the built-in
image_gentool by default for normal image generation and editing requests. - Do not switch to CLI fallback for ordinary quality, size, or file-path control.
- For transparent images, ask built-in
image_genfor a transparent background and preserve the generated alpha. - Never silently switch from built-in
image_genor CLIgpt-image-2to CLIgpt-image-1.5; ask the user first unless they explicitly requestedgpt-image-1.5. - The word
batchby itself does not mean CLI fallback. If the user asks for many assets or says to batch-generate assets without explicitly asking for CLI/API/model controls, stay on the built-in path and issue one built-in call per requested asset or variant. - If the built-in tool fails or is unavailable, tell the user the CLI fallback exists and that it requires
OPENAI_API_KEY. Proceed only if the user explicitly asks for that fallback. - If the user explicitly asks for CLI mode, use the bundled
scripts/image_gen.pyworkflow. Do not create one-off SDK runners. - Never modify
scripts/image_gen.py. If something is missing, ask the user before doing anything else.
Built-in save-path policy:
- In built-in tool mode, Codex saves generated images under
$CODEX_HOME/*by default. - Do not describe or rely on OS temp as the default built-in destination.
- Do not describe or rely on a destination-path argument (if any) on the built-in
image_gentool. If a specific location is needed, generate first and then move or copy the selected output from$CODEX_HOME/generated_images/.... - Save-path precedence in built-in mode:
- If the user names a destination, move or copy the selected output there.
- If the image is meant for the current project, move or copy the final selected image into the workspace before finishing.
- If the image is only for preview or brainstorming, render it inline; the underlying file can remain at the default
$CODEX_HOME/*path.
- Never leave a project-referenced asset only at the default
$CODEX_HOME/*path. - Do not overwrite an existing asset unless the user explicitly asked for replacement; otherwise create a sibling versioned filename such as
hero-v2.pngoritem-icon-edited.png.
What ships with it
11 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- agents/openai.yaml 275 B
- assets/imagegen-small.svg 2.8 KB
- assets/imagegen.png 1.7 KB
- LICENSE.txt 11 KB
- references/cli.md 11 KB
- references/codex-network.md 3.2 KB
- references/image-api.md 7.4 KB
- references/prompting.md 9.5 KB
- references/sample-prompts.md 19 KB
- scripts/image_gen.py 33 KB runs code
- scripts/remove_chroma_key.py 14 KB runs code
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 324 lines · 113 tokens per session scan A 96085ac4e883
imagegen is a skill published in the GitHub repository chenrui333/codex-docs (5 stars, last pushed 2d ago), licensed MIT. It adds 113 tokens to every session and 4,949 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. It is 89% identical to imagegen, differing in 12 lines, and is treated as a copy.
Other skills, from other repositories
imagegen
Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…
emil-design-eng
This skill encodes Emil Kowalski's philosophy on UI polish, component design, animation decisions, and the invisible details that make software feel great.
image-generation
Generate or edit images from text prompts. Use when the user asks to create, draw, design, or edit an image, illustration, photo, icon, poster, or any visual content.
powerpoint
Create designed, editable PowerPoint .pptx presentations with PptxGenJS. Use when the user asks to create, generate, update, or inspect a deck, slide deck, presentation, or .pptx file.
sherpa-onnx-tts
Local text-to-speech via sherpa-onnx (offline, no cloud).
sag
ElevenLabs text-to-speech with mac-style say UX.