| name | nano-banana-pro |
| description | Generate, edit, or compose images using Nano Banana Pro (Gemini 3 Pro Image) via Google AI Studio / Vertex AI. Use when the user asks to create an image, generate a picture, edit a photo, make a visual, create a mockup, or do anything involving image generation. |
| argument-hint | ["prompt or \"edit <path> <instructions>\" or \"compose <ref1> <ref2> ... <prompt>\""] |
| allowed-tools | Bash(python *), Read, Write, Glob |
Nano Banana Pro - Image Generation Skill
Generate, edit, and compose images using Nano Banana Pro (Gemini 3 Pro Image) through Google AI Studio or Vertex AI.
How to use
Run the nano_banana.py script located in the project root. All commands output PNG files.
Generate an image from a text prompt
python nano_banana.py generate --prompt "A photograph of a rustic wooden cabin nestled among tall pine trees beside a calm mountain lake at golden hour, with warm light reflecting off the water and mist rising from the surface" --output output/cabin.png --aspect-ratio 16:9
Options:
--prompt / -p (required): Detailed narrative image description
--output / -o (default: output/generated.png): Output file path
--resolution / -r: 1K, 2K (default, $0.15), or 4K ($0.24)
--temperature / -t: 0.0-2.0 (default 1.0). Lower = more predictable, higher = more creative
--aspect-ratio / -a: Output aspect ratio. Choices: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9
Edit an existing image
python nano_banana.py edit --input output/cabin.png --prompt "Transform the sky into a dramatic aurora borealis with green and purple curtains of light reflecting in the lake" --output output/cabin_aurora.png
Options:
--input / -i (required): Path to source image
--prompt / -p (required): Natural language edit instructions
--output / -o (default: output/edited.png): Output file path
--temperature / -t: 0.0-2.0 (default 1.0)
--aspect-ratio / -a: Optional output aspect ratio
Compose from multiple reference images
Use this for character consistency, style transfer, or combining elements from multiple sources. Supports up to 14 reference images.
python nano_banana.py compose --refs character_front.jpg character_side.jpg --prompt "Generate the same character walking through a neon-lit cyberpunk street at night. Preserve their exact appearance, clothing, and features. Rain-slicked pavement reflecting colorful signage." --output output/scene.png --aspect-ratio 16:9
Options:
--refs / -R (required): Space-separated paths to reference images
--prompt / -p (required): Composition instructions
--output / -o (default: output/composed.png): Output file path
--temperature / -t: 0.0-2.0 (default 1.0)
--aspect-ratio / -a: Optional output aspect ratio
Handling arguments from /nano-banana-pro invocation
When the user invokes this skill with /nano-banana-pro, parse $ARGUMENTS to determine intent:
- If it starts with "edit": extract the input path and edit instructions, run the
edit command
- If it starts with "compose": extract reference paths and prompt, run the
compose command
- Otherwise: treat the entire argument as a generation prompt, run the
generate command
If no arguments are provided, ask the user what they'd like to generate.
Prompt engineering best practices (from official Gemini docs)
Write narrative descriptions, NOT keyword lists
BAD (keyword list):
cat, cute, fluffy, orange tabby, sunlight, window, cozy, warm colors, soft focus
GOOD (narrative description):
A fluffy orange tabby cat lounging lazily on a sun-drenched windowsill. Warm afternoon light streams through sheer curtains, casting soft shadows across the cat's fur. The scene feels cozy and peaceful, with a slightly shallow depth of field drawing focus to the cat's contented expression.
Use photography/art terminology for photorealistic results
Include terms like: aperture, bokeh, focal length, exposure, ISO, golden hour, rim lighting, volumetric light, depth of field, macro, wide-angle, telephoto, chiaroscuro.
Be specific about text rendering
For any text in images, explicitly describe:
- The exact text content in quotes
- Font style (sans-serif, serif, bold, italic, condensed)
- Size relative to the image
- Color and contrast against background
- Exact placement position
Use aspect ratio flag instead of prompt text
Instead of writing "16:9 aspect ratio" in the prompt, use the --aspect-ratio 16:9 CLI flag. This uses the native ImageConfig API parameter which is more reliable.
Prompt structure for complex scenes
1. Overall scene/format description
2. Main subject with specific details
3. Background/environment
4. Lighting and mood
5. Style and quality descriptors
What the model handles well
- Photorealistic scenes with natural lighting
- Text rendering (when explicitly described)
- Style transfer and artistic interpretations
- Multi-image composition for character consistency
- Product photography and studio setups
What to avoid in prompts
- Keyword spam — write flowing sentences instead
- Contradictory instructions (e.g., "dark and bright")
- Overly vague descriptions ("something cool")
- Words like "print", "poster on wall", "mockup", "mounted", "framed" — model renders a photo OF the image instead of the image itself
Environment
The script auto-loads .env from the project root. It prefers Google AI Studio (API key), falling back to Vertex AI:
Google AI Studio (recommended):
GOOGLE_API_KEY — API key from aistudio.google.com
Vertex AI (fallback):
GOOGLE_CLOUD_PROJECT — Google Cloud project ID
GOOGLE_CLOUD_LOCATION — Region (must be global for this model)
- Authentication via
gcloud auth application-default login
Cost awareness
- 1K resolution: Cheapest option for quick tests
- 2K resolution: ~$0.15 per image (use for drafts and iterations)
- 4K resolution: ~$0.24 per image (use for final output)
- Default to 2K unless the user specifically requests 4K or high resolution