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.
npx skills add jvm/pi-mono --skill imagegengit clone --depth 1 https://github.com/jvm/pi-monoWrote 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.
[](https://agentmods.dev/skills/jvm/pi-mono/imagegen)<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.
<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>- NVIDIA SkillSpector warn
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.
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.
| Model | Per session | Once 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 |
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.
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
imagegenskill for Pi. Original source: https://github.com/openai/codex/tree/main/codex-rs/skills/src/assets/samples/imagegen Subscription guidance reconciled with Codexrust-v0.168.0-alpha.3, including the model-facing image-tool instructions. Required Pi modifications: use Pi'scodex_generate_imagetool 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_imagetool for new image generation, edits using up to five local or recent conversation images, reference variants, and native transparent-image requests. Does not requireOPENAI_API_KEY. - Fallback CLI mode:
scripts/image_gen.pyCLI. Use only when the user explicitly asks for or confirms the CLI/API/model path. RequiresOPENAI_API_KEYand separate API billing.
Within CLI fallback, the CLI exposes three subcommands:
generateeditgenerate-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_imagetool by default for new image generation requests. codex_generate_imageis model-only; call it directly, never through codemode. For scripted workflows usetools.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}), thenimage(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 throughreferencedImagePathsfor 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-artifactsto 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-imagesand complete the ChatGPT OAuth flow in Pi. The Codex app is not required. Existing legacy Piopenai-codexOAuth can be a fallback; newopenaiplan-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-imagescredentials block fallback; repair that login instead of switching accounts. codex-imageshas no native Pi image-model entry. Do not substitutemodels.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
modelparameter selects a Codex routing model, not Flare or Sunburst. Do not claim a specific served image model unless the response reports it. Readdetails.reportedImagefor 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
responsestransport unless the user explicitly selectsimagesor trusted configuration selects it.imagesis PNG-only, uses automatic size/quality, and rejects a per-call routingmodel. Never switch transports automatically after a failure. requestedImageis intent,reportedImageis the server report, andmeasuredImagecontains independently decoded dimensions and alpha properties.imageWarningdoes 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
referencedImagePathsfor edits when every target has a local path. Inspect unseen local targets with Pireadfirst. UsenumLastImagesToIncludeonly 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_imageor CLIgpt-image-2to CLIgpt-image-1.5. Treat this as a model/path downgrade and ask the user before doing it, unless the user has already explicitly requestedgpt-image-1.5,scripts/image_gen.py, or CLI fallback. - The word
batchby 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.pyworkflow. Do not create one-off SDK runners. - Never modify
scripts/image_gen.py. If something is missing, ask the user before doing anything else.
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.
- assets/imagegen-small.svg 2.8 KB
- assets/imagegen.png 1.7 KB
- LICENSE.txt 11 KB
- references/cli.md 10.0 KB
- references/codex-network.md 1.7 KB
- references/image-api.md 6.6 KB
- references/prompting.md 8.5 KB
- references/sample-prompts.md 18 KB
- scripts/image_gen.py 34 KB runs code
- scripts/remove_chroma_key.py 14 KB runs code
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.
- yesterday Changed · -18 lines 493013e7a478
- 7d ago Changed · +2 lines c52d474fb972
- 28d ago Changed · +2 lines c54c339eab62
- 29d ago Changed · +4 lines c7f576994664
- 1mo ago Changed · +2 lines f4106f65370d
- 1mo ago Changed · +2 lines 20e37fda39c8
- 2mo ago First seen · 363 lines · 113 tokens per session scan A efb567132d87
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.
imagegen compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| imagegenjvm/pi-mono | Skill | 37 | yesterday | MIT | A | 113 | Claude Code, Codex |
| imagegenopenai/codex | Skill | 133k | yesterday | Apache-2.0 | A | 113 | Codex |
| playwright-climicrosoft/playwright | Skill | 99k | yesterday | Apache-2.0 | A | 19 | Claude Code |
| local-ai-agentsmicrosoft/ai-agents-for-beginners | Skill | 79k | 4d ago | MIT | A | 200 | Claude Code, Codex |
| systematic-debuggingobra/superpowers | Skill | 313k | 3d ago | MIT | A | 21 | Claude Code |
| next-cache-components-adoptionvercel/next.js | Skill | 143k | yesterday | MIT | A | 95 | Claude Code |
| next-partial-prefetching-adoptionvercel/next.js | Skill | 143k | yesterday | MIT | A | 103 | Claude Code |