codex-imagegen
Skill1 starsChanged 7 months agoMITView on GitHub
Generate or edit images by invoking OpenAI's gpt-image-2 ("image 2") through headless `codex exec`. Trigger when the user asks to create, generate, draw, design, or edit an image, logo, icon, illustration, banner, sprite sheet, placeholder art, or any visual asset — and they have not specified a different generator (Stable Diffusion, Midjourney, DALL·E API directly, etc.). Also use when the user wants to transform or extend a reference image they have provided locally.
- Reads credentials
15 other projects use a version of this.
Adopted by
Most recently taken up by
- lothlorienblade/agent-skillstheir own version, first seen Nov 8, 2026
- github774/roblox-claude-skillstheir own version, first seen Nov 8, 2026
- JunSeo99/claude-skill-codex-imagegentheir own version, first seen Nov 2, 2026
- hyperb1iss/hyperskillstheir own version, first seen Nov 1, 2026
- BlingtronDev/codex-imagegentheir own version, first seen Oct 25, 2026
- evelan-de/claude-code-pluginstheir own version, first seen Oct 17, 2026
Used with
Projects with it also use orchestrate and implement.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
varun29ankuSSkillorchestrate
This skill should be used when the user asks to 'orchestrate a task', 'break down work into parallel agents', 'coordinate subtasks', 'run agents in parallel', or mentions 'multi-agent'. Decomposes complex tasks into tracked subtasks, dispatches parallel subagents, and coordinates until completion.
Also in 3 projects that use this
Hugging FaceSkillimplement
Make tests pass. Invoke after /write-tests produces failing tests.
Also in 3 projects that use this
Other versions15 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 15
- gongnyang/codex-fleet★ 46same name
- hyperb1iss/hyperskills★ 36same name
- JunSeo99/claude-skill-codex-imagegen★ 22same name
- nathanonn/agent-skills★ 22same name
- mgiovani/cc-arsenal★ 8same name
- evelan-de/claude-code-plugins★ 3same name
- luminary19/atelier★ 2same name
- Vallykrie/swarmGPT★ 2same name
- BlingtronDev/codex-imagegen★ 1same name
- github774/roblox-claude-skills★ 1same name
5 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository3 other files it gives its agents.
- dashscope-videogenSkill
- deck-to-pdfSkill
- svg-animationsSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.
0
Common
Most of the 14 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 18
Run the bundled helper script.
- Very specific: line 35
Display the result: After success, use the Read tool on the output PNG so the image renders inline for the user.
- Distinctive: line 40
When the user provides a source image and wants it modified:
“Common” is measured: kept by at least 6 in 10 of the 14 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
codex-imagegen
Generates images via the gpt-image-2 model (the "image 2" model) by invoking the Codex CLI in non-interactive mode. The Codex CLI's built-in image_gen skill handles the actual model call; this skill is the bridge that lets Claude Code drive it headlessly and place the result inside the user's workspace.
Prerequisites (verify only if invocation fails)
codexis on PATH (which codex).- The user is logged in (
~/.codex/auth.jsonexists) orOPENAI_API_KEYis set in the environment. - Image generation consumes Codex usage credits (3–5× faster than a text turn). Mention this only if the user expresses cost concerns.
How to invoke
Run the bundled helper script. It owns all the flags, the $imagegen prefix, the stdout-parse, and the bwrap-sandbox workaround.
~/.claude/skills/codex-imagegen/imagegen.sh <output.png> "<prompt>" [reference_image ...]<output.png>— absolute or workspace-relative path where the final PNG should land.<prompt>— the image description. Be specific about subject, style, composition, palette, and background. The script auto-prepends$imagegenso Codex routes to the built-in image skill.[reference_image ...]— zero or more local image files to attach as references (passed throughcodex exec -i). Use these when the user wants to transform, restyle, or extend an existing asset.
The script writes the final file to <output.png> and prints wrote <output.png> (source: <codex-cache-path>) on success.
Standard workflow
- Clarify the prompt only if it is genuinely ambiguous. A one-line user request like "make me a logo" warrants a quick check on style / palette / use case; "minimalist flat icon of a robot painter" does not. Don't over-question.
- Pick a sensible output filename in the current working directory (e.g.
logo.png,hero.png). Don't put it in/tmpunless the user asks. - Run the script via Bash. Allow up to ~120s for generation.
- Display the result. After success, use the
Readtool on the output PNG so the image renders inline for the user. This is the verification step — never claim success without doing it. - Report briefly: filename, dimensions (from
file <out>if useful), and the prompt actually used. Skip filler.
Editing / reference-image flow
When the user provides a source image and wants it modified:
~/.claude/skills/codex-imagegen/imagegen.sh out.png \
"Redraw this scene in watercolor, soft pastel palette, preserve composition" \
./input.jpgCodex will receive the reference via -i and the prompt should describe the transformation, not redescribe the source.
Failure modes & recovery
bwrap: Failed RTM_NEWADDR: Operation not permitted— Linux sandbox blocks codex's own copy step. The helper already works around this by parsing the source path from stdout and copying it itself, so this should not surface to the user. If it does, the image was still generated; rerun the script or grep~/.codex/generated_images/for the most recent file.could not locate generated image in codex output— codex exec failed before producing a file. Re-read the captured stderr (the script prints the full log on failure) to diagnose: auth issues, rate limits, content-policy refusals.- Wrong content / refusal — adjust the prompt and rerun. Don't try to bypass content policy.
What this skill does NOT do
- It does not call the OpenAI Images API directly with
curl/ the SDK. If the user explicitly wants the raw API (e.g. for batch generation, custom params not exposed by Codex), say so and write a small Python/Node script instead. - It does not run inside the Codex container — it runs
codex execfrom the user's shell. - It does not manage Codex auth. If
auth.jsonis missing andOPENAI_API_KEYis unset, tell the user to runcodex loginthemselves; do not attempt it for them (it's interactive).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

