Codex-ImageGen--Claude-Code
A Claude Code plugin that generates images via OpenAI Codex CLI's built-in gpt-image — billed against your ChatGPT plan, no API key, no per-image charges. Auto-activates whenever your task involves a missing image
Install / Use
claude mcp add colin-automates -- npx -y github:colin-automates/Codex-ImageGen--Claude-CodeIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
AI & Machine LearningSupported Platforms
Our assessment of Codex-ImageGen--Claude-Code
Codex-ImageGen--Claude-Code scores 70/100 on our quality scale, 880th of 955 AI & Machine Learning skills we index.
Its MCP Server is 11 KB long, well organised into 19 sections with 7 code examples: a thorough specification that gives an agent plenty to work with.
It has 3 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated about 5 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 90/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Codex-ImageGen--Claude-Code compared with similar skills
All 4 of these similar skills score higher than Codex-ImageGen--Claude-Code; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| Codex-ImageGen--Claude-Code (this skill)by colin-automates | 70 | 3 | 5mo ago | MCP Server |
| claude-memby thedotmack | 100 | 98.1k | 1d ago | CLAUDE.md |
| Agent-Reachby Panniantong | 100 | 93.9k | today | CLAUDE.md |
| Understand-Anythingby Egonex-AI | 100 | 85.6k | 2d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 74.7k | today | CLAUDE.md |
Frequently asked questions
- How do I install Codex-ImageGen--Claude-Code?
- Run
claude mcp add colin-automates -- npx -y github:colin-automates/Codex-ImageGen--Claude-Code. The install tabs above show the steps for each supported agent. - Which AI agents does Codex-ImageGen--Claude-Code work with?
- It is written for Claude Code, Claude Desktop and OpenAI Codex, as a MCP Server file. Other agents that read the same format can often use it too.
- Is Codex-ImageGen--Claude-Code safe to use?
- It is MIT-licensed and scores 90/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is Codex-ImageGen--Claude-Code still maintained?
- The repository was last updated about 5 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
Skill content
View source on GitHubimagegen — Claude Code plugin

Generate real images from inside Claude Code, with zero API costs. The plugin delegates to OpenAI's Codex CLI and its built-in gpt-image tool — billed against your ChatGPT subscription, not the OpenAI API.
🎯 The point: once installed, Claude generates images automatically whenever your task involves one — websites, READMEs, blog posts, slide decks, game assets, app icons, marketing pages. No
/commands needed. No "may I generate this?" prompts. The plugin's broad-trigger SKILL watches every conversation and fires when an actual rendered image (not a placeholder) would land better than a description.
Slash commands (/imagegen "<prompt>", /imagegen:edit) are still there for explicit control — but the typical day-to-day flow is just "build me a roofing company landing page" and the images appear, wired into your HTML.
Quick start
In any Claude Code workspace:
/plugin marketplace add github.com/colin-automates/Codex-ImageGen--Claude-Code
/plugin install imagegen@imagegen-marketplace
/imagegen:setup
/imagegen:setup auto-installs Codex CLI if it's missing, auto-launches a browser to sign into ChatGPT if you're not logged in, and runs a test image to confirm the pipeline. When it reports green, you're done — Claude will generate images on its own from there.
How auto-activation actually feels
The headline feature. Once the plugin is installed, you don't think about it. Examples that fire it without any slash command:
| You say | What happens silently |
|---|---|
| "build me a hiking-blog landing page" | Claude scaffolds the HTML, then generates a hero photo, 3 service-section illustrations, and an OG image — all wired into the right <img> slots. |
| "add a banner to the README" | A 1536×1024 hero image lands at ./docs/images/banner.png and the README's empty image syntax is filled in. |
| "I need a logo for a coffee app, flat vector, two-tone" | One image generated; the prompt is interpreted style-aware. |
| "generate enemy sprites: red, blue, green" | Auto-routes to set mode — three coherent sprites in one Codex session, sharing palette/style. |
| "redesign this slide deck" | Empty hero slots in .md/marp/reveal.js decks get filled per-slide. |
| "fix the broken <img src=""> in landing.html" | Single image, saved next to the page, src="" rewritten with a real alt. |
Trigger framing: the skill is a pre-flight check across any project type, not a keyword matcher. Before Claude ships any build — websites, apps, games, CLIs, libraries, docs, decks, brand work — it asks "does any surface here need a generated image?" and fires the tool if yes. So build-mode requests trigger it even when you never say "image": "build me a landing page for X", "scaffold a SaaS app", "build a platformer game" (sprites + tiles + character art), "set up a CLI tool" (README hero + OG card), "design a logo for Y", "write a tutorial on Z" (header + section illustrations). Same for explicit verbs ("generate / create / make / build / draw / render / design / edit / redo") applied to images, websites, apps, games, libraries, decks, or any visual surface.
Non-triggers (intentionally narrow): SVG icons that match an existing icon set already wired into the project (lucide, heroicons, etc.), charts/graphs from real data, screenshots of running code, or anything you explicitly told Claude not to generate ("no images", "SVG only").
Multi-image intent auto-detects too: if your prompt has an explicit count ("three icons"), a comma/and list, pipe-separated parts, or set-keywords (set / series / pack / roster), Claude calls generate_image_set once instead of generate_image N times — keeps style consistent and uses fewer ChatGPT plan turns.
Slash commands (for explicit control)
| Command | What it does |
|---|---|
| /imagegen "<prompt>" | Generate one image, or a coherent set if the prompt describes multiple. |
| /imagegen setup | One-time setup probe — installs Codex CLI if missing, auto-launches browser sign-in if needed. Same as /imagegen:setup. |
| /imagegen:edit <path> <prompt> | Edit an existing image with a natural-language instruction. |
| /imagegen:img <prompt> | Alias of /imagegen. |
/imagegen "a small flat-vector logo for a hiking startup, two-tone palette, mountain silhouette"
/imagegen "headers for four blog posts about hiking, climbing, kayaking, biking"
/imagegen:edit ./public/hero.png "make the sky look stormy"
Requirements
- Node.js 18+ with
npm(Claude Code already needs this; nothing extra to install). - An active ChatGPT subscription that includes Codex usage — Plus, Pro, Business, Edu, or Enterprise. (Free tier may also be eligible during current OpenAI promos — verify in your account.)
- OpenAI Codex CLI — installed automatically by
/imagegen:setup. If you'd rather install it yourself, any of these work:npm install -g @openai/codex(cross-platform, what setup uses)brew install openai/tap/codex(macOS)- Download a binary from https://github.com/openai/codex/releases
How it works
You type a prompt
↓
Claude Code (this app)
↓ calls MCP tool
imagegen MCP server (Node bundle in this repo)
↓ spawns `codex exec ...`
Codex CLI (uses your local auth at ~/.codex/auth.json)
↓ calls
OpenAI's gpt-image backend
↓ usage billed against...
Your ChatGPT subscription ← (NOT your OpenAI API account)
The MCP server (TypeScript, in plugins/imagegen/server/, bundled with esbuild to dist/index.cjs) shells out to:
codex exec --skip-git-repo-check --sandbox danger-full-access \
--cd <workspace> --add-dir <save-dir> --output-last-message <tmp> \
"@imagegen <your prompt>. Save to <abs save_path>. ..."
Codex generates the image, saves it to the requested path, and prints SAVED <path> in its final message. The MCP server parses that, falls back to scanning the parent dir for newly-created image files if needed, renames if Codex picked a different filename, and returns the path to Claude.
Because everything goes through Codex (not the OpenAI API directly), image generation is billed against your ChatGPT plan limits, not your API key. Confirm $0 after running tests by checking platform.openai.com/usage.
Caveats
- Image generation burns Codex usage limits ~3-5× faster than text turns. A six-image landing-page build can chew through a non-trivial chunk of a daily Codex quota.
- Calls take 30–90 seconds each. A multi-image build will pause Claude for several minutes total — that's normal.
- Uses the Codex CLI under the hood — not the OpenAI API directly. No API key, no per-image dollar charges.
- Codex's
@imagegenskill must be available in your Codex install./imagegen:setupverifies this with a probe.
Troubleshooting
Unknown command: /imagegen
Try the namespaced colon form, which always works:
/imagegen:setup
/imagegen:edit ./path "<edit instructions>"
The bare /imagegen "<prompt>" form should also work in current Claude Code; if your version doesn't recognize it, fall back to /imagegen:img "<prompt>".
Claude pops a permission prompt before every tool call
The plugin ships a settings.json that pre-approves its three MCP tools. If your Claude Code version doesn't honor plugin-shipped settings, do one of:
- Run
/permissions add mcp__plugin_imagegen_imagegen__*once. - Copy these entries into
~/.claude/settings.local.json(or your workspace's.claude/settings.local.json):{ "permissions": { "allow": [ "mcp__plugin_imagegen_imagegen__generate_image", "mcp__plugin_imagegen_imagegen__edit_image", "mcp__plugin_imagegen_imagegen__generate_image_set" ] } }
/imagegen:setup reports codex_not_installed
Setup tries to install Codex via npm install -g @openai/codex automatically. If that hits EACCES / "permission denied" (common on system-installed Node on macOS/Linux), run it manually:
sudo npm install -g @openai/codex # macOS/Linux
Or open a terminal as Administrator on Windows. Then re-run /imagegen setup.
/imagegen:setup reports codex_not_authed
Setup auto-launches a browser sign-in window and waits up to 3 minutes for OAuth to complete. Just complete the ChatGPT login in the browser tab that pops up; setup continues automatically. If the auto-launch doesn't work for any reason, fall back to codex login in any terminal, then re-run /imagegen setup.
Transient OpenAI errors during generation
If you see Reconnecting... or stream disconnected before completion in the error output, OpenAI's gpt-image backend is having a transient issue (most common during peak hours). Wait 5–15 minutes and retry. Check status.openai.com for ongoing incidents.
save_path_not_found errors
The most likely cause: the @imagegen / gpt-image built-in tool isn't activated in your Codex install. Try:
codex --version— should be a recent build.- Run
/imagegen:setupand read the report.
/plugin marketplace add does nothing
If your repo path contains ;, spaces, or other special characters, the slash-command parser may truncate it. Workaround: cd into the directory in your terminal, open Claude Code there, then run /plugin marketplace add . (just a dot).
For private GitHub repos, make sure your machine has the credentials (HTTPS token or SSH key) cached so git clone <repo> would succeed.
Node version too old
The MCP server requires Node 18+. Check node --version. If too old, upgrade via nvm, fnm, or your OS package manager.
Development
The MCP server source is in plugins/imagegen/server/src/. To rebuild the bundle:
cd plugins/imagegen/server
npm ci
npm test # 48 tests, ~2s
npm run typecheck
npm run build # produces dist/index.cjs (committed)
Source files:
index.ts— MCP boot, three tool handlers, validationschemas.ts— zod schemas + JSON Schema for MCP tool definitionscodex.ts—codex execspawn, output capture, last-message parsingprompts.ts— three prompt templates (generate, edit, set)poller.ts— file-stable detection, mtime-scan fallback, rename-to-targeterrors.ts— error envelope + categorization
Tests live in plugins/imagegen/server/test/. CI re-runs typecheck + test + build + git diff dist/ on every PR to catch stale bundle commits.
See CONTRIBUTING.md for the contribution flow.
License
MIT — see LICENSE.
Credits
Built on OpenAI Codex CLI and the Model Context Protocol SDK. The hero image at the top of this README was generated by the plugin itself — meta-eating the dogfood.
Related Skills
claude-mem
98.1kPersistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Agent-Reach
93.9kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
Understand-Anything
85.6kGraphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
headroom
74.7kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
