codex-imagegen
Skill0 starsChanged 10 days agoMITView on GitHub
Generates raster images (game sprites, textures, icons, backgrounds, illustrations, concept art, mockups) through the OpenAI Codex CLI's built-in image generator, billed to the user's ChatGPT plan instead of a paid API key, and returns the files to the calling agent to review and post-process. Use when a task needs a new bitmap image or a variant of an existing one from references, even if the user does not mention Codex or ChatGPT, for example "generate an image", "draw a sprite", "make a texture, icon or background", "I need art for the game", "generate it with ChatGPT". Do not use for SVG or vector graphics, charts, visuals that are simpler to build in code (CSS, canvas, shaders, procedural generation), editing existing vector assets, or inside Codex itself, which has image generation built in.
- Reads credentials
- Installs packages
15 other projects use a version of this.
Adopted by
Most recently taken up by
- 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
- rancheng/my_claude_skillstheir 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.
- publish-skillSkill
- codebase-auditSkill
- modular-architecture-refactorSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 4 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 14 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 41
Write prompts in English, which the generator follows most precisely.
- Distinctive: line 61
Every image uses the ChatGPT plan's usage limit, and image generation uses it much faster than text.
- Distinctive: line 63
Before a batch of more than three images, tell the user how many calls you plan.
- Distinctive: line 64
Do not regenerate in a loop.
“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 Image Generation
Generate raster images with the image generator built into the OpenAI Codex CLI. The images are billed to the ChatGPT plan the CLI is signed in with, so no API key is needed. scripts/generate.py runs Codex non-interactively, finds the images it saved, and copies them into a folder you choose.
Generate
python scripts/generate.py --prompt "<prompt>" --out-dir <folder> --name <file name without extension>The script path is relative to this skill's folder. Use python3 or py where python is not the interpreter. A run takes one to two minutes, so allow a command timeout of about 10 minutes.
Options:
--reference a.png --reference b.png: reference images for style, palette, or shape. For a series that must look like one set, pass images from the series that are already approved: without references every call draws in its own style.--modeland--effort: the Codex agent model,gpt-6.1-solatmediumby default, orCODEX_IMAGEGEN_MODELandCODEX_IMAGEGEN_EFFORTwhen set. The agent only relays the prompt to theimage_gentool, which draws the same way whichever model calls it, so a frontier model at high effort only spends quota. Change these when the user asks or when the default is not available.--keep-user-config: load~/.codex/config.toml. It is skipped by default because the user's MCP servers and plugins slow the run and spend quota. Use it only ifimage_genis unavailable without it.--prompt-file: read a long prompt from a UTF-8 file instead of--prompt.
The script prints IMAGE: <path> for every copied file and exits with:
| Code | Meaning | What to do |
| 0 | Images copied | Review them |
| 1 | Other failure; the tail of the log and the full log path are printed | Read the error, fix the cause, do not retry blindly |
| 2 | The plan's usage limit is reached; USAGE_LIMIT: gives the reset time | Do not retry. Tell the user when the limit resets |
| 3 | The model is not offered to this CLI version | Suggest updating the CLI (npm i -g @openai/codex@latest) instead of silently switching models |
Write the prompt
Write prompts in English, which the generator follows most precisely. State:
- what is shown and what it is for (game sprite, seamless texture, app icon, menu background);
- style, view angle, lighting, palette;
- background:
transparent backgroundfor sprites and icons, which gives a real alpha channel; - the aspect ratio, chosen for where the image will be used, such as
square 1:1for a sprite orlandscape 16:9for a screen background. Without it the generator draws a square, and a square cropped to a banner loses its composition.
The generator does not honor exact pixel sizes: pick the closest supported aspect ratio and get the exact size by cropping and scaling afterwards. Aspect ratios by asset type, the 3:1 limit, and prompt recipes: references/prompting.md.
Generate one image per call and give each a descriptive --name, so a weak result can be redone alone.
After generating
- Look at every image yourself before showing it: does it match the prompt, is the background really transparent, are there artifacts? The generator often leaves a colored fringe along the alpha edge and stray pixels; clean them before the image goes into a game or UI.
- Fit it to its purpose: trim empty margins, scale to the target size, slice into tiles. Check the seams of tiles and walls: the generator rarely makes truly seamless edges, and corners and joins are often easier to finish by hand or procedurally.
- Show the result to the user.
- Put into the project only what the user approved or asked for, where the project keeps its assets. Keep drafts in a temporary folder.
Spend the quota carefully
Every image uses the ChatGPT plan's usage limit, and image generation uses it much faster than text.
- Before a batch of more than three images, tell the user how many calls you plan.
- Do not regenerate in a loop. If a result is wrong, change the prompt for a specific reason.
- On exit code 2, stop and report when the limit resets.
Limits
- Never use an API key for this. The script removes
OPENAI_API_KEYfrom Codex's environment and refuses to run unless Codex is signed in with ChatGPT; Codex's own API fallback (image_gen.py) is billed separately. - Do not edit
~/.codex/config.toml: it is the user's own Codex setup. Every setting is passed as a flag for one call. - Codex gets no write access to the project. It runs in a read-only sandbox in a temporary folder; the script copies the images itself.
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.

