codex-imagegen
Skill8 starsChanged 48 days agoMITView on GitHub
Generates images and polished raster art (logos, mascots, hero images, icons, characters, sprite sheets, illustrations, product mockups) by driving Codex CLI's $imagegen skill. This is the default image generator, use it for any request to generate or create an image or visual asset, including "generate an image", "create a hero image", "make a mascot", "design a logo", "draw an icon", "generate a sprite sheet", or "make an illustration". Requires the `codex` CLI installed and authenticated (ChatGPT auth). Not for architecture, flow, or sequence diagrams (use docs-diagram).
- Installs packages
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 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.
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
- 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
- mizumotok/agent-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 repository53 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-browserSkill
- anything-to-skillSkill
- ci-generateSkill
- ci-localSkill
- clotho-researchSkill
- create-ruleSkill
- create-skillSkill
- db-migrateSkill
- docker-initSkill
- docs-adrSkill
- docs-checkSkill
- docs-diagramSkill
- docs-initSkill
- docs-rfcSkill
- docs-updateSkill
- env-setupSkill
- find-skillsSkill
- fix-bugSkill
- git-commitSkill
- git-create-prSkill
- gitflowSkill
- git-releaseSkill
- git-syncSkill
- i18n-checkSkill
- implement-featureSkill
- improve-skillSkill
- inject-docsSkill
- jira-cliSkill
- motion-studioSkill
- optimize-ai-setupSkill
- orchestrateSkill
- oss-launchSkill
- prd-to-issuesSkill
- product-design-specSkill
- product-design-tokensSkill
- product-prdSkill
- project-illustratorSkill
- project-plannerSkill
- refactorSkill
- renderSkill
- review-codeSkill
- review-depsSkill
- review-designSkill
- review-perfSkill
- review-planSkill
- review-securitySkill
- shipSkill
- stopslopSkill
- test-suiteSkill
- vrt-checkSkill
- wtfSkill
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 5 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 14 edited versions we read keep these.
5
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
- Distinctive: line 27
Stop before an expensive run and confirm: when the brief is a batch (multiple assets), a consistency-critical asset (recurring …
- Very specific: line 35
Not found → tell the user to install Codex CLI (npm i -g @openai/codex or brew install codex, then codex login) and stop.
- Distinctive: line 37
Run from the target repo's root so codex's relative move-file paths land in the right workspace.
- Distinctive: line 56
Run from the workspace root, prompt single-quoted, non-interactive:
- Distinctive: line 65
If transparency is required, say so explicitly in the brief ("transparent background"): the skill's built-in flow handles chroma-key …
- Very specific: line 84
After exit, cat the -o output file for the summary and verify the promised paths actually exist (ls).
- Distinctive: line 101
If a chroma removal comes out visibly wrong, don't just report failure: the raw generation and the fix procedure are in …
“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: Illustrated Asset Generation via Codex CLI
Generate polished, professionally-illustrated raster art (mascots, hero images, logos, sprite sheets, product mockups) by driving Codex CLI's $imagegen skill. Use this instead of hand-drawing shapes in SVG/CSS/SwiftUI when the asset needs to look designed, not programmatically constructed.
Scope check (do this first)
This skill wraps a multi-minute, credit-billed Codex run and is the default handler for image-generation requests:
- Architecture/flow/sequence diagram → tell the user to use
docs-diagraminstead and stop here. - Otherwise, continue: the cost gate in Phase 2 decides whether to confirm before running.
Ground rules
- Single-quote the whole prompt.
$imagegenmust reachcodexliterally, not be shell-expanded: a double-quoted or unquoted prompt containing$imagegenbreaks. - Never fabricate a model ID.
gpt-6-sol(agent) and GPT Image 2.5 Sunburst (gpt-image-2.5-sunburst, images) are this recipe's known-good defaults at time of writing; ifcodexrejects one, checkcodex --version/codex exec --helpfor a current one rather than guessing a replacement. - Name the image model in the prompt. Codex has no image-model flag (
-msets the agent model), so every prompt opens with$imagegen using gpt-image-2.5-sunburst via the built-in image tool. Codex can't report which image model the backend actually ran, so don't claim more than "requested Sunburst". - Never claim chroma removal or file output succeeded without viewing the pixels.
sips hasAlpha: yesproves nothing; open the PNG. - Stop before an expensive run and confirm when the brief is a batch (multiple assets), a consistency-critical asset (recurring character/mascot), or explicitly says "final"/"official": this is real spend and multi-minute wall-clock time, not a free retry.
Phase 1: Environment check
codex --version- Not found → tell the user to install Codex CLI (
npm i -g @openai/codexorbrew install codex, thencodex login) and stop. codex execrejects the model or auth → see references/troubleshooting.md.- Run from the target repo's root so codex's relative move-file paths land in the right workspace.
Phase 2: Gather the brief and budget effort
Mine the request for: subject, purpose (README hero, app mascot, icon set, sprite sheet), style, exact save path(s), and whether transparency is required.
Pick model_reasoning_effort:
| Ask | Effort |
| Official mascot, multi-image character consistency, intricate composition | xhigh |
| Basic placeholder art, single simple asset, low-stakes draft | high or lower |
xhigh burns significant tokens/credits: don't default to it. If unclear which bucket the request falls in, ask.
Confirm before running when this is a batch, a consistency-critical/official asset, or the user said "final": state the design brief, model, effort, exact output paths, and estimated run length (minutes) and get a go-ahead before invoking. For a single obvious low-stakes placeholder, proceed straight to Phase 3.
Phase 3: Invoke
Run from the workspace root, prompt single-quoted, non-interactive:
codex exec --approve-for-me -m gpt-6-sol -c model_reasoning_effort="<xhigh|high>" \
'$imagegen using gpt-image-2.5-sunburst via the built-in image tool to create <asset>.
<detailed design brief — subject, style, composition, palette, "transparent background" if needed>.
Move the final PNGs into the workspace at these exact paths: <path1>, <path2>.'If transparency is required, say so explicitly in the brief ("transparent background"): the skill's built-in flow handles chroma-key removal on its own; don't ask for it as a separate step.
--approve-for-me (workspace-write sandbox plus automatic approval review) lets the chroma-removal helper fetch its dependencies.
For a consistent character across multiple images, put the full shared design brief in every asset's prompt, and generate pose/mood variants as edits of the first approved image rather than independent generations: one built-in image_gen call per asset is the skill's own rule, so batches are sequential, not parallel.
Phase 4: Run it in the background, don't pipe the output
codex exec has no background flag, background it yourself and never pipe through tail/head (the pipe buffers everything until exit, so nothing streams while it runs):
codex exec --approve-for-me -m gpt-6-sol -c model_reasoning_effort="high" \
-o /tmp/codex-imagegen-final.md \
'...' > /tmp/codex-imagegen-run.log 2>&1 &-o final.mdcaptures just the final summary.- Poll
/tmp/codex-imagegen-run.logfor progress; a multi-asset brief can run for many minutes (sequential generation + edit chains + chroma removal + reasoning between steps). - File presence in the target paths is not "done." Assets can appear incrementally before the run finishes (chroma removal/verification still pending): wait for the process to exit before treating the run as complete.
- After exit,
catthe-ooutput file for the summary and verify the promised paths actually exist (ls).
Phase 5: QC every asset
Open each PNG before wiring it into anything:
- Transparent background actually transparent (not just alpha-flagged): check by viewing the image, not by trusting a metadata field.
- Edges clean, no chroma-key spill (a pink/magenta or green fringe around the subject).
- Consistent character/style across a batch.
Codex can claim chroma removal succeeded while the key color is still visibly there: never report success on the CLI's word alone.
Notes
- Chroma-key flow: the built-in
image_gentool has no native alpha, so the skill generates on a flat chroma-key background then strips it locally. Never pass--despill/--spill-cleanupon pink/magenta-family subject art: despill desaturates those colors toward gray. - ChatGPT-account auth rejects API-only models; if
-m gpt-6-solfails on an auth error, see references/troubleshooting.md. - Regenerating with the same output filenames is cheap; re-integrating a bad asset into the app isn't: favor a re-run over shipping a QC failure.
- If a chroma removal comes out visibly wrong, don't just report failure: the raw generation and the fix procedure are in references/troubleshooting.md (load it when you actually hit this).
Worked examples
1. Single placeholder icon (low stakes, no confirmation gate)
$ codex --version → codex-cli 0.156.1
Effort: high (basic placeholder, single asset) — proceeding without a confirm gate.
$ codex exec --approve-for-me -m gpt-6-sol -c model_reasoning_effort="high" \
-o /tmp/codex-imagegen-final.md \
'$imagegen using gpt-image-2.5-sunburst via the built-in image tool to create
a minimalist gear icon, flat vector style, single accent color on transparent
background. Move the final PNG to assets/icons/gear.png.' > /tmp/codex-imagegen-run.log 2>&1 &
[poll log until process exits]
$ ls assets/icons/gear.png → found
[open assets/icons/gear.png — background transparent, edges clean]
Done: assets/icons/gear.png2. Official mascot, transparency-critical (confirmation gate + chroma QC)
Brief: official product mascot, xhigh effort (consistency-critical), transparent
background, 3 pose variants, saves to assets/mascot/{idle,wave,jump}.png.
Estimated run: several minutes across 3 sequential generations. Proceed? (yes/no)
[user: yes]
$ codex exec --approve-for-me -m gpt-6-sol -c model_reasoning_effort="xhigh" \
-o /tmp/codex-imagegen-final.md \
'$imagegen using gpt-image-2.5-sunburst via the built-in image tool to create
<full shared mascot design brief>, idle pose, transparent background. Move the final PNG to assets/mascot/idle.png.' \
> /tmp/codex-imagegen-run.log 2>&1 &
[wait for exit, then generate wave/jump as edits of the approved idle.png]
[open each PNG] idle.png: clean alpha, no spill. wave.png: faint magenta fringe
on the left arm — chroma removal didn't fully clear. Re-running wave.png only
before shipping.3. Scope-check redirect (not this skill's job)
User: "draw an architecture diagram of our microservices"
This is a diagram, not an illustrated raster asset — use the docs-diagram
skill instead. Stopping here.Reference Files
references/troubleshooting.md: auth/binary gotcha table, manual chroma-key recovery procedure. Load when an auth or binary error blocks Phase 1, or a chroma removal needs a manual fix after Phase 5.
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.

