codex-image
Skill5 starsChanged 2 months agoMITView on GitHub
Generate or edit raster images (photos, illustrations, mockups, hero images, product shots, bitmap icons, transparent cutouts) with OpenAI GPT Image 2 by triggering the local Codex CLI, billed to the user's ChatGPT subscription — no API key needed. Use when the user says "generate an image", "make a picture/illustration/mockup", "use codex / gpt image / gpt-image-2", "edit this image", "remove the background", or a project needs a bitmap asset. Not for video, SVG, or graphics better built in code.
- Installs packages
7 other projects use a version of this.
Adopted by
Most recently taken up by
- almeidasrenato/codex-image-skillstheir own version, first seen Sep 30, 2026
- lsongdev/skillstheir own version, first seen Sep 10, 2026
- OpenMinis/MinisSkillstheir own version, first seen Sep 4, 2026
- basejb/skillstheir own version, first seen Jul 10, 2026
- xntj-ai/codex-imagetheir own version, first seen Jun 30, 2026
- qwwiwi/codex-gpt-image-2-subscriptiontheir own version, first seen Jun 7, 2026
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- OpenMinis/MinisSkills★ 438same name
- revfactory/skills★ 159same name
- qwwiwi/codex-gpt-image-2-subscription★ 9same name
- xntj-ai/codex-image★ 9same name
- basejb/skills★ 5same name
- lsongdev/skills★ 1same name
- almeidasrenato/codex-image-skills★ 0same name
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.
The file
Files
codex-image
Runs Codex CLI non-interactively. Codex calls its built-in image_gen tool (GPT Image 2) and the
script copies the result to the path you choose. Each call takes roughly 30–90 seconds.
The script is gen.sh in this skill's base directory (shown when the skill loads), referred to below as <skill-dir>.
Command
<skill-dir>/gen.sh -o <out.png> [options] "<prompt>"| Option | Meaning |
-o PATH | Output file (required). Put project assets inside the project; otherwise use a temp/scratch folder. |
-n N | 1–4 variants → out-1.png, out-2.png, … |
-r FILE | Reference image for style/composition (repeatable) |
-e FILE | Image to edit — only what the prompt asks changes |
-t | Transparent background |
-a square|portrait|landscape | Aspect ratio |
Prints the saved absolute path(s). Never overwrites: an existing name gets a time suffix.
Give the Bash call a timeout of at least 300000 ms (600000 for -n 3 or -n 4). For several different
images, run separate commands in parallel instead of describing them all in one prompt — parallel runs are safe.
Workflow
- Turn the request into a clear prompt: subject, style/medium, composition, lighting, palette, exact text in quotes, and what to avoid. Keep the user's specifics; add detail only when the ask is vague.
- Run
gen.sh. - Look at the output image and check it matches (subject, spelling of any text, framing). If it's off,
rerun with one targeted prompt change, or use
-eon the result for a small fix. - Report the saved path(s) and the final prompt. If the image is for a project, reference it from the code.
Troubleshooting
codex CLI not found→ the user needsnpm i -g @openai/codex.Codex is not logged in→ the user runscodex loginand signs in with ChatGPT.No image was generated→ the ChatGPT plan's image limit may be used up, or the prompt was refused. Say so; don't retry in a loop.-toutput can have semi-transparent blotches. Check it; if dirty, regenerate on a plain white background without-tand remove the background separately.
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.

