codex-imagegen

codex-imagegen is a skill for Claude Code, Codex from Vallykrie/swarmGPT. It costs 112 tokens per session (1,143 once invoked), scanned A, original, MIT.

A workflow for having Codex command-line sessions generate or edit bitmap images through an image-generation tool. Bitmap images include files such as PNGs, JPGs, and WebPs.

In plain words
What is it for?
Use it for logos, icons, illustrations, hero images, textures, photos, placeholders, and social or Open Graph cards.
Why use it?
Most coding agents cannot directly create raster artwork. This workflow turns an image request into a detailed prompt, sends it to a Codex session, checks the returned file, and delivers it.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also agents/openai.yaml present. Also seen: mentions Codex.

Part of the swarmgpt plugin — 2 skills, 2 commands, 1 agent shipped together

Good fit Use it for logos, icons, illustrations, hero images, textures, photos, placeholders, and…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/vallykrie/swarmgpt/codex-imagegen
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Vallykrie/swarmGPT --skill codex-imagegen
Clone the repo
git clone --depth 1 https://github.com/Vallykrie/swarmGPT

Made for: Claude Code, Codex.

Or install swarmgpt, the plugin that ships this one along with the rest of its 2 skills, 2 commands, 1 agent.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for codex-imagegen

README.md
[![agentmods](https://agentmods.dev/badge/skills/vallykrie/swarmgpt/codex-imagegen.svg)](https://agentmods.dev/skills/vallykrie/swarmgpt/codex-imagegen)
Your own site
<a href="https://agentmods.dev/skills/vallykrie/swarmgpt/codex-imagegen"><img src="https://agentmods.dev/badge/skills/vallykrie/swarmgpt/codex-imagegen.svg" alt="Measured on agentmods" height="20"></a>
Per session 112 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,143 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00112 $0.01143
Opus 5 $0.00056 $0.00571
Sonnet 5 $0.00022 $0.00229
Haiku 4.5 $0.00011 $0.00114

Measured 6d ago against content hash 3af28044b187, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

codex-imagegen scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/codex-imagegen/SKILL.md · 104 lines

How it starts

The opening of the file, as written. The whole thing — 104 lines — stays where its author put it; the contents beside it link to each section on GitHub.

codex-imagegen

You cannot produce raster images. codex exec sessions can: the Codex CLI exposes a built-in image_gen.imagegen tool that generates and edits images using the user's existing ChatGPT authentication. No API key is required and no OPENAI_API_KEY is used — this runs on the plan the user already signed into with codex login.

Your job: turn the request into a precise image prompt, dispatch it, verify the file that comes back, and deliver it.

Step 0 — Preflight

  1. command -v codex — if missing, stop and tell the user to install the Codex CLI (npm install -g @openai/codex) and run codex login.
  2. Locate dispatch.sh as in codex-swarm Step 0. You can also call codex exec directly for a single image; the dispatcher is for batches.

Step 1 — Build the manifest

For each requested image, record as separate fields:

  • purpose — what it is for (icon, hero, texture, OG card…)
  • prompt — the detailed description you will send
  • new or edit — edits need exact input paths
  • destination — an absolute output path
  • format — png, jpg, webp

Treat a user-specified path and format as immutable. Do not rename the file, change its extension, or pick a different directory without asking. If the user gave no path, choose a sensible project location (assets/, public/, docs/images/) and say which one you picked. If the exact path already exists and replacement was not requested, ask before overwriting.

Step 2 — Write the image prompt

Codex generates what you describe, so describe it fully. Cover: subject, composition and framing, style (flat vector, 3D render, photo, watercolor…), palette, lighting, background (state explicitly if it must be transparent), aspect ratio, and any text that must appear verbatim. Name what must not be there too — stray text, watermarks, borders.

For an edit, pass the exact absolute path of every input file and state what must stay unchanged.

Step 3 — Dispatch

One job per image. Images are independent, so a batch goes out in parallel.

Read the full file on GitHub · 104 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 104 lines · 112 tokens per session scan A 3af28044b187

Subscribe to this mod's changes

codex-imagegen is a skill published in the GitHub repository Vallykrie/swarmGPT (2 stars, last pushed 1mo ago), licensed MIT. It adds 112 tokens to every session and 1,143 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

remotion

Toolkit-specific Remotion patterns — custom transitions, shared components, and project conventions. For core Remotion framework knowledge (hooks, animations, rendering, etc.), see the remotion-official skill.

eric861129/SKILLS_All-in-one · 44 tokens

deapi

AI media generation via deAPI. Transcribe YouTube/audio/video, generate images from text, text-to-speech, OCR, remove backgrounds, upscale images, create videos, generate embeddings. 10-20x cheaper than OpenAI/Replicate.

eric861129/SKILLS_All-in-one · 54 tokens

pptx

Use this skill any time a .pptx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying…

eric861129/SKILLS_All-in-one · 152 tokens

plotly

Interactive visualization library. Use when you need hover info, zoom, pan, or web-embeddable charts. Best for dashboards, exploratory analysis, and presentations. For static publication figures use matplotlib or scientific-visualization.

eric861129/SKILLS_All-in-one · 48 tokens

algorithmic-art

Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright…

eric861129/SKILLS_All-in-one · 62 tokens

revealjs

Create polished, professional reveal.js presentations. Use when the user asks to create slides, a presentation, a deck, or a slideshow. Supports themes, multi-column layouts, code highlighting, animations, speaker notes, and custom styling. Generates HTML + CSS with no build step required.

eric861129/SKILLS_All-in-one · 60 tokens