codex-imagegen
Skill1 starsChanged 5 months agoMITView on GitHub
Use this skill whenever the user wants Claude to generate or edit raster images through OpenAI Codex instead of doing the image work directly. Trigger on phrases like "use Codex to make an image", "generate this via Codex", "edit this image in Codex", "make a hero image with Codex", "create a PNG with Codex", or any request to create or modify a bitmap asset from Claude while routing execution to Codex. This skill is self-contained and does not require any other Claude skill.
19 other projects use a version of this.
Adopted by
Most recently taken up by
- mgiovani/ai-arsenaltheir own version, first seen Nov 22, 2026
- alexeygrigorev/.agentstheir own version, first seen Nov 22, 2026
- willink-oss/willink-claude-kittheir own version, first seen Nov 15, 2026
- 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
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 4 projects that use this
Hugging FaceSkillimplement
Make tests pass. Invoke after /write-tests produces failing tests.
Also in 3 projects that use this
Other versions19 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 19
- gongnyang/codex-fleet★ 46same name
- hyperb1iss/hyperskills★ 39same name
- nathanonn/agent-skills★ 23same name
- JunSeo99/claude-skill-codex-imagegen★ 22same name
- alexeygrigorev/.agents★ 17same name
- mgiovani/ai-arsenal★ 8same name
- mgiovani/cc-arsenal★ 8same name
- evelan-de/claude-code-plugins★ 3same name
- luminary19/atelier★ 2same name
- Vallykrie/swarmGPT★ 2same name
9 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 repository28 other files it gives its agents.
- advanced-prd-writerSkill
- calendar-reviewSkill
- challenge-before-buildSkill
- claude-build-hardeningSkill
- claude-memorySkill
- claude-product-demo-videoSkill
- codexSkill
- coding-craftSkill
- computer-controlSkill
- context-disciplineSkill
- disk-cleanupSkill
- image-generation-craftSkill
- infinite-working-skillSkill
- intelligent-delegationSkill
- linkedin-post-writerSkill
- okr-structuringSkill
- operator-standardSkill
- posthog-design-customizationSkill
- self-performance-reviewSkill
- session-namerSkill
- session-recallSkill
- skill-hardeningSkill
- slack-statusSkill
- slack-writerSkill
- subagent-briefSkill
- testing-standardsSkill
- verification-gatesSkill
- writing-craftSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. 0 are common, 7 are distinctive, and 6 are very specific to this project.
0
Common
Most of the 17 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 28
If either requirement is missing, say exactly what is missing and stop there.
- Distinctive: line 34
Use one or more local images as references for style, composition, or subject
- Very specific: line 53
If the user did not specify a destination and the image is project-bound, default to <cwd>/generated-images/.
- Very specific: line 61
If local image files are involved, pass each one with --image /absolute/path/to/file.
- Distinctive: line 67
Keep the delegation prompt simple and explicit.
- Distinctive: line 73
not to overwrite an existing asset unless the user explicitly asked for replacement
- Distinctive: line 155
If the user named a destination, use it.
- Very specific: line 156
If the work is project-bound and no destination was given, use <cwd>/generated-images/.
- Very specific: line 157
If the user only wants a preview or brainstorm, Codex may leave the result under ~/.codex/generated_images/<session-id>/....
- Distinctive: line 158
Never claim the output is ready until Codex reports the final saved path.
- Very specific: line 169
After TaskOutput returns, always run ls <reported-path> to confirm the file exists at the path Codex reported.
- Very specific: line 171
Check ~/.codex/generated_images/ for any output from the session.
- Distinctive: line 172
Do not claim the image was generated until a real file is confirmed on disk.
“Common” is measured: kept by at least 6 in 10 of the 17 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
Paths below use
{base}as shorthand for this skill's base directory, provided automatically when the skill loads.
This skill delegates image generation and image editing from Claude to Codex CLI. It does not depend on the separate Claude codex skill.
What this skill does
- Launches Codex non-interactively from Claude
- Passes image requests and optional local reference/edit files to Codex
- Lets Codex use its own built-in image workflow
- Returns the final saved path(s) and a concise result summary
Runtime prerequisites
This skill has no prerequisite Claude skills, but it does require a working Codex installation:
- Codex CLI available either on
PATHascodexor at/Applications/Codex.app/Contents/Resources/codex - Codex authentication already configured
If either requirement is missing, say exactly what is missing and stop there.
When to use
- Generate a new PNG, JPG, or WebP asset through Codex
- Edit an existing local image through Codex
- Use one or more local images as references for style, composition, or subject
- Produce project-bound bitmap assets from Claude while keeping Codex as the image worker
When not to use
- SVG, icon, or logo-system work that should stay vector-native
- HTML/CSS mockups that are better expressed as code
- Simple diagrams or wireframes that should be drawn directly in code or Mermaid
- On-brand email headers / heroes that must match a brand precisely (exact palette,
type, logo) — Codex raster approximates colour and mangles text/logos. Route these to
the
claude-design-email-headerskill, which drives Anthropic's Claude Design (HTML/SVG + your real design system) and rasterizes the result to an email PNG. Use Codex here only for photoreal/illustrative heroes where brand-system fidelity is not the point.
Workflow
- Decide whether the request is a new image or an edit.
- Decide whether the result is preview-only or should be saved into the current project.
- If the user did not specify a destination and the image is project-bound, default to
<cwd>/generated-images/. - Build a direct Codex prompt that includes:
- the user request
- the desired asset type or usage
- whether each attached image is an edit target or a reference
- the final destination directory if the asset should live in the project
- a requirement to report final saved path(s) and a short prompt summary
- Launch
{base}/scripts/codex-imagegen.shwithrun_in_background=True. - If local image files are involved, pass each one with
--image /absolute/path/to/file. - Collect the result with
TaskOutput. - Return Codex's final saved path(s) to the user.
Prompting rules
Keep the delegation prompt simple and explicit. Do not explain Codex to itself. Do not ask it to brainstorm unless the user asked for ideation.
Always tell Codex:
- whether this is
generateoredit - where the final file should end up if it is project-bound
- not to overwrite an existing asset unless the user explicitly asked for replacement
- to copy project-bound outputs out of
~/.codex/generated_images/...if needed - to report the final saved path(s), filename(s), and a short summary of the prompt used
Generate prompt skeleton
Generate a raster image for this request:
<user request>
Asset use: <hero image / mockup / social asset / texture / etc.>
Destination: <absolute directory path, or preview-only>
Filename preference: <name if the user gave one, otherwise choose a sensible name>
Constraints: <text, colors, aspect ratio, style, avoid list>
If the image is project-bound, copy the selected final output into the destination directory instead of leaving it only under ~/.codex/generated_images.
Do not overwrite an existing file unless I explicitly asked for replacement.
Report only:
1. final saved path(s)
2. filename(s)
3. a short summary of the prompt you usedEdit prompt skeleton
Edit the attached image or images for this request:
<user request>
Attached images:
- Image 1: <edit target or reference>
- Image 2: <reference>
Destination: <absolute directory path, or preview-only>
Filename preference: <name if known>
Preserve: <subject / composition / branding / text that must remain>
Change: <what should change>
If the result is project-bound, copy the selected final output into the destination directory instead of leaving it only under ~/.codex/generated_images.
Do not overwrite an existing file unless I explicitly asked for replacement.
Report only:
1. final saved path(s)
2. filename(s)
3. a short summary of the prompt you usedInvocation patterns
Generate a new image
task = Bash(
command='{base}/scripts/codex-imagegen.sh --dir /absolute/project/path "Generate a wide website hero image of a handyman replacing a water heater in a bright suburban garage. Save the final asset into /absolute/project/path/generated-images and report the final saved path and prompt summary only."',
run_in_background=True
)
TaskOutput(task_id=task, block=True, timeout=300000)Edit a local image
task = Bash(
command='{base}/scripts/codex-imagegen.sh --dir /absolute/project/path --image /absolute/project/path/assets/source.png "Edit the attached image to remove the background and save the final PNG into /absolute/project/path/generated-images without overwriting existing assets. Report the final saved path and prompt summary only."',
run_in_background=True
)
TaskOutput(task_id=task, block=True, timeout=300000)Use multiple reference images
task = Bash(
command='{base}/scripts/codex-imagegen.sh --dir /absolute/project/path --image /absolute/ref-1.jpg --image /absolute/ref-2.png "Generate a product mockup that matches the style of the attached references. Save the final asset into /absolute/project/path/generated-images and report the final saved path and prompt summary only."',
run_in_background=True
)
TaskOutput(task_id=task, block=True, timeout=300000)Output handling
- If the user named a destination, use it.
- If the work is project-bound and no destination was given, use
<cwd>/generated-images/. - If the user only wants a preview or brainstorm, Codex may leave the result under
~/.codex/generated_images/<session-id>/.... - Never claim the output is ready until Codex reports the final saved path.
Notes
- This skill is intentionally thin. Codex already knows how to do image generation; Claude just needs to invoke it cleanly.
- On this machine, Codex's built-in image flow writes initial outputs under
~/.codex/generated_images/<session-id>/...before any copy or move into a project directory. - Known defect: Codex intermittently letterboxes a dead black/white bar at the bottom of generated images — inspect every output and auto-crop the bar if present before returning the path to the user.
- Text-heavy banner work: for banners where text fidelity matters (brand names, CTAs, precise typesetting), prefer Chrome-headless HTML compositing (Space Grotesk font, feathered photo background, grain overlay) over baked-in AI text. Codex raster output mangles text and logo rendering. Route these to the
claude-design-email-headerskill instead.
Output verification
After TaskOutput returns, always run ls <reported-path> to confirm the file exists at the path Codex reported. If the file is missing:
- Report Codex's raw output verbatim to the user.
- Check
~/.codex/generated_images/for any output from the session. - Do not claim the image was generated until a real file is confirmed on disk.
Sync homes
Canonical: ~/.claude/skills/codex-imagegen (private, live). Public sanitized twin: ~/code/claude-skills/codex-imagegen → github.com/justinwilliames/claude-skills. Sanitization is a sync step — never push private paths/names.
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.

