imagegen

A skill for creating original raster images, meaning pixel-based files such as illustrations, diagrams, artwork, and product visuals. It uses the desktop’s configured image provider.

In plain words
What is it for?
Use it to generate new images or visual variations, including artwork, diagrams, product visuals, and other bitmap assets.
Why use it?
It lets a coding agent produce visual assets from a description without requiring the user to manage provider credentials.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/nanmicoder/cc-haha/imagegen
Any agent
npx skills add NanmiCoder/cc-haha --skill imagegen
Clone the repo
git clone --depth 1 https://github.com/NanmiCoder/cc-haha

Made for: Claude Code, Codex.

Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 816 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00038 $0.00816
Opus 5 $0.00019 $0.00408
Sonnet 5 $0.00008 $0.00163
Haiku 4.5 $0.00004 $0.00082

Measured 2d ago against content hash cdf6f9ba8a78, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 2d 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.

src/skills/bundled/imagegen/SKILL.md · 50 lines

How it starts

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

Image generation

Use the built-in ImageGen and ImageEdit tools. Provider authentication, model routing, output storage, and secrets are managed by the desktop host; never ask the user to put an API key in this skill or in the prompt.

Decide the request shape

  • Treat a brand-new visual as generation and call ImageGen. Its schema intentionally has no image-path argument.
  • Treat a request that preserves, combines, or changes an existing visual as an edit and call ImageEdit.
  • One distinct prompt equals one tool call.
  • Use count only for multiple variations of the same prompt. For different concepts, make separate calls.
  • ImageEdit requires referenced_image_paths: populate it with ordered, exact paths to images the user supplied in this conversation — a path surfaced by [Image source: ...], a file the user attached with @, or a path returned by an earlier ImageGen call. Never invent, search for, or substitute another filesystem path, and never read an image off disk yourself to use it as an input; if the user means an image you have no path for, ask them to attach it. The first image is the primary canvas unless the user says otherwise.
  • For multi-turn editing, use the latest selected output as the next turn's edit_target. Repeat all identity, layout, text, and unchanged-region constraints on every turn so edits do not drift.
  • To edit several images independently, make one call per image. Put multiple images in one call only when the user wants them combined or used together as references. A single call accepts at most three source images.
  • Prefer a useful default composition when the user leaves details open. Do not invent branding, logos, or people they did not request.
  • Provider and image model selection come from the current desktop session; do not add either to the tool arguments.
  • If the provider returns an error, do not retry the image tool automatically. Explain the failure and let the user decide whether to retry or change providers.

Read the full file on GitHub · 50 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. 2d ago First seen · 50 lines · 38 tokens per session scan A cdf6f9ba8a78

Subscribe to this mod's changes

imagegen is a skill published in the GitHub repository NanmiCoder/cc-haha (14,259 stars, last pushed today), licensed MIT. It adds 38 tokens to every session and 816 once invoked, about $0.0002 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-30.