image-gen-router

image-gen-router is a skill for Codex from andrewii23/ii23-skills. It costs 239 tokens per session (2,092 once invoked), scanned A, original, MIT.

A local skill for generating raster images from text prompts through either the Codex image tool or Google's Gemini command-line tool. Raster images are pixel-based files such as PNGs.

In plain words
What is it for?
Use it when you want to create, draw, make, or render an image from a text description.
Why use it?
It provides one workflow for choosing between the two available image-generation backends.

Skill for Codex

Written for Codex: reads $CODEX_HOME. Also seen: reads .claude/ paths; names the AskUserQuestion tool; runs codex exec.

Good fit Use it when you want to create, draw, make, or render an image from a text description.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/andrewii23/ii23-skills/image-gen-router
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.

Any agent
npx skills add andrewii23/ii23-skills --skill image-gen-router
Clone the repo
git clone --depth 1 https://github.com/andrewii23/ii23-skills

Made for: Codex.

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 image-gen-router

README.md
[![agentmods](https://agentmods.dev/badge/skills/andrewii23/ii23-skills/image-gen-router/github.svg)](https://agentmods.dev/skills/andrewii23/ii23-skills/image-gen-router)
Your own site
<a href="https://agentmods.dev/skills/andrewii23/ii23-skills/image-gen-router"><img src="https://agentmods.dev/badge/skills/andrewii23/ii23-skills/image-gen-router/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 image-gen-router

Your own site · 80×15
<a href="https://agentmods.dev/skills/andrewii23/ii23-skills/image-gen-router"><img src="https://agentmods.dev/badge/skills/andrewii23/ii23-skills/image-gen-router.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 239 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,092 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.00239 $0.02092
Opus 5.5 $0.00096 $0.00837
Sonnet 5.5 $0.00048 $0.00418
Haiku 4.5 $0.00024 $0.00209

Measured 2d ago against content hash 2bb46d889ddd, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

image-gen-router 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.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/gen_gemini.py, scripts/gen_gpt.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/image-gen-router/SKILL.md · 178 lines

How it starts

The opening of the file, as written. The whole thing — 178 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Image Gen Router

Claude cannot generate a raster image, but the user's ChatGPT and Google accounts can. This skill generates a raster image by driving one of two official CLIs, headless, under the account the user is already signed into: no API key, no per-image API bill, exactly as if the user typed the prompt into that tool themselves.

  • GPT — the OpenAI Codex CLI (codex exec with its built-in $imagegen skill, model gpt-image-2), under the user's ChatGPT login. It counts toward the Codex plan's usage limits.
  • Gemini — the Google Antigravity CLI (agy -p, headless mode, its built-in image tool), under the user's Google login. It uses the plan's Antigravity quota.

The whole point of this skill is letting the user pick the model. Everything else (subject, style, aspect, palette, mood) flows straight from the prompt into the chosen backend.

The one decision that matters: which backend

Before generating, you must know which backend to use. There are exactly two cases:

1. The user already named a backend → use it, don't ask. Honor whatever they said and skip straight to generation. Map their words like this:

  • GPT, OpenAI, ChatGPT, codex, "the gpt one", DALL·E (as a model family, not the API) → gpt
  • Gemini, Google, agy, Antigravity, "nano banana", "the google one" → gemini

Asking again when they've already told you is annoying and wastes a turn — the user was explicit for a reason.

2. The user did NOT name a backend → ask, with no default. Use the AskUserQuestion tool with a single question and exactly two options, presented as equals (neither marked "recommended" — the user didn't express a preference, so don't manufacture one). For example:

AskUserQuestion(questions=[{
  "question": "Which model should generate this image?",
  "header": "Image model",
  "multiSelect": false,
  "options": [
    {"label": "GPT (codex)", "description": "OpenAI image model via Codex CLI, under your ChatGPT login."},
    {"label": "Gemini (agy)", "description": "Google image model via Antigravity CLI, under your Google login."}
  ]
}])

Read the full file on GitHub · 178 lines

Files

What ships with it

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

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. 2d ago Changed · +18 lines 2bb46d889ddd
  2. 2mo ago First seen · 160 lines · 239 tokens per session scan A b00472d6aeea

Subscribe to this mod's changes

image-gen-router is a skill published in the GitHub repository andrewii23/ii23-skills (11 stars, last pushed 3d ago), licensed MIT. It adds 239 tokens to every session and 2,092 once invoked, about $0.0010 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.

Related

image-gen-router compared with skills from other repositories

image-gen-router next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
image-gen-routerandrewii23/ii23-skillsSkill113d agoMITA239Codex
imagegenopenai/codexSkill134ktodayApache-2.0A113Codex
playwright-climicrosoft/playwrightSkill99ktodayApache-2.0A19Claude Code
local-ai-agentsmicrosoft/ai-agents-for-beginnersSkill79ktodayMITA200Claude Code, Codex
systematic-debuggingobra/superpowersSkill314k3d agoMITA21Claude Code
next-cache-components-adoptionvercel/next.jsSkill143kyesterdayMITA95Claude Code
next-partial-prefetching-adoptionvercel/next.jsSkill143kyesterdayMITA103Claude Code