imagegen

imagegen is a skill for Claude Code, Codex from jvm/pi-mono. It costs 113 tokens per session (5,857 once invoked), scanned A, original, MIT.

An image-generation tool for creating new bitmap images or changing existing ones. Bitmap images are made from individual pixels, such as photos, illustrations, mockups, and textures.

In plain words
What is it for?
Use it to create or edit website assets, game graphics, UI mockups, product mockups, wireframes, logos, photorealistic images, and infographics.
Why use it?
It helps when a project needs visual assets that would otherwise have to be made by hand or sourced elsewhere. It can use local or recently provided images as references.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Codex.

Good fit Use it to create or edit website assets, game graphics, UI mockups, product mockups, wireframes, logos, photorealistic images, and infographics.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jvm/pi-mono/imagegen
View source ↗ jvm/pi-mono
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 jvm/pi-mono --skill imagegen
Clone the repo
git clone --depth 1 https://github.com/jvm/pi-mono

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 imagegen

README.md
[![agentmods](https://agentmods.dev/badge/skills/jvm/pi-mono/imagegen/github.svg)](https://agentmods.dev/skills/jvm/pi-mono/imagegen)
Your own site
<a href="https://agentmods.dev/skills/jvm/pi-mono/imagegen"><img src="https://agentmods.dev/badge/skills/jvm/pi-mono/imagegen/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 imagegen

Your own site · 80×15
<a href="https://agentmods.dev/skills/jvm/pi-mono/imagegen"><img src="https://agentmods.dev/badge/skills/jvm/pi-mono/imagegen.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 113 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,857 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Rogue Agent · line 3
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Excessive Agency · line 340
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • medium Excessive Agency · line 341
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
How audits are shown
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.00113 $0.05857
Opus 5.5 $0.00045 $0.02343
Sonnet 5.5 $0.00023 $0.01171
Haiku 4.5 $0.00011 $0.00586

Measured yesterday against content hash 493013e7a478, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/image_gen.py, scripts/remove_chroma_key.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

packages/pi-codex-image-gen/skills/imagegen/SKILL.md · 357 lines

How it starts

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

Image Generation Skill

Adapted from OpenAI Codex's imagegen skill for Pi. Original source: https://github.com/openai/codex/tree/main/codex-rs/skills/src/assets/samples/imagegen Subscription guidance reconciled with Codex rust-v0.168.0-alpha.3, including the model-facing image-tool instructions. Required Pi modifications: use Pi's codex_generate_image tool name, Pi artifact paths, and the bundled helper path.

Generates or edits images for the current project (for example website assets, game assets, UI mockups, product mockups, wireframes, logo design, photorealistic images, or infographics).

Top-level modes and rules

This skill has exactly two top-level modes:

  • Default Pi tool mode (preferred): Pi codex_generate_image tool for new image generation, edits using up to five local or recent conversation images, reference variants, and native transparent-image requests. Does not require OPENAI_API_KEY.
  • Fallback CLI mode: scripts/image_gen.py CLI. Use only when the user explicitly asks for or confirms the CLI/API/model path. Requires OPENAI_API_KEY and separate API billing.

Within CLI fallback, the CLI exposes three subcommands:

  • generate
  • edit
  • generate-batch

Rules:

  • Recover existing current-branch artifacts with tools.codex_list_image_artifacts({}) after a later script failure; inspect availability and use returned paths instead of generating again. Listing consumes no image quota. Continue paginated listings with revision/nextOffset.
  • Direct and artifact requests share bounded account admission (two active, eight queued). Queue time counts toward the five-minute total deadline. Queueing does not authorize extra assets; cancellation after dispatch can still consume quota. Reported metadata is not measured pixel properties or verified cost.
  • Use the Pi codex_generate_image tool by default for new image generation requests.
  • codex_generate_image is model-only; call it directly, never through codemode. For scripted workflows use tools.codex_generate_image_artifact(...), which returns { summary, artifact: { path, mimeType, byteCount }, savedPath?, saveWarning? } without image bytes. Both tools support the same generation/edit parameters and subscription login. Use Pi 1.4.0 or later.
  • To display an artifact, call tools.read({path: result.artifact.path}), then image(block) if the returned value is an image block. Pi can resize or omit an un-decodable display image; the original remains unchanged. Never print or store base64 image bytes. Pass artifact paths directly through referencedImagePaths for chained edits.
  • Artifact save: "none" still writes a private temporary original; it means no persistent user copy. Completed originals survive script failure/timeout, reload, shutdown, and branch changes until user/OS cleanup. Copy needed project assets to persistent storage. Run /image-artifacts to recover current-branch paths without generation. Recent-image selection includes branch-local original artifacts, even if never displayed; reference-size limits still apply.
  • Do not retry artifact-storage failures automatically. Known storage failures reject before generation; failures after backend success can already have consumed quota. A successful requested persistent save can be used as recovery if the temporary write fails. If neither succeeds, the tool explicitly reports that no artifact is recoverable.
  • Image login is separate from chat: use /login codex-images and complete the ChatGPT OAuth flow in Pi. The Codex app is not required. Existing legacy Pi openai-codex OAuth can be a fallback; new openai plan-sharing chat OAuth cannot generate images. Never ask the user to paste login URLs or tokens into chat.
  • Legacy OAuth is used only when owned image credentials are absent. Configured but unusable codex-images credentials block fallback; repair that login instead of switching accounts.
  • codex-images has no native Pi image-model entry. Do not substitute models.generateImages() or an OpenRouter image model for these subscription tools: native image calls do not inherit their approval, save/recovery, output-size, or billing contracts.
  • The tool's model parameter selects a Codex routing model, not Flare or Sunburst. Do not claim a specific served image model unless the response reports it. Read details.reportedImage for backend-reported output settings, then inspect the actual image; prompt requests for quality, dimensions, or transparency are not guarantees.
  • The default routing model is gpt-6-astra. Explicit tool parameters and configuration values override this default.
  • Keep the default responses transport unless the user explicitly selects images or trusted configuration selects it. images is PNG-only, uses automatic size/quality, and rejects a per-call routing model. Never switch transports automatically after a failure.
  • requestedImage is intent, reportedImage is the server report, and measuredImage contains independently decoded dimensions and alpha properties. imageWarning does not authorize regeneration. Preserve originals if inspection is unavailable or a format differs.
  • Do not request GIF, SVG, complexity, masks, markup, or Flare/Sunburst selection through these subscription tools. GIF client support exists upstream but server access is not verified for this extension.
  • Do not automatically repeat quota, connection, timeout, or incomplete-stream failures. The remote generation may already have consumed quota.
  • Use referencedImagePaths for edits when every target has a local path. Inspect unseen local targets with Pi read first. Use numLastImagesToInclude only when a target is available solely in recent conversation history. Never provide both selectors. Masks and advanced CLI-only controls still require confirmed CLI fallback.
  • Do not switch to CLI fallback for ordinary generation quality, size, or output file-path control.
  • For cutouts or background removal, set background: "transparent" and use PNG or WebP. For edits, preserve existing transparency unless the user asks to change it.
  • Never silently switch from Pi codex_generate_image or CLI gpt-image-2 to CLI gpt-image-1.5. Treat this as a model/path downgrade and ask the user before doing it, unless the user has already explicitly requested gpt-image-1.5, scripts/image_gen.py, or CLI fallback.
  • The word batch by itself does not mean CLI fallback. If the user asks for many assets or says to batch-generate assets without explicitly asking for CLI/API/model controls, stay on the Pi tool path and issue one Pi tool call per requested asset or variant.
  • If the Pi tool fails or is unavailable, tell the user the CLI fallback exists and that it requires OPENAI_API_KEY. Proceed only if the user explicitly asks for that fallback.
  • If the user explicitly asks for CLI mode, use the bundled scripts/image_gen.py workflow. Do not create one-off SDK runners.
  • Never modify scripts/image_gen.py. If something is missing, ask the user before doing anything else.

Read the full file on GitHub · 357 lines

Files

What ships with it

10 files 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. yesterday Changed · -18 lines 493013e7a478
  2. 7d ago Changed · +2 lines c52d474fb972
  3. 28d ago Changed · +2 lines c54c339eab62
  4. 29d ago Changed · +4 lines c7f576994664
  5. 1mo ago Changed · +2 lines f4106f65370d
  6. 1mo ago Changed · +2 lines 20e37fda39c8
  7. 2mo ago First seen · 363 lines · 113 tokens per session scan A efb567132d87

Subscribe to this mod's changes

imagegen is a skill published in the GitHub repository jvm/pi-mono (37 stars, last pushed yesterday), licensed MIT. It adds 113 tokens to every session and 5,857 once invoked, about $0.0005 per session on Opus 5.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-30.

Related

imagegen compared with skills from other repositories

imagegen next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
imagegenjvm/pi-monoSkill37yesterdayMITA113Claude Code, Codex
imagegenopenai/codexSkill133kyesterdayApache-2.0A113Codex
playwright-climicrosoft/playwrightSkill99kyesterdayApache-2.0A19Claude Code
local-ai-agentsmicrosoft/ai-agents-for-beginnersSkill79k4d agoMITA200Claude Code, Codex
systematic-debuggingobra/superpowersSkill313k3d agoMITA21Claude Code
next-cache-components-adoptionvercel/next.jsSkill143kyesterdayMITA95Claude Code
next-partial-prefetching-adoptionvercel/next.jsSkill143kyesterdayMITA103Claude Code