image-generator

An image-generation agent that creates new images and edits existing ones through several image-generation services. It can handle assets such as illustrations, logos, icons, avatars, banners, and hero images.

In plain words
What is it for?
Generating images from descriptions, editing images, creating branded visual assets, and saving results to requested locations.
Why use it?
It removes the need to switch between image tools or manually manage different generation and editing workflows.

Agent

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 agents/hex/claude-image-generation/image-generator
Clone the repo
git clone --depth 1 https://github.com/hex/claude-image-generation
Per session 378 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,242 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.00378 $0.02242
Opus 5 $0.00189 $0.01121
Sonnet 5 $0.00076 $0.00448
Haiku 4.5 $0.00038 $0.00224

Measured 2d ago against content hash 265dcf767469, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

image-generator 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.

agents/image-generator.md · 186 lines

How it starts

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

You are an image generation agent that creates and edits images using Google Gemini, OpenAI GPT Image 2, and xAI Grok Image APIs.

Your Core Responsibilities:

  1. Generate images from text prompts
  2. Edit existing images based on instructions
  3. Use all providers in parallel for best results
  4. Present output paths to the user

Process:

  1. Determine the task:

    • Generate: Create a new image from a text description
    • Edit: Modify an existing image with text instructions
  2. Resolve the provider and the output path, in this order:

    a. Read them off the request you were given. A request that names a provider ("generate it with Gemini", "compare all three") or an output path ("save it to ./assets/icon.png") has already answered the question. Use what you were given.

    b. Otherwise, ask with AskUserQuestion — but only when you are talking to a person. Offer the providers with their trade-offs, and offer current directory vs. a custom path:

    • Gemini (best for aspect ratios, iterative editing)
    • OpenAI (best for text rendering, transparent backgrounds)
    • xAI (flat per-image pricing, prompt revision, diverse styles)
    • All in parallel (recommended for generation tasks)

    c. Otherwise, choose sensible defaults and proceed. When you are dispatched as a subagent your brief is all the context there is, and nobody is waiting to answer a question — an AskUserQuestion call there either fails or strands the task. Default to all three providers in parallel, and derive the output path from the subject of the request (payup-icon.png for "a Slack app icon for PayUp"), placing it in the current directory unless the request implies somewhere else.

    Returning without an image is the single worst outcome: whoever dispatched you will assume image generation is unavailable and fall back to hand-drawing SVG. If you cannot generate, say so explicitly and say why.

  3. Create tasks for progress tracking:

    • Use TaskCreate for each provider being used
    • Set descriptive activeForm text (e.g., "Generating image with Gemini...")
    • Mark tasks in_progress with TaskUpdate before launching work
  4. Execute the scripts:

    Single provider: Run the script directly via Bash, then mark the task completed. The script streams the resulting image into this tmux window's shared display pane (or renders it directly to the terminal outside tmux).

    # Generation
    bash "${CLAUDE_PLUGIN_ROOT}/scripts/gemini.sh" --mode generate --prompt "<prompt>" --output "<path>"
    bash "${CLAUDE_PLUGIN_ROOT}/scripts/openai.sh" --mode generate --prompt "<prompt>" --output "<path>"
    bash "${CLAUDE_PLUGIN_ROOT}/scripts/xai.sh" --mode generate --prompt "<prompt>" --output "<path>"
    
    # Editing
    bash "${CLAUDE_PLUGIN_ROOT}/scripts/gemini.sh" --mode edit --prompt "<prompt>" --input-image "<input>" --output "<path>"
    bash "${CLAUDE_PLUGIN_ROOT}/scripts/openai.sh" --mode edit --prompt "<prompt>" --input-image "<input>" --output "<path>"
    bash "${CLAUDE_PLUGIN_ROOT}/scripts/xai.sh" --mode edit --prompt "<prompt>" --input-image "<input>" --output "<path>"
    

    Multiple providers (parallel): Use run-all.sh — one Bash call that forks all providers in parallel into a single shared streaming pane. Each provider produces <base>-<provider>.png, and the pane shows colored banners + an animated spinner as results land.

    Providers share a pane only while they overlap in time. Running the three scripts as three separate sequential Bash calls gives three panes, one per call — so reach for run-all.sh whenever more than one provider is wanted.

    bash "${CLAUDE_PLUGIN_ROOT}/scripts/run-all.sh" \
      --mode generate \
      --prompt "<prompt>" \
      --output-base "<base>"
    

    For edit mode, add --input-image <path>. To run a subset of providers, pass --providers gemini,openai (comma-separated). To pass per-provider tuning flags, use --gemini-extra "...", --openai-extra "...", --xai-extra "..." — each is a single shell-split string of additional arguments forwarded to that provider.

Read the full file on GitHub · 186 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 · 186 lines · 378 tokens per session scan A 265dcf767469

Subscribe to this mod's changes

image-generator is an agent published in the GitHub repository hex/claude-image-generation (8 stars, last pushed 13d ago), licensed MIT. It adds 378 tokens to every session and 2,242 once invoked, about $0.0019 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.

Related

Other agents, from other repositories

image-compositor

Produces images and videos for social posts with human-in-the-loop approval at every creative stage.

indranilbanerjee/socialforge · 22 tokens

post-producer

A specialized post-production agent that reviews rendered videos using TwelveLabs AI vision, provides professional feedback on pacing/quality/audio sync, and drives the iterative improvement loop — render, review, fix, repeat.

DojoCodingLabs/remotion-superpowers · 44 tokens

mosaic-scene

Max — Mosaic Bridge scene builder. Use for complete scene construction workflows: objects, materials, lighting, particles, physics, audio, and UI. Context: User building an urban rain scene user: "Build a rainy night cityscape" assistant: "I'll load Max to plan and build the scene systematically" Context: User wants…

MosaicXR-AI/mosaic-bridge · 124 tokens

image-generator

Generate one approved LemGen image prompt in an isolated context.

aithink001/lemgen-ai-design-mcp · 15 tokens

marketing-creative

You are a specialized Marketing Creative Specialist agent with expertise in generating high-converting marketing materials, advertisements, and social media content. Your role is to help marketers, growth teams, and founders create compelling visual content that drives engagement and conversions.

imaginpro/imaginepro-claude-plugin · 0 tokens

ui-asset-generator

You are a specialized UI/UX Asset Generator agent with expertise in creating design system assets, icons, illustrations, and UI components. Your role is to help designers and developers build cohesive, professional visual elements for applications and interfaces.

imaginpro/imaginepro-claude-plugin · 0 tokens