Back to list
Kotrotsos

nanobanana

by Kotrotsos

0🍴 0📅 Dec 31, 2025

SKILL.md


name: nanobanana description: Generate and edit images using Google Gemini API (Nano Banana). Use when the user wants to create images, edit photos, generate illustrations for articles, or create visual content. Trigger phrases include "generate an image", "create a picture", "make an illustration", "edit this photo", or when visual content is needed for a project.

Nanobanana: Gemini Image Generation

Overview

Nanobanana is a CLI tool for generating and editing images using Google's Gemini API. It supports text-to-image generation, image editing with reference images, and various aspect ratios and sizes.

Requirements

  • Python 3.10+
  • google-genai package
  • Pillow package
  • GEMINI_API_KEY or GOOGLE_API_KEY environment variable

Installation

# Install dependencies
pip install google-genai Pillow

# The CLI is located at:
# ~/.claude/skills/nanobanana/scripts/nanobanana.py

Basic Usage

# Generate an image from text
nanobanana "A cat wearing a top hat in a library"

# Edit an existing image
nanobanana "Make this look like a watercolor painting" -i photo.jpg

# Specify output location
nanobanana "A sunset over mountains" -o images/sunset.png

# Use specific aspect ratio and size
nanobanana "A panoramic landscape" --aspect-ratio 16:9 --size 4K

CLI Options

OptionShortDescription
promptText prompt for image generation (required)
--input-iInput image(s) for editing (can repeat, max 14)
--output-oOutput path (file or directory)
--aspect-ratio-aAspect ratio (default: 1:1)
--size-sImage size: 1K, 2K, 4K (default: 2K)
--model-mModel: flash (fast) or pro (quality, default)
--verbose-vVerbose output

Aspect Ratios

Available ratios: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9

Models

  • pro (default): gemini-3-pro-image-preview - Higher quality, better for professional use
  • flash: gemini-2.5-flash-image - Faster, good for quick iterations

Examples for Articles

Generate a hero image

nanobanana "A person sitting alone on a park bench at dusk, contemplative mood, soft lighting, editorial photography style" --aspect-ratio 16:9 --size 4K -o article_hero.png

Create an illustration

nanobanana "Abstract illustration of a brain with colorful neural connections, modern flat design, clean lines" --aspect-ratio 3:2 -o brain_illustration.png

Edit a photo for an article

nanobanana "Convert this photo to a stylized illustration suitable for a magazine article" -i original_photo.jpg -o stylized.png

Combine multiple reference images

nanobanana "Create a composite image showing these tools working together" -i tool1.png -i tool2.png -i tool3.png -o tools_composite.png

Integration with Other Skills

Other skills can invoke nanobanana by running:

python /Users/marcokotrotsos/.claude/skills/nanobanana/scripts/nanobanana.py "prompt" [options]

Or if added to PATH:

nanobanana "prompt" [options]

Python API (for scripts)

import sys
sys.path.insert(0, "/Users/marcokotrotsos/.claude/skills/nanobanana/scripts")
from nanobanana import generate_image

# Generate an image
output_path = generate_image(
    prompt="A futuristic cityscape",
    input_images=None,          # Optional: list of image paths
    output="output.png",        # Optional: output path
    aspect_ratio="16:9",        # Optional: aspect ratio
    size="2K",                  # Optional: 1K, 2K, 4K
    model="pro",                # Optional: pro or flash
    verbose=True                # Optional: show progress
)

Best Practices for Prompts

  1. Be descriptive: Use detailed narratives rather than keyword lists
  2. Specify style: Include artistic style, lighting, mood
  3. Consider composition: Mention framing, perspective, focal points
  4. For articles: Include "editorial", "magazine quality", or "professional photography" for polished results

Limitations

  • Maximum 14 reference images (6 objects + 5 humans recommended)
  • All generated images include invisible SynthID watermarks
  • Some content restrictions apply (no harmful, explicit, or copyrighted content)

Troubleshooting

No API key found

export GEMINI_API_KEY="your-api-key-here"

Package not installed

pip install google-genai Pillow

Image not generated

  • Check prompt for restricted content
  • Try a simpler prompt
  • Use --verbose flag for more details

Score

Total Score

40/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon