image-gen

image-gen is a skill for Codex from RaphLorr/claude-skill-image-gen. It costs 76 tokens per session (1,294 once invoked), scanned A, original, MIT.

An image-generation tool that turns text prompts into PNG images using OpenAI’s gpt-image-2 through the local Codex command-line tool.

In plain words
What is it for?
Use it to generate pictures, illustrations, logos, icons, banners, avatars, or other artwork and save each result to a specified project path.
Why use it?
It gives the agent a documented way to create image assets without requiring an OpenAI API key.

Skill for Codex

Written for Codex: reads ~/.codex or $CODEX_HOME. Also seen: reads .claude/ paths; mentions Codex.

Good fit Use it to generate pictures, illustrations, logos, icons, banners, avatars, or other artwork and save each result to a specified project path.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/raphlorr/claude-skill-image-gen/claude-skill-image-gen
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 RaphLorr/claude-skill-image-gen --skill claude-skill-image-gen
Clone the repo
git clone --depth 1 https://github.com/RaphLorr/claude-skill-image-gen

Made for: Codex.

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 image-gen

README.md
[![agentmods](https://agentmods.dev/badge/skills/raphlorr/claude-skill-image-gen/claude-skill-image-gen/github.svg)](https://agentmods.dev/skills/raphlorr/claude-skill-image-gen/claude-skill-image-gen)
Your own site
<a href="https://agentmods.dev/skills/raphlorr/claude-skill-image-gen/claude-skill-image-gen"><img src="https://agentmods.dev/badge/skills/raphlorr/claude-skill-image-gen/claude-skill-image-gen/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for image-gen

Your own site · 80×15
<a href="https://agentmods.dev/skills/raphlorr/claude-skill-image-gen/claude-skill-image-gen"><img src="https://agentmods.dev/badge/skills/raphlorr/claude-skill-image-gen/claude-skill-image-gen.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 76 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,294 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.00076 $0.01294
Opus 5 $0.00038 $0.00647
Sonnet 5 $0.00015 $0.00259
Haiku 4.5 $0.00008 $0.00129

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

Security

Grade A, and why

image-gen 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 10d 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.

SKILL.md · 95 lines

How it starts

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

Image generation (gpt-image-2 via codex CLI)

Generate a real AI image by running the wrapper, which shells out to the official codex binary (it already holds the ChatGPT auth) and saves a PNG:

python3 ~/.claude/skills/image-gen/scripts/generate.py "<detailed prompt>" \
  --out <path/to/image.png> [--quality <q>] [--size <s>] [--ref <image>] [--effort <e>]

The script prints the saved file path on stdout. Show or embed it in your reply (e.g. ![result](path)) so the user can view it.

Writing the prompt

Always expand the user's request into a rich, specific prompt: subject, style, composition, lighting, colours, mood. gpt-image-2 rewards specificity.

Choosing --out

Always pass a descriptive path under the current project (e.g. assets/hero-banner.png) so successive images don't overwrite each other.

Choosing --quality (default: auto)

  • high — user asks for "detailed", "photorealistic", "high-res", "print", "polished", a hero image, or final artwork.
  • low — user asks for a "quick", "draft", "rough", or "placeholder" image.
  • medium — explicitly asked for medium, or a balance of speed and detail.
  • omit (auto) — no quality signal in the request.

Higher quality costs more quota and time; don't default to high.

Choosing --effort (default: low)

Reasoning effort of the orchestrating model before it calls the image tool — how hard it plans the prompt, not the pixel render quality. low is fastest and cheapest and is right for most requests. Raise it only when planning helps:

  • medium / high — complex multi-subject scenes, accurate text inside the image, infographics/diagrams, or careful identity-preserving --ref edits.
  • xhigh — rarely; only when high still misreads an intricate prompt.

low is the floor for image generation (minimal is rejected by the API for the image tool). Higher effort is slower and uses more quota, so don't default to it.

Choosing --size (default: auto)

Pick from the user's intent; pass an aspect keyword, a ratio, or exact pixels:

  • landscape / 16:9 / wide — banners, headers, scenery, desktop wallpaper.
  • portrait / 2:3 / tall — posters, phone wallpaper, full-body subjects.
  • square / 1:1 — avatars, icons, app art, social posts.
  • WIDTHxHEIGHT (e.g. 1024x1024) — when the user gives exact dimensions.
  • omit (auto) — let the model choose.

Read the full file on GitHub · 95 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. 10d ago First seen · 95 lines · 76 tokens per session scan A e8b593f24de1

Subscribe to this mod's changes

image-gen is a skill published in the GitHub repository RaphLorr/claude-skill-image-gen (1 stars, last pushed 2mo ago), licensed MIT. It adds 76 tokens to every session and 1,294 once invoked, about $0.0004 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.