Claude Code has no first-party image generation. Codex CLI does — it ships a headless image_gen tool (gpt-image-2) that runs against whatever auth you already have: ChatGPT subscription (Free tier included), or your existing OpenAI API key. So no extra OPENAI_API_KEY to manage.
I built a thin Claude Code plugin that bridges the two. Three slash commands:
/codex-image:generate "5 logo variations of a brass compass on white, save under images/logos/"
/codex-image:edit input.png "Replace background with a clean white studio backdrop"
/codex-image:status
The full slash-command argument is passed verbatim to Codex's imagegen skill. Output paths, sizes, quality, transparency, multi-image count — all expressed in natural language inside the prompt. No --out / --size / --quality flags to memorize; imagegen handles them.
Architecture: each SKILL.md is a 1-line node script.mjs <subcmd> "$ARGUMENTS" invocation. The Node wrapper (~375 lines) does only argument splitting and codex exec spawning with a ~6-line minimal instruction prefix. Image-generation intelligence lives entirely in Codex's bundled imagegen skill — this plugin is a pure dispatcher. One non-obvious finding documented along the way: SKILL.md bash isn't always executed verbatim by the model (it pre-evaluates $(...) substitutions in its head), so all parsing must live in the Node script. Details in docs/ARCHITECTURE.md if you're building plugins yourself.
Trade-off worth knowing: agent tokens count against your Codex usage limit. A typical single-image low-quality turn is around 30k agent tokens on top of the image-gen cost itself.
Repo: https://github.com/KingGyuSuh/codex-image-in-cc
Install:
claude plugin marketplace add KingGyuSuh/codex-image-in-cc
claude plugin install codex-image@codex-image-in-cc
Apache-2.0. Orthogonal to and complementary with openai/codex-plugin-cc (code review / task delegation under the /codex: namespace) — install both.
Happy to take feedback or contributions. The architecture decisions are documented openly so you can disagree concretely.
Top comments (0)