codex-imagegen

codex-imagegen is a command for coding agents from Vallykrie/swarmGPT. It costs 29 tokens per session (196 once invoked), scanned A, original, MIT.

A command that asks a Codex coding-agent session to generate a new image or edit an existing one. It passes the complete image request to Codex's built-in image-generation tool.

In plain words
What is it for?
Creating or editing images, choosing a sensible absolute output path, handling multiple image requests separately, and verifying each generated file's contents and format.
Why use it?
It gives an agent a defined way to handle image requests when the current agent cannot create or modify the image directly. It also requires the resulting file to be checked before delivery.

Command

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

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.

agentmods
npx agentmods add commands/vallykrie/swarmgpt/codex-imagegen
Clone the repo
git clone --depth 1 https://github.com/Vallykrie/swarmGPT

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/commands/vallykrie/swarmgpt/codex-imagegen.svg)](https://agentmods.dev/commands/vallykrie/swarmgpt/codex-imagegen)
Your own site
<a href="https://agentmods.dev/commands/vallykrie/swarmgpt/codex-imagegen"><img src="https://agentmods.dev/badge/commands/vallykrie/swarmgpt/codex-imagegen.svg" alt="Measured on agentmods" height="20"></a>
Per session 29 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 196 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00029 $0.00196
Opus 5 $0.00015 $0.00098
Sonnet 5 $0.00006 $0.00039
Haiku 4.5 $0.00003 $0.00020

Measured 4d ago against content hash 088b9e6de36e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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.

commands/codex-imagegen.md · 19 lines

What it actually says

Run the codex-imagegen skill (skills/codex-imagegen/SKILL.md in this plugin — read it now and follow it exactly).

Arguments given: $ARGUMENTS

Treat the whole argument string as the image request. If it is empty, ask the user what image they want and where to save it, then proceed.

Follow the skill: build a detailed image prompt, pick an absolute output path (ask only if no sensible default exists in the project), dispatch the codex job with --sandbox workspace-write, verify by viewing the resulting file and checking its real format, then deliver it. Multiple requested images are dispatched in parallel, one codex job each, with distinct output paths.

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. 4d ago First seen · 19 lines · 29 tokens per session scan A 088b9e6de36e

Subscribe to this mod's changes

codex-imagegen is a command published in the GitHub repository Vallykrie/swarmGPT (2 stars, last pushed 1mo ago), licensed MIT. It adds 29 tokens to every session and 196 once invoked, about $0.0001 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.