yazelin

Codex Imagegen Skill — Development skill for Claude Code

Development community

A Claude Code skill that generates images via Codex CLI's $imagegen, using your ChatGPT subscription instead of OpenAI Images API.

How to install Codex Imagegen Skill

This entry records only its repository, not the path inside it, so there is no exact command to give. Open yazelin/codex-imagegen-skill and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Codex Imagegen Skill does

A Claude Code skill that generates images via Codex CLI's $imagegen, using your ChatGPT subscription instead of OpenAI Images API.

Alternatives in Development

  • OpenAI Codex CLI — (Rust implementation) 67.8k ★
  • Imagegen — Generate and edit images using OpenAI's Image API for projects 14.6k ★
  • Ccusage — CLI for analyzing Claude Code/Codex usage from local JSONL files 11.8k ★

README

codex-imagegen

A [Claude Code](https://claude.com/claude-code) skill that generates **or edits** images by routing through [Codex CLI](https://github.com/openai/codex)'s built-in `$imagegen` tool — using your **ChatGPT subscription quota** instead of OpenAI Images API credits.

If you already pay for ChatGPT (Plus / Pro) and you already have Codex CLI installed, you can generate or composite images from Claude Code without spending another cent.

What this gives you

  • A skill Claude Code automatically picks up when you ask it to generate or edit an image
  • A standalone CLI script (codex-imagegen.sh) you can use in any batch pipeline
  • Multi-image edit: pass 1–16 reference images for composition / outfit-swap / scene-merge / style-transfer / text-localization (powered by gpt-image edit mode)
  • Detailed prompt-craft guidance baked into the skill so the model produces consistent, useful outputs

Example output

`./examples/shiba.png` — generated from the prompt:

A tiny Shiba Inu wearing a red bow tie, watercolor illustration, soft natural texture, close-up portrait, warm soft window light, tender and calm, no text, no watermark.

![sample](examples/shiba.png)

Prerequisites

  1. **[Codex CLI](https://github.com/openai/codex) installed**

    # one of:
    npm i -g @openai/codex
    brew install --cask codex
  2. **Codex is logged in** to your ChatGPT account at least once:

    codex login
  3. **Claude Code** (the CLI / IDE extension / desktop app) — this is the host that loads skills.

Install

Clone this repo straight into your Claude Code skills directory:

git clone https://github.com/yazelin/codex-imagegen-skill ~/.claude/skills/codex-imagegen
chmod +x ~/.claude/skills/codex-imagegen/codex-imagegen.sh

That's it. Next time you start Claude Code, the skill is available.

Verify

Inside Claude Code, ask:

Generate a cute Shiba Inu with a red bow tie in watercolor style, save to /tmp/test-shiba