How this skill is triggered — by the user, by Claude, or both
Slash command
/tools:generate-imageThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Shared image generation skill. Two surfaces: natural language (Claude runs inline code)
Shared image generation skill. Two surfaces: natural language (Claude runs inline code) and script (deterministic CLI for other skills).
| Nickname | Model ID | When to use |
|---|---|---|
| nano banana 2 | gemini-3.1-flash-image-preview | Default — always use this unless explicitly asked for pro |
| nano banana pro | gemini-3-pro-image-preview | Only when user explicitly says "pro", "higher quality", or "nano banana pro" |
"Nano banana 2" and "nano banana pro" are shorthand nicknames for these models. If the user says "nano banana", default to nano banana 2 (Flash).
Never use gemini-2.5-flash-image or any gemini-2.x / gemini-1.x image model.
Use when: contextual decisions needed, multi-turn generation, prompt refinement required.
from google import genai
from google.genai import types
client = genai.Client() # reads GEMINI_API_KEY from env
response = client.models.generate_content(
model="gemini-3.1-flash-image-preview",
contents=["Your prompt here"],
config=types.GenerateContentConfig(
response_modalities=["IMAGE"], # or ["TEXT", "IMAGE"]
image_config=types.ImageConfig(
aspect_ratio="16:9", # optional
image_size="2K" # optional
),
)
)
for part in response.parts:
if part.thought:
continue
elif part.inline_data is not None:
part.as_image().save("output.png")
elif part.text:
print(part.text)
python ~/.claude/skills/generate-image/scripts/generate.py \
--prompt "..." \
[--model gemini-3.1-flash-image-preview] \
[--aspect-ratio 16:9] \
[--size 2K] \
[--modalities IMAGE] \
[--thinking minimal] \
[--google-search] \
[--image-search] \
[--input-image /path/to/source.png] \
[--output ./output.png] \
[--output-dir ./images]
Output: JSON to stdout — { "path": "...", "text": "...", "model": "...", "usage": {...} }
Errors: message to stderr + exit code 1
| Flag | Values | Default |
|---|---|---|
--model | gemini-3.1-flash-image-preview, gemini-3-pro-image-preview | gemini-3.1-flash-image-preview |
--aspect-ratio | 1:1, 16:9, 9:16, 4:3, 3:4, 2:3, 3:2, 21:9, 4:5, 5:4, 1:4, 4:1, 1:8, 8:1 | model default |
--size | 512, 1K, 2K, 4K | 1K |
--modalities | IMAGE, TEXT,IMAGE | IMAGE |
--thinking | minimal, High | minimal |
--google-search | flag | off |
--image-search | flag — Flash model only | off |
--input-image | file path | none (text-to-image mode) |
--output | file path | ./gemini-image-{timestamp}.png |
--output-dir | directory | current directory |
$CLAUDE_SKILL_DIR/PARAMS.md$CLAUDE_SKILL_DIR/EXAMPLES.mdgoogle-genai>=1.55.0
Pillow>=10.0.0
npx claudepluginhub nawwwal/dex --plugin toolsGenerates or edits images using Google Gemini API via nanobanana Python script. Supports prompts, aspect ratios, resolutions up to 4K, models like gemini-3.1-flash-image-preview, and image inputs for editing.
Generates or edits images using Google Gemini API via nanobanana.py Python script. Supports prompts, aspect ratios like 9:16, models such as gemini-3.1-flash, and resolutions up to 4K.
Generates images from text prompts using Google's Nano Banana Pro (Gemini image model). Supports custom aspect ratios, resolutions (1K-4K), and up to 5 reference images for style/subject consistency.