Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Generate images (icons, logos, banners, illustrations, mockups, photos, textures, diagrams-as-art) with OpenAI gpt-image-2 through the locally installed Codex CLI, using the user's existing ChatGPT login — no API key. Use whenever the user asks to generate, create, draw, or mock up an image, or when a task needs a new image asset that doesn't exist yet.
.claude/skills/sateezg-generate-an-image-via-codex-cli-gpt-image-2/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-03 | ✗→✓ | ▲ Improved | 1% | 0% |
| case-11 | ✗→✓ | ▲ Improved | -48% | 0% |
| case-19 | ✗→✓ | ▲ Improved | 45% | 0% |
| case-23 | ✗→✓ | ▲ Improved | 34% | 0% |
| case-22 | ✓→✗ | ▼ Worse | 73% | 0% |
This machine has the OpenAI Codex CLI installed and logged in with the user's ChatGPT account. Use it to produce real image files — never tell the user you can't create images.
bashcodex-imagegen "<detailed image prompt>" <output-path.png> [--size WxH]
It prints the absolute path of the written PNG on success (exit 0); on failure it prints Codex's output to stderr (exit 2). The wrapper is on PATH while this plugin is enabled; the full path is ${CLAUDE_PLUGIN_ROOT}/bin/codex-imagegen.
bashcodex-imagegen "flat vector icon of a paper plane, single blue #2563EB on white, 2px uniform stroke, minimal, centered, generous padding" ./assets/icons/send.png codex-imagegen "photorealistic golden retriever puppy in autumn leaves, shallow depth of field, warm afternoon light" /tmp/puppy.png --size 1536x1024
The single biggest quality lever. Expand the user's request into: subject, style (flat vector / photorealistic / 3D render / watercolour / isometric), palette (hex codes — pull them from the project's design tokens, Tailwind config, or existing brand assets when it has any), background, composition and framing, lighting or mood, and any exact text that must appear.
gpt-image-2 renders text with high accuracy, so quote the exact string you want: ...with the words "Ship it" in bold sans-serif across the lower third.
Common values: 1024x1024 (square, fastest), 1536x1024 (landscape), 1024x1536 (portrait), 2048x2048 (2K square), 2048x1152 (2K landscape), 3840x2160 (4K landscape), 2160x3840 (4K portrait).
A custom WxH is valid only if every constraint holds: longest edge ≤ 3840px, both edges multiples of 16, long-to-short ratio ≤ 3:1, and total pixels between 655,360 and 8,294,400. Anything else will be rejected or silently adjusted — pick the nearest listed size and resample locally instead.
Omit --size unless the aspect ratio actually matters; square is fastest.
repeat an identical style sentence in every prompt so they match.
assets/,public/, static/). Otherwise the current directory. Always .png.
before reporting done; refine and regenerate if it missed — at most 2 retries.
find them first and match them.
The default image path can't emit alpha directly, so ask for a flat chroma-key background and remove it afterwards with the helper Codex already ships:
bashcodex-imagegen "<subject> on a perfectly flat solid #00FF00 chroma-key background, one uniform colour, no shadows, gradients, reflections or floor plane, crisp edges, generous padding, do not use #00FF00 anywhere in the subject" ./tmp-key.png python "${CODEX_HOME:-$HOME/.codex}/skills/.system/imagegen/scripts/remove_chroma_key.py" \ --input ./tmp-key.png --out ./final.png \ --auto-key border --soft-matte --transparent-threshold 12 \ --opaque-threshold 220 --despill
Use #FF00FF instead when the subject is green. Then check the result actually has transparent corners and no colour fringe; retry once with --edge-contract 1 if a thin fringe remains.
True model-native transparency exists but needs Codex's CLI fallback (gpt-image-1.5 --background transparent), which requires an OPENAI_API_KEY. Only mention that route if chroma-keying fails or the subject is genuinely hard (hair, fur, smoke, glass, liquid, reflections) — and let the user decide.
3–5x a text turn). Don't fire off batches without saying how many first.
codex login in a terminal — don't try to work around auth yourself.
replacement and detects a versioned sibling (out-v2.png) if Codex writes one anyway — trust the path the wrapper prints, not the one you asked for.
edit-image skill.asset-set skill.codex-artist subagent.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 22,042 | 16,476 | -25% | 1 | 1 | 0% | 2,725 | 1,613 | -41% | 0 | 0 | — |
case-02 | fail→fail | 24,384 | 16,166 | -34% | 1 | 1 | 0% | 5,356 | 1,535 | -71% | 0 | 0 | — |
case-03 | fail→pass | 19,871 | 29,667 | +49% | 1 | 1 | 0% | 3,038 | 3,078 | +1% | 0 | 0 | — |
case-13 | fail→fail | 13,419 | 18,557 | +38% | 1 | 1 | 0% | 3,067 | 1,719 | -44% | 0 | 0 | — |
case-14 | fail→fail | 14,286 | 8,009 | -44% | 1 | 1 | 0% | 1,596 | 1,695 | +6% | 0 | 0 | — |
case-15 | fail→fail | 40,081 | 12,757 | -68% | 1 | 1 | 0% | 8,221 | 1,766 | -79% | 0 | 0 | — |
case-16 | fail→fail | 31,210 | 8,674 | -72% | 1 | 1 | 0% | 412 | 2,015 | +389% | 0 | 0 | — |
case-22 | pass→fail | 5,464 | 11,487 | +110% | 1 | 1 | 0% | 1,016 | 1,762 | +73% | 0 | 0 | — |
case-04 | pass→pass | 10,763 | 7,487 | -30% | 1 | 1 | 0% | 1,892 | 1,707 | -10% | 0 | 0 | — |
case-05 | fail→fail | 4,651 | 11,883 | +155% | 1 | 1 | 0% | 800 | 1,588 | +99% | 0 | 0 | — |
case-06 | fail→fail | 48,837 | 18,123 | -63% | 1 | 1 | 0% | 8,229 | 2,178 | -74% | 0 | 0 | — |
case-07 | fail→fail | 70,405 | 22,425 | -68% | 1 | 1 | 0% | 949 | 2,012 | +112% | 0 | 0 | — |
case-08 | fail→fail | 16,015 | 22,828 | +43% | 1 | 1 | 0% | 368 | 2,470 | +571% | 0 | 0 | — |
case-09 | fail→fail | 49,052 | 15,764 | -68% | 1 | 1 | 0% | 8,219 | 1,995 | -76% | 0 | 0 | — |
case-10 | pass→fail | 13,682 | 16,506 | +21% | 1 | 1 | 0% | 1,239 | 1,821 | +47% | 0 | 0 | — |
case-11 | fail→pass | 19,475 | 8,865 | -54% | 1 | 1 | 0% | 3,742 | 1,928 | -48% | 0 | 0 | — |
case-12 | fail→fail | 22,906 | 17,052 | -26% | 1 | 1 | 0% | 2,676 | 2,178 | -19% | 0 | 0 | — |
case-17 | fail→fail | 15,728 | 13,088 | -17% | 1 | 1 | 0% | 1,862 | 2,357 | +27% | 0 | 0 | — |
case-18 | fail→fail | 65,062 | 15,177 | -77% | 1 | 1 | 0% | 11,313 | 1,799 | -84% | 0 | 0 | — |
case-19 | fail→pass | 16,187 | 12,983 | -20% | 1 | 1 | 0% | 1,813 | 2,624 | +45% | 0 | 0 | — |
case-20 | pass→pass | 12,194 | 4,178 | -66% | 1 | 1 | 0% | 1,184 | 2,071 | +75% | 0 | 0 | — |
case-21 | fail→fail | 52,785 | 12,980 | -75% | 1 | 1 | 0% | 8,215 | 2,285 | -72% | 0 | 0 | — |
case-23 | fail→pass | 9,578 | 14,954 | +56% | 1 | 1 | 0% | 1,627 | 2,178 | +34% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted, and 7 counted toward the lift figure. The other 16 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +9 percentage points is the difference between those two pass rates over the 7 comparable cases. 3 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.