generate-images

generate-images is a skill for Claude Code, Codex from cfircoo/claude-code-toolkit. It costs 43 tokens per session (1,362 once invoked), scanned B, original, MIT.

Instructions for generating and editing images with Nano Banana, Google Gemini’s image-generation model.

In plain words
What is it for?
Making images, icons, logos, banners, diagrams, mockups, and other visual assets.
Why use it?
It gives the coding agent a defined way to create or change visual files and use reference images.

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/cfircoo/claude-code-toolkit/generate-images
Any agent
npx skills add cfircoo/claude-code-toolkit --skill generate-images
Clone the repo
git clone --depth 1 https://github.com/cfircoo/claude-code-toolkit

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 generate-images

README.md
[![agentmods](https://agentmods.dev/badge/skills/cfircoo/claude-code-toolkit/generate-images.svg)](https://agentmods.dev/skills/cfircoo/claude-code-toolkit/generate-images)
Your own site
<a href="https://agentmods.dev/skills/cfircoo/claude-code-toolkit/generate-images"><img src="https://agentmods.dev/badge/skills/cfircoo/claude-code-toolkit/generate-images.svg" alt="Measured on agentmods" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,362 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00043 $0.01362
Opus 5 $0.00022 $0.00681
Sonnet 5 $0.00009 $0.00272
Haiku 4.5 $0.00004 $0.00136

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

Security

Grade B, and why

generate-images scanned grade B with 1 finding 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

- `GEMINI_API_KEY` must be set in `~/.claude/settings.json` under `env`
skills/generate-images/SKILL.md · 141 lines

How it starts

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

<essential_principles>

This skill generates images using the Nano Banana model via ~/.claude/scripts/generate_image.py.

Always use this skill when the user asks to:

  • Generate, create, or make an image
  • Create icons, logos, banners, or visual assets
  • Edit, modify, or transform an existing image
  • Generate mockups, diagrams, or illustrations
  • Create any visual content

Prerequisites:

  • GEMINI_API_KEY must be set in ~/.claude/settings.json under env
  • Script: ~/.claude/scripts/generate_image.py (runs via uv run)

Reference images: Users can store named images in ~/.claude/images/ for use as editing sources. Filenames describe the content (e.g., myself.jpg, company-logo.png, office.jpg).

</essential_principles>

uv run ~/.claude/scripts/generate_image.py --check-key

If API_KEY_MISSING: inform the user they need to set GEMINI_API_KEY in ~/.claude/settings.json or get one at https://aistudio.google.com/apikey

List available reference images:

ls ~/.claude/images/ 2>/dev/null

Matching rules:

  • Match user mentions to filenames (without extension). Examples:
    • "add a hat to myself" → look for myself.jpg, myself.png, etc.
    • "put my dog in a park" → look for my-dog.jpg, dog.jpg, etc.
    • "update the company logo" → look for company-logo.png, logo.png, etc.
  • Match is case-insensitive, try with and without hyphens/underscores
  • If a match is found, use --edit mode with the matched file as source
  • If no match and the user clearly references a personal image, ask them to place it in ~/.claude/images/

Also check the current project for relevant images if the user references project assets:

  • Look in assets/, images/, public/, static/, or project root
  • If user specifies a path, use it
  • If editing a reference image, save to the current project (not back to ~/.claude/images/)
  • If inside a project, use a sensible location (e.g., assets/, images/, public/, or project root)
  • Default filename: descriptive kebab-case with .png extension (e.g., hero-banner.png, app-icon.png)
  • Subject: What to generate (e.g., "a minimalist logo of a rocket")
  • Style: Visual style (e.g., "flat design", "photorealistic", "watercolor", "pixel art")
  • Details: Specific attributes (colors, lighting, composition, mood)
  • Quality: Resolution hints (e.g., "high detail", "4K quality", "professional")

Example prompt structure: [Subject], [style], [details], [quality]

Text-to-image (new image):

uv run ~/.claude/scripts/generate_image.py "prompt here" --output path/to/output.png

Image editing with reference image:

uv run ~/.claude/scripts/generate_image.py "editing instructions" --edit ~/.claude/images/myself.jpg --output path/to/output.png

Image editing with project image:

uv run ~/.claude/scripts/generate_image.py "editing instructions" --edit path/to/source.png --output path/to/output.png

Options:

  • --output PATH - Output file path (default: generated_image.png)
  • --edit IMAGE - Source image for editing mode
  • --json - Output metadata as JSON
  1. Read the output image using the Read tool to verify it was created and looks correct
  2. Report the file path and size to the user
  3. If the result doesn't match expectations, refine the prompt and regenerate

<prompt_examples>

Icon/Logo: "A minimalist app icon for a task management tool, flat design, blue and white color scheme, clean geometric shapes, centered composition, professional quality"

Read the full file on GitHub · 141 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. 4d ago First seen · 141 lines · 43 tokens per session scan B 3f7e41e0ebe0

Subscribe to this mod's changes

generate-images is a skill published in the GitHub repository cfircoo/claude-code-toolkit (17 stars, last pushed 5mo ago), licensed MIT. It adds 43 tokens to every session and 1,362 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). 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

general-video

Author or edit a custom HyperFrames composition when no specialized workflow fits, or when BRIEF.md sets flow: companion. Use for longer or multi-scene pieces, brand and sizzle reels, montages, static loops, static title cards, footage remixes, and freeform builds. Use motion-graphics instead for a short unnarrated…

heygen-com/hyperframes · 92 tokens

html-ppt-hermes-cyber-terminal

OpenDesign + BYOK: choosing and wiring your own model, hands-on — cost, quality, and the routing decision. Built as a decision-grade AI literacy deck for engineers, IT, applied-AI teams.

nexu-io/open-design · 53 tokens

html-ppt-taste-brutalist

16:9 HTML deck in tactical-telemetry / CRT-terminal taste. Deactivated-CRT charcoal slides, white-phosphor monospace, hazard-red accent, scanline overlay, ASCII syntax, density over decoration. Distilled from Leonxlnx/taste-skill brutalist-skill (Tactical Telemetry mode).

nexu-io/open-design · 78 tokens

diagnostic-stem-delivery

Audio production with diagnostic analysis, timecode parsing from documents, and verified export workflow.

HKUDS/OpenSpace · 23 tokens

chengfeng-check-updates

剪辑环境的唯一管理者:就绪检查(skills 是否最新 → Runtime 是否配套)、Skills 更新激活、Runtime 安装与体检。用户说检查更新、安装剪辑环境、装播放器、检查剪辑环境、剪辑环境就绪了吗、配置转录凭证时使用;业务 Skill(剪口播/字幕/画面/导出)第 0 步也引用本 Skill 的就绪检查。不用于剪辑、字幕、画面、导出本身或项目数据迁移。.

Agentchengfeng/chengfeng-videocut-skills · 120 tokens

infographic-template-updater

Update template catalogs and UI prompts after adding new infographic templates (src/templates/.ts), including SKILL.md template list, site gallery template mappings, and the AIPlayground prompt list.

antvis/Infographic · 43 tokens