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 agentmods add commands/mathiasbourgoin/roster/image-generationgit clone --depth 1 https://github.com/mathiasbourgoin/rosterWrote 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/commands/mathiasbourgoin/roster/image-generation)<a href="https://agentmods.dev/commands/mathiasbourgoin/roster/image-generation"><img src="https://agentmods.dev/badge/commands/mathiasbourgoin/roster/image-generation.svg" alt="Measured on agentmods" height="20"></a>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 | $0.00026 | $0.01665 |
| Opus 5 | $0.00013 | $0.00833 |
| Sonnet 5 | $0.00005 | $0.00333 |
| Haiku 4.5 | $0.00003 | $0.00167 |
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 4d 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.
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:generateoreditRAW_PROMPT: the user's original descriptionINPUT_PATH: (edit mode only) path to source image — verify it exists; abort if notSIZE: default1024x1024; override ifsize:WxHpresentFORMAT: defaultpng; override ifformat:XpresentOUTPUT_PATH: ifout:<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
SIZEas an aspect ratio hint (e.g., "square 1:1 composition") - Incorporate
FORMATonly 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>."
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.
- 4d ago First seen · 161 lines · 26 tokens per session scan A e36aa724b0ec
image-generation is a command published in the GitHub repository mathiasbourgoin/roster (2 stars, last pushed 9d ago), 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.
Other commands, from other repositories
review-renovate
Review and merge renovate PRs with automerge configuration updates.
monitor-ci
Monitors pull request CI checks until they are resolved (pass or fail).
implement-regression-tests
Implement regression tests marked with it.skip.
plan-regression-tests
Plan regression tests for existing code with it.skip statements.
release-note-csoar
Automates the creation of Cloud SOAR (Automation Service) release notes for platform updates, integration changes, and bug fixes.
audit-docs
Audit repository documentation against 30 best practices — root files, structure, machine-readable, automation, quality. Produces a scored report. Use before releases or when onboarding a new contributor.