/image
Generate and edit images using AI. Powered by Nano Banana Pro (Google Gemini image models) with Pollinations.ai and Imagen 4 fallback. Supports text-to-image, image editing, aspect ratios, 2K/4K, and batch generation. Use when generating images, creating visuals, AI art,
$ npx -y skills add anton-abyzov/specweave --skill image --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/image
Context preview
The summary Claude sees to decide when to auto-load this skill.
Generate and edit images using AI. Powered by Nano Banana Pro (Google Gemini image models) with Pollinations.ai and Imagen 4 fallback. Supports text-to-image, image editing, aspect ratios, 2K/4K, and batch generation. Use when generating images, creating visuals, AI art,
SKILL.md
image.SKILL.mddescription: Generate and edit images using AI. Powered by Nano Banana Pro (Google Gemini image models) with Pollinations.ai and Imagen 4 fallback. Supports text-to-image, image editing, aspect ratios, 2K/4K, and batch generation. Use when generating images, creating visuals, AI art, text-to-image, image generation, create picture, make illustration, generate photo, nano banana, edit image, batch images.
version: 1.0.0
allowed-tools: Read, Bash, Glob
context: fork
Image Generation Skill
Generate and edit images from text prompts using AI. Powered by **Nano Banana Pro** (Google Gemini image models — `gemini-3.1-flash-image-preview`, `gemini-2.5-flash-image`, `gemini-3-pro-image-preview`), with Pollinations.ai and Imagen 4 as fallbacks.
> **Note**: If the `nanobanana` skill is available in your session, this skill delegates to it automatically. Otherwise, it uses its own built-in Nano Banana implementation as fallback.
Provider Fallback Chain
Standard Mode (default — optimizes for cost)
Tier 1: Gemini Native (FREE) ─── gemini-3.1-flash-image-preview (Nano Banana 2) ──┐
↓ on error │
gemini-2.5-flash-image ─────────────────────────────────────────────────────┤
↓ on error │
gemini-3-pro-image-preview (Nano Banana Pro) ───────────────────────────────┤
↓ on error │
Tier 2: Pollinations.ai (FREE, no key) ─────────────────────────────────────────────┤
↓ on error │
Tier 3: Imagen 4 (PAID, billing required) ──────────────────────────────────────────┘High-Quality Mode (`--hq` or "high quality" in prompt)
Tier 1: Imagen 4 (PAID, ~$0.04/image) ────────────────────────┐
↓ on error │
Tier 2: gemini-3-pro-image-preview (Nano Banana Pro) ──────────┤
↓ on error │
Tier 3: gemini-3.1-flash-image-preview (Nano Banana 2) ────────┤
↓ on error │
Tier 4: Pollinations.ai (FREE) ────────────────────────────────┘Supported Features
| Feature | Nano Banana 2 | Nano Banana Pro | Pollinations | Imagen 4 | |---------|:---:|:---:|:---:|:---:| | Text-to-image | ✓ | ✓ | ✓ | ✓ | | Image editing | ✓ | ✓ | — | — | | Aspect ratios | ✓ | ✓ | ✓ | ✓ | | 2K/4K output | ✓ | ✓ | — | ✓ | | Search grounding | ✓ | ✓ | — | — | | Batch generation | ✓ | ✓ | ✓ | ✓ |
**Aspect ratios supported**: `1:1`, `2:3`, `3:2`, `3:4`, `4:3`, `4:5`, `5:4`, `9:16`, `16:9`, `21:9`
Workflow
Step 0: Delegate to Nano Banana Skill (if available)
Before running the built-in fallback chain, check if the `nanobanana` skill is available in the current session. If it is, delegate the entire request to it — it provides a richer, dedicated Gemini image generation experience.
**How to check**: Look for `nanobanana` in the available skills list (system-reminder). If present:
1. Invoke `Skill({ skill: "nanobanana" })` with the user's original prompt 2. **Done** — do not continue to Step 1. The `nanobanana` skill handles everything (generation, editing, batch, aspect ratios, 2K/4K).
**When to skip and use built-in chain instead**:
- `nanobanana` skill is NOT listed in available skills
- User explicitly requests Pollinations or Imagen 4
- User says "use fallback" or "don't use nanobanana"
If `nanobanana` is not available, proceed with the built-in chain below.
Step 1: Parse User Request
Extract from the user's prompt:
- **Subject**: What to generate or edit
- **Style**: Photorealistic, illustration, pixel art, etc. (default: photorealistic)
- **Quality**: `standard` or `high`. Detect from: "high quality", "hq", "best quality", "maximum quality", "premium"
- **Resolution**: `standard`, `2K`, or `4K`. Detect from: "2K", "4K", "high-res", "high resolution"
- **Aspect ratio**: Detect from explicit mention (e.g., "16:9", "square", "portrait", "widescreen", "cinematic")
- Common aliases: square→`1:1`, portrait→`9:16`, landscape→`16:9`, widescreen→`21:9`, vertical→`9:16`
- **Input image**: If user provides an image path for editing
- **Output path**: Where to save (default: `./generated-media/`)
- **Count**: How many images (default: 1)
**If user mentions "nano banana"** — they mean this built-in capability. Explain available options and proceed.
**Quality modes**:
- **Standard** (default): Cost-optimized chain (Gemini Flash → Gemini Pro → Pollinations → Imagen 4)
- **High**: Quality-optimized chain (Imagen 4 → Gemini Pro → Gemini Flash → Pollinations). Inform user: "Using high-quality mode — Imagen 4 costs ~$0.04/image."
**Resolution modes**:
- **Standard**: Default model output
- **2K**: Request 2048px detail — instruct via prompt suffix `", ultra detailed, 2048px quality"`
- **4K**: Request maximum quality — instruct via prompt suffix `", maximum quality 4K ultra detailed, sharp text rendering, 3840px"`
Step 2: Prepare Output Directory
mkdir -p ./generated-media
Step 3: Load API Key
# Source .env if it exists
if [ -f .env ]; then
export $(grep -E '^GEMINI_API_KEY=' .env | xargs)
fi
# Check parent dirs (monorepo support)
if [ -z "$GEMINI_API_KEY" ] && [ -f ../.env ]; then
export $(grep -E '^GEMINI_API_KEY=' ../.env | xargs)
fi
# Also load POLLINATIONS_API_KEY if available
if [ -f .env ]; then
export $(grep -E '^POLLINATIONS_API_KEY=' .env | xargs 2>/dev/null) 2>/dev/null || true
fi
Step 4: Set Generation Parameters
TIMESTAMP=$(date +%s)
PROMPT="YOUR_PROMPT_HERE" # The full prompt (with resolution suffix if 2K/4K)
ASPECT_RATIO="1:1" # Set from user request (default: 1:1)
OUTFILE="generated-media/image-${TIMESTAMP}.png"
TMPFILE="/tmp/gemini-img-response-${TIMESTAMP}.json"
INRead more
description: Generate and edit images using AI. Powered by Nano Banana Pro (Google Gemini image models) with Pollinations.ai and Imagen 4 fallback. Supports text-to-image, image editing, aspect ratios, 2K/4K, and batch generation. Use when generating images, creating visuals, AI art, text-to-image, image generation, create picture, make illustration, generate photo, nano banana, edit image, batch images. version: 1.0.0 allowed-tools: Read, Bash, Glob context: fork
Image Generation Skill
Generate and edit images from text prompts using AI. Powered by **Nano Banana Pro** (Google Gemini image models — `gemini-3.1-flash-image-preview`, `gemini-2.5-flash-image`, `gemini-3-pro-image-preview`), with Pollinations.ai and Imagen 4 as fallbacks.
> **Note**: If the `nanobanana` skill is available in your session, this skill delegates to it automatically. Otherwise, it uses its own built-in Nano Banana implementation as fallback.
Provider Fallback Chain
Standard Mode (default — optimizes for cost)
Tier 1: Gemini Native (FREE) ─── gemini-3.1-flash-image-preview (Nano Banana 2) ──┐
↓ on error │
gemini-2.5-flash-image ─────────────────────────────────────────────────────┤
↓ on error │
gemini-3-pro-image-preview (Nano Banana Pro) ───────────────────────────────┤
↓ on error │
Tier 2: Pollinations.ai (FREE, no key) ─────────────────────────────────────────────┤
↓ on error │
Tier 3: Imagen 4 (PAID, billing required) ──────────────────────────────────────────┘High-Quality Mode (`--hq` or "high quality" in prompt)
Tier 1: Imagen 4 (PAID, ~$0.04/image) ────────────────────────┐
↓ on error │
Tier 2: gemini-3-pro-image-preview (Nano Banana Pro) ──────────┤
↓ on error │
Tier 3: gemini-3.1-flash-image-preview (Nano Banana 2) ────────┤
↓ on error │
Tier 4: Pollinations.ai (FREE) ────────────────────────────────┘Supported Features
| Feature | Nano Banana 2 | Nano Banana Pro | Pollinations | Imagen 4 | |---------|:---:|:---:|:---:|:---:| | Text-to-image | ✓ | ✓ | ✓ | ✓ | | Image editing | ✓ | ✓ | — | — | | Aspect ratios | ✓ | ✓ | ✓ | ✓ | | 2K/4K output | ✓ | ✓ | — | ✓ | | Search grounding | ✓ | ✓ | — | — | | Batch generation | ✓ | ✓ | ✓ | ✓ |
**Aspect ratios supported**: `1:1`, `2:3`, `3:2`, `3:4`, `4:3`, `4:5`, `5:4`, `9:16`, `16:9`, `21:9`
Workflow
Step 0: Delegate to Nano Banana Skill (if available)
Before running the built-in fallback chain, check if the `nanobanana` skill is available in the current session. If it is, delegate the entire request to it — it provides a richer, dedicated Gemini image generation experience.
**How to check**: Look for `nanobanana` in the available skills list (system-reminder). If present:
1. Invoke `Skill({ skill: "nanobanana" })` with the user's original prompt 2. **Done** — do not continue to Step 1. The `nanobanana` skill handles everything (generation, editing, batch, aspect ratios, 2K/4K).
**When to skip and use built-in chain instead**:
- `nanobanana` skill is NOT listed in available skills
- User explicitly requests Pollinations or Imagen 4
- User says "use fallback" or "don't use nanobanana"
If `nanobanana` is not available, proceed with the built-in chain below.
Step 1: Parse User Request
Extract from the user's prompt:
- **Subject**: What to generate or edit
- **Style**: Photorealistic, illustration, pixel art, etc. (default: photorealistic)
- **Quality**: `standard` or `high`. Detect from: "high quality", "hq", "best quality", "maximum quality", "premium"
- **Resolution**: `standard`, `2K`, or `4K`. Detect from: "2K", "4K", "high-res", "high resolution"
- **Aspect ratio**: Detect from explicit mention (e.g., "16:9", "square", "portrait", "widescreen", "cinematic")
- Common aliases: square→`1:1`, portrait→`9:16`, landscape→`16:9`, widescreen→`21:9`, vertical→`9:16`
- **Input image**: If user provides an image path for editing
- **Output path**: Where to save (default: `./generated-media/`)
- **Count**: How many images (default: 1)
**If user mentions "nano banana"** — they mean this built-in capability. Explain available options and proceed.
**Quality modes**:
- **Standard** (default): Cost-optimized chain (Gemini Flash → Gemini Pro → Pollinations → Imagen 4)
- **High**: Quality-optimized chain (Imagen 4 → Gemini Pro → Gemini Flash → Pollinations). Inform user: "Using high-quality mode — Imagen 4 costs ~$0.04/image."
**Resolution modes**:
- **Standard**: Default model output
- **2K**: Request 2048px detail — instruct via prompt suffix `", ultra detailed, 2048px quality"`
- **4K**: Request maximum quality — instruct via prompt suffix `", maximum quality 4K ultra detailed, sharp text rendering, 3840px"`
Step 2: Prepare Output Directory
mkdir -p ./generated-media
Step 3: Load API Key
# Source .env if it exists if [ -f .env ]; then export $(grep -E '^GEMINI_API_KEY=' .env | xargs) fi # Check parent dirs (monorepo support) if [ -z "$GEMINI_API_KEY" ] && [ -f ../.env ]; then export $(grep -E '^GEMINI_API_KEY=' ../.env | xargs) fi # Also load POLLINATIONS_API_KEY if available if [ -f .env ]; then export $(grep -E '^POLLINATIONS_API_KEY=' .env | xargs 2>/dev/null) 2>/dev/null || true fi
Step 4: Set Generation Parameters
TIMESTAMP=$(date +%s)
PROMPT="YOUR_PROMPT_HERE" # The full prompt (with resolution suffix if 2K/4K)
ASPECT_RATIO="1:1" # Set from user request (default: 1:1)
OUTFILE="generated-media/image-${TIMESTAMP}.png"
TMPFILE="/tmp/gemini-img-response-${TIMESTAMP}.json"
INSpec-first AI development: describe a feature → AI creates spec + plan + tasks, builds autonomously, syncs to GitHub/JIRA. Domain-expert skills for PM, Architect, Frontend, QA learn your patterns permanently. Claude Code, Codex, Cursor, Copilot & more.
Repo: anton-abyzov/specweave
Other skills on specweave.
- /ado-mapper
Bidirectional conversion between SpecWeave increments and Azure DevOps work items. Use when exporting increments to ADO epics, importing ADO epics as increments, or resolving sync conflicts. Handles Epic/Feature/User Story/Task hierarchy mapping.
Open skill - /ado-multi-project
[DEPRECATED] Use `sw:multi-project --tool ado` instead. Organizes specs and tasks across multiple Azure DevOps projects. This skill will be removed in SpecWeave v1.3.0.
Open skill - /ado-resource-validator
Validates Azure DevOps projects, area paths, and teams exist with auto-creation of missing resources. Use when setting up ADO integration, configuring .env variables, or troubleshooting missing project errors. Supports project-per-team, area-path-based, and team-based strategies.
Open skill - /ado-sync
[DEPRECATED] Help and guidance for Azure DevOps synchronization with SpecWeave increments. Use when asking how to set up ADO sync, configure credentials, or troubleshoot integration issues. For actual syncing, use sw-ado:push or sw-ado:pull command.
Open skill - /analytics
Analytics and metrics for SpecWeave usage — token consumption, cache efficiency, agent spawn counts.
Open skill - /architect
System architect for scalable technical designs and ADRs. Use for system architecture, microservices, database design, trade-off analysis, component diagrams, tech selection.
Open skill

