← スキル一覧に戻る

nanobanana
by Kotrotsos
⭐ 0🍴 0📅 2025年12月31日
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-genaipackagePillowpackageGEMINI_API_KEYorGOOGLE_API_KEYenvironment 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
| Option | Short | Description |
|---|---|---|
prompt | Text prompt for image generation (required) | |
--input | -i | Input image(s) for editing (can repeat, max 14) |
--output | -o | Output path (file or directory) |
--aspect-ratio | -a | Aspect ratio (default: 1:1) |
--size | -s | Image size: 1K, 2K, 4K (default: 2K) |
--model | -m | Model: flash (fast) or pro (quality, default) |
--verbose | -v | Verbose 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
- Be descriptive: Use detailed narratives rather than keyword lists
- Specify style: Include artistic style, lighting, mood
- Consider composition: Mention framing, perspective, focal points
- 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
--verboseflag for more details
スコア
総合スコア
40/100
リポジトリの品質指標に基づく評価
✓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
レビュー
💬
レビュー機能は近日公開予定です