GE

generate-images

Creates and modifies images, diagrams, and mockups using Google Gemini.

Install

mkdir -p .claude/skills/generate-images && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/14334" && unzip -o skill.zip -d .claude/skills/generate-images && rm skill.zip

Installs to .claude/skills/generate-images

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Generate and edit images using Nano Banana (Google Gemini image generation). Use whenever Claude Code needs to create new images, edit existing images, generate icons, diagrams, mockups, or any visual content.
209 charsno explicit “when” trigger
Beginner

Key capabilities

  • Generate new images using the Nano Banana model
  • Edit existing images based on user instructions
  • Identify and use reference images from a local directory
  • Determine appropriate output paths for generated images
  • Craft effective image prompts with subject, style, and details

How it works

The skill uses a Python script to generate or edit images via the Nano Banana model, checking for an API key, matching reference images, and crafting prompts. It then executes the generation script and verifies the output.

Inputs & outputs

You give it
a request to generate or edit an image, potentially with a reference image
You get back
a generated or edited image file

When to use generate-images

  • Editing existing design assets
  • Creating custom icons
  • Generating visual diagrams

About this skill

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

<process> <step name="1_check_api_key"> Before generating, verify the API key is available:
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 </step>

<step name="2_match_reference_images"> Check if the user's request refers to a known reference image.

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 </step>
<step name="3_determine_output_path"> Choose an appropriate output path based on context:
  • 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) </step>
<step name="4_craft_prompt"> Write an effective image prompt. Good prompts include:
  • 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] </step>

<step name="5_generate"> Run the generation script:

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 </step>
<step name="6_verify"> After generation:
  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 </step>
</process>

<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"

Banner/Hero: "Wide panoramic banner for a tech blog, abstract gradient background in purple and teal, modern typography space on the left, subtle geometric patterns, professional web design"

Edit with reference image: User says: "add a clown hat to myself" → Match myself.jpg in ~/.claude/images/ → Run: uv run ~/.claude/scripts/generate_image.py "Add a colorful clown hat to the person in this photo" --edit ~/.claude/images/myself.jpg --output clown-hat-myself.png

Edit with reference image: User says: "put my dog on a beach" → Match dog.jpg or my-dog.jpg in ~/.claude/images/ → Run: uv run ~/.claude/scripts/generate_image.py "Place the dog on a tropical beach with waves and sunset" --edit ~/.claude/images/dog.jpg --output dog-on-beach.png

</prompt_examples>

<success_criteria> Image generation is complete when:

  • API key check passes
  • Reference images matched when applicable
  • Image is saved to the specified output path
  • Output image has been visually verified via Read tool
  • User is informed of the file location </success_criteria>

When not to use it

  • When the task does not involve image generation or editing
  • When the user does not have a `GEMINI_API_KEY` configured

Prerequisites

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

Limitations

  • Requires `GEMINI_API_KEY` to be set
  • Relies on the `generate_image.py` script
  • Image generation is limited to the Nano Banana model

How it compares

This skill integrates local reference images and a specific Python script for image generation and editing, offering a more tailored workflow than generic image generation tools.

Compared to similar skills

generate-images side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
generate-images (this skill)05moReviewBeginner
drawio-diagrams-enhanced1,3209moReviewIntermediate
svg-precision5274moReviewIntermediate
infographic-creation1203moReviewBeginner

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

1,3201,999

svg-precision

dkyazzentwatwa

Deterministic SVG generation, validation, and rendering. Use for icons, diagrams, charts, UI mockups, or technical drawings requiring structural correctness and cross-viewer compatibility.

5271,229

infographic-creation

antvis

Create beautiful infographics based on the given text content. Use this when users request creating infographics.

120358

draw-io

davila7

draw.io diagram creation, editing, and review. Use for .drawio XML editing, PNG conversion, layout adjustment, and AWS icon usage.

41204

jimeng-mcp-skill

wwwzhouhui

使用jimeng-mcp-server进行AI图像和视频生成。当用户请求从文本生成图像、合成多张图片、从文本描述创建视频或为静态图像添加动画时使用此技能。支持四大核心能力:文生图、图像合成、文生视频、图生视频。需要jimeng-mcp-server在本地运行或通过SSE/HTTP访问。

19158

cisco-network-diagram

neuro-synapse

Generate Draw.io network topology diagrams from Cisco router and switch configurations. Use when asked to visualize network topology, create network diagrams, map network infrastructure, or generate visual representations from Cisco device configs. Supports parsing show commands, configuration files, CDP/LLDP neighbor data, and routing protocol information to automatically create professional network diagrams.

8155

Search skills

Search the agent skills registry