image-generation

image-generation is a skill for Claude Code, Codex from SawyerHood/middleman. It costs 23 tokens per session (357 once invoked), scanned A, original, Apache-2.0.

An image-making tool that turns text descriptions into PNG or other image files, and can also transform one or more supplied images.

In plain words
What is it for?
Use it to create illustrations from prompts, or restyle sketches and reference images with a chosen aspect ratio and size.
Why use it?
It removes the need to create every visual manually or switch to a separate image editor. It requires a Google Gemini API key.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to create illustrations from prompts, or restyle sketches and reference images with a chosen aspect ratio and size.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sawyerhood/middleman/image-generation
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 SawyerHood/middleman --skill image-generation
Clone the repo
git clone --depth 1 https://github.com/SawyerHood/middleman

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 image-generation

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/sawyerhood/middleman/image-generation"><img src="https://agentmods.dev/badge/skills/sawyerhood/middleman/image-generation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 357 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.
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.00023 $0.00357
Opus 5 $0.00012 $0.00179
Sonnet 5 $0.00005 $0.00071
Haiku 4.5 $0.00002 $0.00036

Measured 9d ago against content hash 5880026e61c3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

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 9d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (generate.d.ts, generate.js), 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.

apps/backend/src/swarm/skills/builtins/image-generation/SKILL.md · 46 lines

What it actually says

Image Generation

Generate images using Google Gemini (gemini-3-pro-image-preview) for both text-to-image and image-to-image workflows.

Use the packaged CLI:

middleman image generate \
  --prompt "a cute robot bee in a garden" \
  --output "/path/to/output.png"

Image-to-image generation is supported with repeated --input-image flags:

middleman image generate \
  --prompt "turn this sketch into a painted poster with a limited teal and coral palette" \
  --input-image "/path/to/sketch.png" \
  --input-image "/path/to/reference.jpg" \
  --output "/path/to/output.png"

Options

  • --prompt (required): text description of the image to generate
  • --output (required): output file path (extension auto-detected when omitted)
  • --input-image (optional, repeatable): local source image(s) to send alongside the prompt
  • --aspect-ratio (optional): aspect ratio like 16:9, 1:1, 4:3
  • --size (optional): image size, default 1K

Output

The script prints JSON:

  • Success: { "ok": true, "file": "/path/to/output.png", "mimeType": "image/png" }
  • Failure: { "ok": false, "error": "..." }
Files

What ships with it

2 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. 9d ago First seen · 46 lines · 23 tokens per session scan A 5880026e61c3

Subscribe to this mod's changes

image-generation is a skill published in the GitHub repository SawyerHood/middleman (181 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 23 tokens to every session and 357 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-30.

Related

Other skills, from other repositories

gpt-image-2-style-library

Choose GPT-Image2 / gpt-image-2 visual styles and industrial prompt templates from the awesome-gpt-image-2 style library. Use when an agent needs to create, rewrite, classify, or improve image-generation prompts with repository-backed templates, categories, style tags, scene tags, pitfalls, and example cases.

freestylefly/awesome-gpt-image-2 · 72 tokens

feature-demo-recording

Record a demo video of a web feature from a real browser. Two modes -- a NARRATED film where measured voiceover drives the timeline (designed slides, subtitles, punch-in camera, rendered from an HTML timeline), and a SILENT evidence clip for a PR or a QA pass. Use when the user asks to record a video, demo, or screen…

kirodotdev/KiroCrew · 90 tokens

image-authoring

Author images and diagrams as code — SVG, Pillow, Excalidraw, mermaid. Load when asked to draw, illustrate, or make an image, icon, logo, poster, or diagram.

kirodotdev/KiroCrew · 45 tokens

imagemagick

Edit and convert images with the ImageMagick magick CLI — resize, crop, convert format, compress, rotate, montage, annotate. Use for any still-image transformation.

AtomicBot-ai/atomic-agent · 41 tokens

ffmpeg

Process audio and video with the ffmpeg / ffprobe CLIs — convert, trim, extract audio, resize, change format, make GIFs, inspect media. Use for any audio/video transformation.

AtomicBot-ai/atomic-agent · 47 tokens

pptx-maker

Generate or restyle a PowerPoint deck. Use when the user wants to create or edit a .pptx presentation, build slides from text or a URL, or design a reusable slide style.

kirodotdev/KiroCrew · 43 tokens