imagegen

imagegen is a command for Claude Code from colin-automates/Codex-ImageGen--Claude-Code. It costs 50 tokens per session (1,462 once invoked), scanned A, original, MIT.

A command for generating one image or a coordinated set of images from a text prompt. It can also check whether the image-generation setup is installed.

In plain words
What is it for?
Use it to create illustrations, icons, sprites, banners, covers, portraits, or other image assets from prompts, including sets that share a visual theme.
Why use it?
It gives a coding workflow a standard way to request images without manually choosing how to interpret single-image and multi-image prompts. It also provides defined defaults for output location, size, quality, and style.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: mentions Codex.

Part of the imagegen plugin — 1 skill, 4 commands, 1 MCP server shipped together

Good fit Use it to create illustrations, icons, sprites, banners, covers, portraits, or other image assets from prompts, including sets that share a visual theme.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/colin-automates/codex-imagegen--claude-code/imagegen
Install

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.

Clone the repo
git clone --depth 1 https://github.com/colin-automates/Codex-ImageGen--Claude-Code

Made for: Claude Code.

Or install imagegen, the plugin that ships this one along with the rest of its 1 skill, 4 commands, 1 MCP server.

Wrote 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.

agentmods badge for imagegen

README.md
[![agentmods](https://agentmods.dev/badge/commands/colin-automates/codex-imagegen--claude-code/imagegen/github.svg)](https://agentmods.dev/commands/colin-automates/codex-imagegen--claude-code/imagegen)
Your own site
<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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for imagegen

Your own site · 80×15
<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="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,462 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00050 $0.01462
Opus 5.5 $0.00020 $0.00585
Sonnet 5.5 $0.00010 $0.00292
Haiku 4.5 $0.00005 $0.00146

Measured 1mo ago against content hash 3838ae4c616d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 1mo 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.

plugins/imagegen/commands/imagegen.md · 71 lines

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 text is empty: ask the user once "What should I generate?" and stop. Do nothing else.
  • If text is exactly setup, --setup, -h, help, --help, or starts with setup or help (followed by whitespace) → go to Step 2 (setup mode).
  • If text clearly describes multiple coherent images that should share a visual identity → go to Step 4 (set mode). Triggers:
    • Pipe-separated prompts: text contains 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".
  • 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:

  1. Pick save_path per 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.
  2. Pick size: 1536x1024 if the prompt mentions "hero", "banner", "cover", "og", "wide", or "landscape"; 1024x1536 if "portrait", "vertical", or "tall"; otherwise 1024x1024.
  3. Pick quality: high if the prompt mentions "hero", "final", "print", or "brand"; otherwise medium.
  4. Pick style: photoreal if the prompt mentions "photo", "photograph", or "realistic"; otherwise leave as auto.
  5. Apply the prompt-construction guide from the SKILL (subject + action + setting + lighting + lens/framing + texture cues + composition) to expand text into a full prompt. Do not show the expanded prompt to the user.
  6. Call mcp__plugin_imagegen_imagegen__generate_image with the resolved arguments.
  7. On success: tell the user the path and dimensions in 1–2 short sentences. Don't echo the prompt.
  8. On failure: surface the hint field from the error envelope verbatim, plus a one-sentence next step.

Read the full file on GitHub · 71 lines

Changes

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.

  1. 1mo ago First seen · 71 lines · 50 tokens per session scan A 3838ae4c616d

Subscribe to this mod's changes

imagegen is a command published in the GitHub repository colin-automates/Codex-ImageGen--Claude-Code (4 stars, last pushed 5mo ago), licensed MIT. It adds 50 tokens to every session and 1,462 once invoked, about $0.0002 per session on Opus 5.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.