imagegen

A skill that helps the Codex command-line agent use its built-in image-generation tool. It covers creating or editing images such as icons, logos, illustrations, and mockups.

In plain words
What is it for?
Generating new images or editing existing image files, including restyling, retouching, upscaling, and adding or removing elements.
Why use it?
It handles the practical details of invoking the image tool and reliably locating the generated file.

Skill for Claude CodeCodex

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 skills/bengous/claude-code-plugins/imagegen
Any agent
npx skills add bengous/claude-code-plugins --skill imagegen
Clone the repo
git clone --depth 1 https://github.com/bengous/claude-code-plugins

Made for: Claude Code, Codex.

Per session 65 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,537 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.00065 $0.01537
Opus 5 $0.00032 $0.00768
Sonnet 5 $0.00013 $0.00307
Haiku 4.5 $0.00006 $0.00154

Measured yesterday against content hash 48b28e7a3f3e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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 yesterday.

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.

agents-bridge/skills/imagegen/SKILL.md · 134 lines

How it starts

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

Image generation via Codex

The Codex CLI ships a built-in image_gen tool (no API key needed). It is exposed by no flag — the model calls it when the prompt asks for an image. This skill is the thin wrapper that gets the invocation right: writable sandbox, destination directory, output path read back reliably.

Codex already owns the image-prompting policy — its system skill covers style, sizing, text accuracy, transparency and batching. Do not duplicate or override it: pass the user's request through and let Codex augment it. Dictate size, style or quality only when the user asked for them.

Resolve the destination first

The tool writes into ~/.codex/generated_images/<thread-id>/outside the workspace, under a generated filename whose shape has changed between CLI versions, so never predict it. There is no destination argument: without an explicit copy instruction in the prompt, the image never leaves that directory.

So before invoking, decide an absolute destination path. The user's request may name one after a -> (a fox -> ./art/fox.png); otherwise default to a filename in the cwd. Resolve any relative path the user wrote against your own cwd, then pass it absolute — the prompt is read inside codex, where a bare ./x.png means something else. -C must point at a directory that contains the resolved destination: it is the writable workspace root, and it is what makes the copy legal. The sandbox does not govern the tool's own write, only the copy into the project.

Invocation

Same invariants as the codex skill: prompt never inlined, written with the Write tool, read from stdin via -; --json + -o; thread id from thread.started.

# 1. Write /tmp/imagegen-prompt.md  <- the image request + the two instructions
#    below. Strip any `-> destination` off the request first: it is this
#    skill's routing syntax, not part of the image description.
#    Pick per-run filenames (prompt, .jsonl, .last) if runs may overlap.
# 2. Run it. Add --skip-git-repo-check when -C is not inside a git repo.
"${CLAUDE_PLUGIN_ROOT}/scripts/codex" exec \
  -s workspace-write -C /absolute/path/to/project \
  --json -o /tmp/imagegen.last \
  - < /tmp/imagegen-prompt.md \
  > /tmp/imagegen.jsonl

tid="$(jq -r 'select(.type=="thread.started") | .thread_id // empty' \
        /tmp/imagegen.jsonl | head -n1)"

Read the full file on GitHub · 134 lines

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. yesterday First seen · 134 lines · 65 tokens per session scan A 48b28e7a3f3e

Subscribe to this mod's changes

imagegen is a skill published in the GitHub repository bengous/claude-code-plugins (4 stars, last pushed 2d ago), licensed MIT. It adds 65 tokens to every session and 1,537 once invoked, about $0.0003 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

animate

Review a feature and enhance it with purposeful animations, micro-interactions, and motion effects that improve usability and delight. Use when the user mentions adding animation, transitions, micro-interactions, motion design, hover effects, or making the UI feel more alive.

fengshao1227/ccg-workflow · 53 tokens

liquid-glass

Apple Liquid Glass design system. Use when building UI with translucent, depth-aware glass morphism following Apple's design language. Provides CSS tokens, component patterns, dark/light mode, and animation specs.

fengshao1227/ccg-workflow · 43 tokens

create_profile_style_skill

【META SKILL】分析当前剪辑逻辑与风格,总结并生成一个新的可复用 Skill 文件,存入剪辑技能库。Analyze the current editing logic and style, summarize and generate a new reusable Skill file, and store it in the editing skill library.

FireRedTeam/FireRed-OpenStoryline · 64 tokens

listenhub-tts

使用 ListenHub API 将文本转换为语音(TTS)。支持三种模式:快速合成(/v1/tts)、 多角色脚本(/v1/speech)、长文本流式合成(/v1/flow-speech/episodes)。 音色未指定时自动获取音色列表供用户选择,默认使用 chat-girl-105-cn(晓曼)。 Use when user says: "tts", "text to speech", "语音合成", "文字转语音", "朗读", "生成语音", "生成音频", "转音频", "text to audio".

smallnest/goal-workflow · 138 tokens

article-icons

Illustrate an article (Markdown, HTML, etc.) with animated-style icons from itshover.com/icons. Fetches icons as clean inline SVG and places them at section headings, key concepts, lists, and callouts. Triggers on: /article-icons, 配图, 给文章配图标, add icons to article, illustrate with icons.

smallnest/goal-workflow · 74 tokens

absolute-ui

Build polished, intentional UIs with concrete CSS/Tailwind values — typography, color, layout, spacing, dark mode, accessibility, animations, components. Encodes specific, opinionated rules with exact values, not vague advice. Covers buttons, cards, forms, tables, navigation, dashboards, landing pages, onboarding, and…

maddhruv/absolute · 121 tokens