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 commands/colin-automates/codex-imagegen--claude-code/imagegengit clone --depth 1 https://github.com/colin-automates/Codex-ImageGen--Claude-CodeWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/colin-automates/codex-imagegen--claude-code/imagegen)<a href="https://agentmods.dev/commands/colin-automates/codex-imagegen--claude-code/imagegen"><img src="https://agentmods.dev/badge/commands/colin-automates/codex-imagegen--claude-code/imagegen.svg" alt="Measured on agentmods" height="20"></a>What 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.00050 | $0.01462 |
| Opus 5 | $0.00025 | $0.00731 |
| Sonnet 5 | $0.00010 | $0.00292 |
| Haiku 4.5 | $0.00005 | $0.00146 |
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 3d 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.
How it starts
The opening of the file, as written. The whole thing — 71 lines — stays where its author put it; the contents beside it link to each section on GitHub.
The user invoked /imagegen. Raw arguments:
$ARGUMENTS
Step 1 — dispatch on the first token
Take $ARGUMENTS, trim whitespace, then strip a single layer of surrounding "…" or '…' quotes if present. Call the result text.
- If
textis empty: ask the user once "What should I generate?" and stop. Do nothing else. - If
textis exactlysetup,--setup,-h,help,--help, or starts withsetuporhelp(followed by whitespace) → go to Step 2 (setup mode). - If
textclearly describes multiple coherent images that should share a visual identity → go to Step 4 (set mode). Triggers:- Pipe-separated prompts:
textcontains a literal|between distinct subjects (legacy set syntax — still supported). - Numeric multi-image phrasing: "three icons for X", "five sprites of Y", "a set/series/pack/collection/roster of N", "N variants of Z".
- Plural request with shared theme: "icons for the home, settings, and profile pages", "headers for the four blog posts about X", "enemies in red, blue, and green".
- Pipe-separated prompts:
- Otherwise → go to Step 3 (single-image generation).
Step 2 — setup mode (equivalent to /imagegen:setup)
Execute the exact procedure documented in commands/setup.md. That procedure handles the codex install check, auto-launches a browser sign-in window with polling if the user is not logged in, runs a probe image, and reports the outcome. Do not duplicate or summarize its steps — read commands/setup.md and follow it verbatim.
Step 3 — single-image generation
The text from Step 1 is the user's image prompt. Do this immediately, without asking for confirmation:
- Pick
save_pathper the SKILL's defaults table:- If
./public/images/exists → save there. - Else if
./public/exists → save there. - Else if
./assets/exists → save there. - Else if
./images/exists → save there. - Else default to
./generated/<timestamp>-<slug>.png, creating the dir.<slug>is the prompt's first 3–6 meaningful words, lowercase-hyphenated.
- If
- Pick
size:1536x1024if the prompt mentions "hero", "banner", "cover", "og", "wide", or "landscape";1024x1536if "portrait", "vertical", or "tall"; otherwise1024x1024. - Pick
quality:highif the prompt mentions "hero", "final", "print", or "brand"; otherwisemedium. - Pick
style:photorealif the prompt mentions "photo", "photograph", or "realistic"; otherwise leave asauto. - Apply the prompt-construction guide from the SKILL (subject + action + setting + lighting + lens/framing + texture cues + composition) to expand
textinto a full prompt. Do not show the expanded prompt to the user. - Call
mcp__plugin_imagegen_imagegen__generate_imagewith the resolved arguments. - On success: tell the user the path and dimensions in 1–2 short sentences. Don't echo the prompt.
- On failure: surface the
hintfield from the error envelope verbatim, plus a one-sentence next step.
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.
- 3d ago First seen · 71 lines · 50 tokens per session scan A 3838ae4c616d
imagegen is a command published in the GitHub repository colin-automates/Codex-ImageGen--Claude-Code (2 stars, last pushed 4mo ago), licensed MIT. It adds 50 tokens to every session and 1,462 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
imagine-pro
Generate an AI image with ImaginePro using best practices and intelligent guidance.
speckit.checklist
Generate a custom checklist for the current feature based on user requirements.
git
Git operations with intelligent commit messages and workflow optimization.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.