โ† Back to list
flight505

image

by flight505

๐ŸŒ AI-powered image and diagram generation for Claude Code using Nano Banana Pro

โญ 2๐Ÿด 0๐Ÿ“… Jan 24, 2026

SKILL.md


name: image description: "Generate and edit images using AI models via OpenRouter. Supports Nano Banana Pro (Gemini 3 Pro Image), FLUX, and other image generation models." allowed-tools: [Read, Write, Edit, Bash]

Nano Banana - Image Generation

Overview

Generate and edit images using state-of-the-art AI models. Perfect for creating visual assets, concept art, illustrations, and editing existing images.

Key Features:

  • ๐ŸŽจ Multiple Models: Gemini 3 Pro Image, FLUX Pro, and more
  • โœ๏ธ Image Editing: Modify existing images with natural language
  • ๐Ÿš€ Simple API: One command to generate or edit
  • ๐Ÿ’พ Automatic Saving: Handles file formats automatically

When to Use This Skill

Use this skill when you need:

  • Visual Assets: Icons, illustrations, backgrounds
  • Concept Art: Ideas and visual explorations
  • Marketing Materials: Product mockups, social media images
  • Photo Editing: Modify existing images with AI
  • Creative Content: Artistic images, abstract visuals
  • Presentation Graphics: Visuals for slides and documents

Note: For technical diagrams (architecture, flowcharts, ERD), use the diagram skill insteadโ€”it includes quality review and iteration.

Quick Start

# Generate a new image
python skills/image/scripts/generate_image.py "A beautiful sunset over mountains with orange and purple sky" -o sunset.png

# Edit an existing image
python skills/image/scripts/generate_image.py "Make the sky more dramatic with storm clouds" --input sunset.png -o dramatic_sunset.png

# Use a specific model
python skills/image/scripts/generate_image.py "Abstract geometric art in blue and gold" -m "black-forest-labs/flux.2-pro" -o abstract.png

Available Models

ModelIDCapabilitiesBest For
Gemini 3 Pro Imagegoogle/gemini-3-pro-image-previewGeneration + EditingHigh quality, versatile
FLUX Problack-forest-labs/flux.2-proGeneration + EditingFast, artistic
FLUX Flexblack-forest-labs/flux.2-flexGeneration onlyDevelopment/testing

Usage Examples

Generate New Images

# Photorealistic
python generate_image.py "Professional headshot of a business executive in modern office setting" -o headshot.png

# Artistic
python generate_image.py "Watercolor painting of a cozy coffee shop on a rainy day" -o coffee_shop.png

# Abstract
python generate_image.py "Abstract visualization of data flowing through neural networks, blue and cyan colors" -o neural_flow.png

# Product
python generate_image.py "Modern minimalist logo for a tech startup called 'Nexus', clean geometric design" -o logo.png

Edit Existing Images

# Change colors
python generate_image.py "Change the car color to red" --input car.jpg -o red_car.png

# Add elements
python generate_image.py "Add a rainbow in the sky" --input landscape.jpg -o rainbow_landscape.png

# Remove elements
python generate_image.py "Remove the person from the background" --input photo.jpg -o clean_photo.png

# Style transfer
python generate_image.py "Make this look like a watercolor painting" --input photo.jpg -o watercolor.png

Specify Output Format

# PNG (default, best for graphics with transparency)
python generate_image.py "Icon of a rocket ship" -o rocket.png

# Output to specific directory
python generate_image.py "Banner image" -o assets/images/banner.png

Configuration

export OPENROUTER_API_KEY='your_api_key_here'

.env File

Create a .env file in your project:

OPENROUTER_API_KEY=your_api_key_here

Get Your API Key

  1. Go to https://openrouter.ai/keys
  2. Create a new API key
  3. Add credits to your account

Python API

from skills.image.scripts.generate_image import generate_image

# Generate new image
result = generate_image(
    prompt="A futuristic city at night with neon lights",
    output_path="city.png",
    model="google/gemini-3-pro-image-preview"
)

# Edit existing image
result = generate_image(
    prompt="Add flying cars to the scene",
    output_path="city_with_cars.png",
    input_image="city.png"
)

Tips for Better Images

Be Descriptive

# โŒ Too vague
"A dog"

# โœ… Detailed
"A golden retriever puppy playing in autumn leaves, warm afternoon sunlight, shallow depth of field, professional pet photography"

Include Style

# โœ… Specify artistic style
"A mountain landscape in the style of traditional Japanese ink painting, minimalist, black and white with subtle gray tones"

Specify Composition

# โœ… Include framing
"Close-up portrait of an owl, centered composition, soft studio lighting, dark background, sharp focus on the eyes"

For Editing, Be Specific

# โŒ Vague edit
"Make it better"

# โœ… Specific edit
"Increase the contrast, make the colors more vibrant, and add a subtle vignette effect"

Comparison: image vs diagram Skills

Aspectimage Skilldiagram Skill
Use CasePhotos, art, illustrationsTechnical diagrams
Quality ReviewNoYes (Gemini 3 Pro)
IterationSingle passSmart iteration (1-2 passes)
Doc TypesN/A13 document types with thresholds
Image EditingYesNo
Best ForCreative visualsArchitecture, flowcharts, ERD

Rule of thumb: If it's a technical diagram with boxes, arrows, and labels โ†’ use diagram. If it's a photo, illustration, or artistic image โ†’ use image.

Troubleshooting

"OPENROUTER_API_KEY not found"

Set the environment variable or create a .env file. See Configuration section.

"Image file not found" (for editing)

Make sure the input image path is correct and the file exists.

Unexpected Output

  • Try a different model
  • Add more detail to your prompt
  • Be more specific about style, composition, and colors

Generation Timeout

Large or complex images may take up to 2 minutes. Timeout is set to 120 seconds.

Cost Considerations

  • Gemini 3 Pro Image: ~$2/M input, ~$12/M output tokens
  • FLUX Pro: Check OpenRouter for current pricing
  • Typical image generation: $0.02-0.10 per image
  • Image editing: Similar to generation costs

Score

Total Score

60/100

Based on repository quality metrics

โœ“SKILL.md

SKILL.mdใƒ•ใ‚กใ‚คใƒซใŒๅซใพใ‚Œใฆใ„ใ‚‹

+20
โœ“LICENSE

ใƒฉใ‚คใ‚ปใƒณใ‚นใŒ่จญๅฎšใ•ใ‚Œใฆใ„ใ‚‹

+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