gemini-nano-banana-tool
# Gemini Nano Banana Tool Skill
What this skill does
# Gemini Nano Banana Tool Skill
Professional CLI for Google Gemini image generation with AI-powered prompt optimization, cost tracking, and multi-turn conversations.
## Quick Reference
```bash
# AI prompt optimization
gemini-nano-banana-tool promptgen "simple description"
# Generate image (both commands work)
gemini-nano-banana-tool generate "detailed prompt" -o output.png
gemini-nano-banana-tool generate-image "detailed prompt" -o output.png
# Multi-turn refinement
gemini-nano-banana-tool generate-conversation "prompt" -o output.png -f conv.json
# Discovery
gemini-nano-banana-tool list-models
gemini-nano-banana-tool list-aspect-ratios
```
## Core Capabilities
### 1. AI Prompt Generation
Transform simple descriptions into detailed, optimized prompts:
```bash
# Basic usage
gemini-nano-banana-tool promptgen "wizard cat"
# With template for specialized prompts
gemini-nano-banana-tool promptgen "wizard cat" --template character
# Pipeline: optimize then generate
gemini-nano-banana-tool promptgen "cyberpunk city" --template scene | \
gemini-nano-banana-tool generate -o city.png --stdin -a 16:9
```
**Available Templates**:
- `photography` - Technical camera details, lighting
- `character` - Pose, attire, expression
- `scene` - Foreground/midground/background
- `food` - Plating, garnish, lighting
- `abstract` - Shapes, colors, patterns
- `logo` - Typography, symbolism
### 2. Text-to-Image Generation
Generate images from prompts with flexible input (use `generate` or `generate-image` interchangeably):
```bash
# From positional argument (both commands work)
gemini-nano-banana-tool generate "A cat wearing a wizard hat" -o cat.png
gemini-nano-banana-tool generate-image "A cat wearing a wizard hat" -o cat.png
# From file
gemini-nano-banana-tool generate -f prompt.txt -o output.png
# From stdin (piping)
echo "Beautiful sunset" | gemini-nano-banana-tool generate -o sunset.png -s
```
### 3. Image Editing with References
Edit existing images using natural language:
```bash
# Single reference
gemini-nano-banana-tool generate "Add a birthday hat" -o edited.png -i photo.jpg
# Multiple references (up to 3 for Flash, 14 for Pro)
gemini-nano-banana-tool generate "Combine these elements" -o result.png \
-i ref1.jpg -i ref2.jpg -i ref3.jpg
```
### 4. Multi-Turn Conversations
Progressive image refinement across multiple turns:
```bash
# Turn 1: Initial image
gemini-nano-banana-tool generate-conversation \
"Modern living room with large windows" \
-o room-v1.png -f interior.json -a 16:9
# Turn 2: Add furniture (previous image auto-referenced)
gemini-nano-banana-tool generate-conversation \
"Add gray sofa and wooden coffee table" \
-o room-v2.png -f interior.json
# Turn 3: Adjust lighting
gemini-nano-banana-tool generate-conversation \
"Make lighting warmer, add floor lamp" \
-o room-v3.png -f interior.json
```
### 5. Aspect Ratios
10 supported aspect ratios for different platforms:
```bash
# Square (Instagram post)
gemini-nano-banana-tool generate "Design" -o square.png -a 1:1
# Widescreen (YouTube thumbnail)
gemini-nano-banana-tool generate "Scene" -o wide.png -a 16:9
# Vertical (Instagram story)
gemini-nano-banana-tool generate "Portrait" -o vertical.png -a 9:16
# Cinematic (ultra-wide)
gemini-nano-banana-tool generate "Panorama" -o cinema.png -a 21:9
```
**All Ratios**: 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 21:9, 4:5, 5:4
### 6. Model Selection
Choose between Flash (fast, cost-effective) and Pro (high quality):
```bash
# Flash model (default) - Fast, cost-effective
gemini-nano-banana-tool generate "Prompt" -o output.png
# Pro model - Higher quality
gemini-nano-banana-tool generate "Prompt" -o output.png \
-m gemini-3-pro-image-preview
# Pro with 4K resolution - Maximum quality
gemini-nano-banana-tool generate "Prompt" -o output.png \
-m gemini-3-pro-image-preview -r 4K
```
### 7. Cost Tracking
Automatic cost calculation based on actual token usage:
```json
{
"output_path": "output.png",
"model": "gemini-2.5-flash-image",
"token_count": 1295,
"estimated_cost_usd": 0.0389,
"resolution": "1344x768"
}
```
**Typical Costs**:
- Flash: ~$0.039 per image
- Pro 1K/2K: ~$0.134 per image
- Pro 4K: ~$0.24 per image
### 8. Verbosity Levels
Multi-level logging for debugging:
```bash
# Normal (warnings only)
gemini-nano-banana-tool generate "test" -o output.png
# Info (-v) - High-level operations
gemini-nano-banana-tool generate "test" -o output.png -v
# Debug (-vv) - Detailed validation
gemini-nano-banana-tool generate "test" -o output.png -vv
# Trace (-vvv) - Full HTTP logs
gemini-nano-banana-tool generate "test" -o output.png -vvv
```
## Authentication
### Gemini Developer API (Recommended)
```bash
export GEMINI_API_KEY='your-api-key'
```
Get API key: https://aistudio.google.com/app/apikey
### Vertex AI (Enterprise)
```bash
export GOOGLE_GENAI_USE_VERTEXAI=true
export GOOGLE_CLOUD_PROJECT='your-project-id'
export GOOGLE_CLOUD_LOCATION='us-central1'
# Authenticate
gcloud auth application-default login
```
## Common Workflows
### Workflow 1: Quick Generation
```bash
# Optimize prompt and generate in one pipeline
gemini-nano-banana-tool promptgen "wizard in magical library" | \
gemini-nano-banana-tool generate -o wizard.png -s -a 16:9
```
### Workflow 2: Batch Processing
```bash
# Generate multiple variations
for style in "photorealistic" "artistic" "minimalist"; do
gemini-nano-banana-tool generate \
"A cat in $style style" \
-o "cat-$style.png" \
-a 1:1
done
```
### Workflow 3: Progressive Refinement
```bash
# Generate base image
gemini-nano-banana-tool generate "Product photo of headphones" \
-o product-v1.png -a 1:1
# Refine with conversation mode
gemini-nano-banana-tool generate-conversation \
"Rotate to show left side" \
-o product-v2.png -f product.json
gemini-nano-banana-tool generate-conversation \
"Change background to dark gradient" \
-o product-v3.png -f product.json
```
### Workflow 4: Template-Based Generation
```bash
# Generate food photography
gemini-nano-banana-tool promptgen "pasta carbonara" --template food \
-o pasta-prompt.txt
# Use saved prompt
gemini-nano-banana-tool generate -f pasta-prompt.txt \
-o pasta.png -a 4:3
# Generate character design
gemini-nano-banana-tool promptgen "space explorer" --template character | \
gemini-nano-banana-tool generate -o explorer.png -s -a 2:3
```
## Use Cases
### Content Creation
- Social media posts and stories
- Marketing materials and ads
- Blog post illustrations
- YouTube thumbnails
### E-commerce
- Product photography variations
- Lifestyle product shots
- Fashion combinations
- Product on model composites
### Design & Prototyping
- Concept art exploration
- UI/UX mockups
- Logo design iterations
- Brand visual exploration
### Professional Assets
- High-quality 4K renders
- Professional photography
- Print-ready materials
- Commercial content
## Output Format
All commands return structured JSON:
```json
{
"output_path": "output.png",
"model": "gemini-2.5-flash-image",
"aspect_ratio": "16:9",
"resolution": "1344x768",
"resolution_quality": "1K",
"reference_image_count": 0,
"token_count": 1295,
"estimated_cost_usd": 0.0389,
"metadata": {
"finish_reason": "STOP",
"safety_ratings": null
}
}
```
## Error Handling
The tool provides actionable error messages:
```bash
# Missing API key
Error: API key required. Set GEMINI_API_KEY or use --api-key option.
Get API key from https://aistudio.google.com/app/apikey
# Too many reference images
Error: Maximum 3 reference images allowed (Flash model).
Use Pro model for up to 14 reference images.
# Invalid aspect ratio
Error: Invalid aspect ratio '16:10'.
Use 'gemini-nano-banana-tool list-aspect-ratios' to see supported ratios.
```
## Shell Completion
Enable tab completion for faster usage:
```bash
# Bash
eval "$(gemini-nano-banana-tool completion bash)"
# Zsh
eval "$(gemini-nano-banana-tool completion zsh)"
# Fish
Related in Image & Video
watch
IncludedWatch a video (URL or local path). Downloads with yt-dlp, extracts auto-scaled frames with ffmpeg, pulls the transcript from captions (or Whisper API fallback), and hands the result to Claude so it can answer questions about what's in the video.
physical-ai-defect-image-generation
IncludedUse when the user wants to orchestrate defect image generation, run associated setup, or handle outputs on OSMO. The Day 0 path handles cold-start with USD-to-ROI, image-edit augmentation, and AnomalyGen to create initial PCBA datasets. The Day 1 path performs inference and labeling on real images. This skill helps with first-time asset setup, creation of finetuning checkpoints, and configuring deployment. Trigger keywords: defect image generation, dig workflow, dig pipeline, defect image detection workflow, aoi pipeline, aoi anomalygen, usd2roi anomalygen, day 0 pcba, day 1 pcba, day 1 real-photo alignment, day 1 manual roi, metal surface anomaly, glass defect, anomalygen finetune, setup_pcb, setup_metal, setup_glass, setup_pretrained, dig setup, dig datasets, dig pretrained checkpoint, dig image-edit endpoint.
accelint-react-best-practices
IncludedReact performance optimization and best practices. ALWAYS use this skill when working with any React code - writing components, hooks, JSX; refactoring; optimizing re-renders, memoization, state management; reviewing for performance; fixing hydration mismatches; debugging infinite re-renders, stale closures, input focus loss, animations restarting; preventing remounting; implementing transitions, lazy initialization, effect dependencies. Even simple React tasks benefit from these patterns. Covers React 19+ (useEffectEvent, Activity, ref props). Triggers - useEffect, useState, useMemo, useCallback, memo, inline components, nested components, components inside components, re-render, performance, hydration, SSR, Next.js, useDeferredValue, combined hooks.
elevenlabs-agents
IncludedBuild conversational AI voice agents with ElevenLabs Platform using React, JavaScript, React Native, or Swift SDKs. Configure agents, tools (client/server/MCP), RAG knowledge bases, multi-voice, and Scribe real-time STT. Use when: building voice chat interfaces, implementing AI phone agents with Twilio, configuring agent workflows or tools, adding RAG knowledge bases, testing with CLI "agents as code", or troubleshooting deprecated @11labs packages, Android audio cutoff, CSP violations, dynamic variables, or WebRTC config. Keywords: ElevenLabs Agents, ElevenLabs voice agents, AI voice agents, conversational AI, @elevenlabs/react, @elevenlabs/client, @elevenlabs/react-native, @elevenlabs/elevenlabs-js, @elevenlabs/agents-cli, elevenlabs SDK, voice AI, TTS, text-to-speech, ASR, speech recognition, turn-taking model, WebRTC voice, WebSocket voice, ElevenLabs conversation, agent system prompt, agent tools, agent knowledge base, RAG voice agents, multi-voice agents, pronunciation dictionary, voice speed control, elevenlabs scribe, @11labs deprecated, Android audio cutoff, CSP violation elevenlabs, dynamic variables elevenlabs, case-sensitive tool names, webhook authentication
humanizer
IncludedHumanize AI-generated text by detecting and removing patterns typical of LLM output. Rewrites text to sound natural, specific, and human. Uses 28 pattern detectors, 560+ AI vocabulary terms across 3 tiers, and statistical analysis (burstiness, type-token ratio, readability) for comprehensive detection. Use when asked to humanize text, de-AI writing, make content sound more natural/human, review writing for AI patterns, score text for AI detection, or improve AI-generated drafts. Covers content, language, style, communication, and filler categories.
generating-mermaid-diagrams
IncludedSalesforce architecture diagrams using Mermaid with ASCII fallback. Use this skill when generating text-based diagrams for Salesforce architecture, OAuth flows, ERDs, integration sequences, or Agentforce structure. TRIGGER when: user says "diagram", "visualize", "ERD", or asks for sequence diagrams, flowcharts, class diagrams, or architecture visualizations in Mermaid. DO NOT TRIGGER when: user wants PNG/SVG image output (use generating-visual-diagrams), or asks about non-Salesforce systems.