image-generation

image-generation is a skill for Claude Code, Codex from mathiasbourgoin/roster. It costs 26 tokens per session (1,665 once invoked), scanned A, original, MIT.

A command-line tool skill for creating new images or changing existing image files from written instructions.

In plain words
What is it for?
Use it for tasks such as creating illustrations or logos, editing an existing image, choosing its size and file format, and saving it to a specified path.
Why use it?
It turns image requests into a repeatable workflow and checks the result, while handling invalid input and generation errors.

Skill for Claude CodeCodex

Written for Claude Code and Codex: when-to-use in frontmatter, but also runs codex exec. Also seen: installed under .agents/ (shared by several agents); mentions Codex.

Good fit Use it for tasks such as creating illustrations or logos, editing an existing image, choosing its size and file format, and saving it to a specified path.

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

Made for: Claude Code, 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-generation

README.md
[![agentmods](https://agentmods.dev/badge/skills/mathiasbourgoin/roster/image-generation.svg)](https://agentmods.dev/skills/mathiasbourgoin/roster/image-generation)
Your own site
<a href="https://agentmods.dev/skills/mathiasbourgoin/roster/image-generation"><img src="https://agentmods.dev/badge/skills/mathiasbourgoin/roster/image-generation.svg" alt="Measured on agentmods" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,665 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.00026 $0.01665
Opus 5 $0.00013 $0.00833
Sonnet 5 $0.00005 $0.00333
Haiku 4.5 $0.00003 $0.00167

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

Security

Grade A, and why

image-generation 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 7d 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.

.agents/skills/image-generation/SKILL.md · 161 lines

How it starts

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

Image Generation

Generate or edit an image using the Codex CLI based on $ARGUMENTS.

Parse $ARGUMENTS as one of:

  • "<prompt>" — generate a new image
  • "edit <path> <prompt>" — edit an existing image
  • Optional inline hints: size:<WxH>, format:<png|jpg|webp>, out:<path>, style:<hint>

Examples:

  • "a watercolor moonlit library"
  • "edit assets/hero.png replace background with white"
  • "a minimalist OCaml logo size:512x512 out:docs/logo.png"

Step 1 — Parse and Resolve Arguments

Extract from $ARGUMENTS:

  • MODE: generate or edit
  • RAW_PROMPT: the user's original description
  • INPUT_PATH: (edit mode only) path to source image — verify it exists; abort if not
  • SIZE: default 1024x1024; override if size:WxH present
  • FORMAT: default png; override if format:X present
  • OUTPUT_PATH: if out:<path> present, use it; otherwise ask the user where to save the result

If OUTPUT_PATH is missing and $ARGUMENTS provides no hint, ask:

"Where should I save the image? (e.g., assets/hero.png)"

Do not proceed until OUTPUT_PATH is resolved.

Step 2 — Prompt Refinement

Before invoking Codex, rewrite RAW_PROMPT into a detailed, visually precise prompt:

  • Add composition, lighting, mood, and style details the user left implicit
  • Incorporate SIZE as an aspect ratio hint (e.g., "square 1:1 composition")
  • Incorporate FORMAT only if it has visual implications (e.g., transparency for PNG)
  • Keep the user's intent intact — do not substitute a different concept

Store the result as REFINED_PROMPT. Show the user both the original and refined version:

Original: <RAW_PROMPT> Refined: <REFINED_PROMPT>

If the user rejects the refinement, use RAW_PROMPT as-is.

Step 3 — Generate

Set ATTEMPT=1, MAX_ATTEMPTS=3.

Generate mode:

codex exec --full-auto "Generate a <SIZE> <FORMAT> image of: <REFINED_PROMPT>. Save the result to <OUTPUT_PATH>."

Edit mode:

codex exec --full-auto "Edit the image at <INPUT_PATH>: <REFINED_PROMPT>. Save the result to <OUTPUT_PATH>."

Read the full file on GitHub · 161 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. 7d ago First seen · 161 lines · 26 tokens per session scan A e36aa724b0ec

Subscribe to this mod's changes

image-generation is a skill published in the GitHub repository mathiasbourgoin/roster (2 stars, last pushed yesterday), licensed MIT. It adds 26 tokens to every session and 1,665 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.