codex-image
Skill1 starsChanged 2 months agoMITView on GitHub
Generate or restyle a raster image through the local Codex CLI's built-in image_gen tool (OpenAI's image model on the user's ChatGPT login, no API key or credits needed), with optional reference images for character or style consistency. Use when the user says "generate an image with Codex", "use Codex to make an image", "/codex-image", or wants a still (B-roll frame, prop, scene background, thumbnail, character image) made with Codex, including transparent cut-outs (props, stickers, characters) via --transparent, which generates on flat magenta and keys it out. Not for native-alpha needs such as glowing, glassy or magenta subjects, and not for diagrams or UI that are better drawn in HTML/SVG.
20 other projects use a version of this.
Adopted by
Most recently taken up by
- bugrackm/My-Agent-System-and-Skillstheir own version, first seen Nov 29, 2026
- Willian8021743/windows-ai-toolkittheir own version, first seen Nov 29, 2026
- muend/orchestration-skillstheir own version, first seen Nov 15, 2026
- lwmxiaobei/xiaobei-skillstheir own version, first seen Nov 15, 2026
- qwwiwi/codex-gpt-image-2-subscriptiontheir own version, first seen Nov 5, 2026
- vediteur/claude-skillstheir own version, first seen Nov 1, 2026
Used with
Projects with it also use contact-vcard-extractor, free-tts and 10 more.
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.
OpenMinisSkillcontact-vcard-extractor
Extract contact information from text, chat logs, web pages, screenshots, business card photos, and QR codes/OCR results; clean names, phone numbers, email addresses, companies, job titles, addresses, and websites; generate vCard/.vcf files; and guide users to import them into iOS Contacts or share them with others. Trigger words include: extract contacts, save to contacts, generate vCard/.vcf, business card recognition, add contacts from images/screenshots/text, share contacts, and export contacts.
Also in 3 projects that use this
OpenMinisSkillfree-tts
Free text-to-speech (edge-tts), with no API key or registration required. Converts text to MP3 audio files. Trigger this skill when the user says "read aloud," "text-to-speech," "TTS," "generate audio," "read it," "read it out loud," "say it," "play it," or in any scenario where text needs to be converted to speech for playback.
Also in 3 projects that use this
- +10 more from OpenMinis
Other versions20 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 20
- OpenMinis/MinisSkills★ 638same name
- lwmxiaobei/xiaobei-skills★ 163same name
- revfactory/skills★ 160same name
- wjb127/codex-image★ 64same name
- qwwiwi/codex-gpt-image-2-subscription★ 9same name
- xntj-ai/codex-image★ 9same name
- basejb/skills★ 5same name
- mishagavura/claude-code-image-generation★ 5same name
- qwwiwi/agentos-skills-public★ 4same name
- Axieon/codex-image★ 3same name
10 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 repository5 other files it gives its agents.
- gemini-apiSkill
- gemini-ttsSkill
- ig-lookupSkill
- stop-motion-explainerSkill
- x-lookupSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 14 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 34
Read the output PNG and look at it before reporting.
- Distinctive: line 50
Verify every cut-out on contrasting backgrounds, zooming into fine edges (hair, glasses, outlines, text): a quick PIL composite of the PNG …
- Very specific: line 52
Don't use it for subjects that are themselves magenta/pink/purple, or for soft, glowing, smoky or semi-transparent subjects (glass, fire, …
“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
Codex CLI (codex, logged in with ChatGPT) has a built-in image_gen tool and a system imagegen skill
(~/.codex/skills/.system/imagegen). scripts/codex_image.py drives it non-interactively: it runs
codex exec in the output folder, has Codex save the PNG under the requested name, falls back to the newest
file in ~/.codex/generated_images/ if Codex didn't copy it, and reports size and whether the image has alpha.
Run it
python <skill>/scripts/codex_image.py "<prompt>" -o <path/to/name.png> [-r ref.png ...]-ooutput PNG. Put project assets where they belong. It refuses to overwrite an existing file; pick a versioned name (-v2) or pass--forceonly when the user asked to replace it.-rreference images (repeatable), attached to the Codex prompt. Use them for any recurring character or style.--modeloverrides the Codex model for one run. The default comes from~/.codex/config.toml. ChatGPT logins reject some models ("not supported when using Codex with a ChatGPT account"); the available list is in~/.codex/models_cache.json.- One image takes about 2–5 minutes. Use a 600000 ms Bash timeout, or run it in the background and wait. For several images, launch at most 2–3 runs in parallel, each with its own output name.
- Uses the ChatGPT plan's image quota. When that runs out the script exits with code 3 and a
CODEX_LIMIT:line: tell the user, and switch to another image generator if they have one, instead of retrying. Stderr noise from Codex MCP servers that need re-auth (rmcp::transport …) doesn't affect the run.
Always check the result
Read the output PNG and look at it before reporting. Check pose/composition against the prompt, text spelling, and character details against the reference. Image models drift on specifics (pointing at the wrong thing, a laptop turned the wrong way), so state what's off and offer a rerun with a sharper prompt rather than calling it done.
Transparency: use --transparent
Codex can't output real alpha: asking it for a transparent background gives an opaque image with a painted grey-white checkerboard. Never ship that as a cut-out and never try to key the checkerboard out.
--transparent works around it: the prompt gets a flat pure magenta #FF00FF background (and "no magenta,
pink or purple on the subject"), then Codex's bundled remove_chroma_key.py keys it out
(--auto-key border --soft-matte --despill) into an RGBA PNG. The raw magenta image is kept next to the log.
Magenta rather than green, so green or lime details on the subject survive. Works cleanly on flat props and
flat 2D characters, including hair tips, glasses rims and outlines.
- Verify every cut-out on contrasting backgrounds, zooming into fine edges (hair, glasses, outlines, text): a quick PIL composite of the PNG on dark, white and red strips shows fringe or holes at once.
- Don't use it for subjects that are themselves magenta/pink/purple, or for soft, glowing, smoky or
semi-transparent subjects (glass, fire, fur): chroma keying can't recover those. Use a generator with native
transparent output instead (for example OpenAI's image API with
background: "transparent").
Prompting
- Describe subject, style, framing, background and anything that must be spelled exactly (put exact text in quotes). Ask for one image; say what to avoid ("no extra text", "no watermark").
- For a recurring character, attach its reference images (a front view plus a character sheet works well) and restate its locked traits in the prompt every time: art style, outline weight, hair, glasses, clothing, logos and their exact text and colours.
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.

