SkillsGrove
SkillsGrove/Дизайн и изображения/othreecodes/claude-code-nano-banana/nano-banana-imagegen

nano-banana-imagegen

Установка

$npx skills add https://github.com/othreecodes/claude-code-nano-banana --skill nano-banana-imagegen
$git clone --depth 1 https://github.com/othreecodes/claude-code-nano-banana.git /tmp/claude-code-nano-banana && mkdir -p ~/.claude/skills && cp -r /tmp/claude-code-nano-banana/. ~/.claude/skills/nano-banana-imagegen
Пожалуйста, установи для меня этот Agent Skill: https://github.com/othreecodes/claude-code-nano-banana/tree/56e8b7567e8db600cd4ce34902783956f286128b/ — сначала прочитай его SKILL.md и скрипты и устанавливай в мою папку навыков только после того, как убедишься, что он безопасен.

Кратко

Исходное описание · MITGenerate and edit images using Google's Nano Banana (Gemini Image API). Use when the user wants to create AI-generated images, edit existing images, create infographics, generate product mockups, design social media graphics, or perform any image generation/manipulation task. Requires GEMINI_API_KEY environment variable.
Приведённый ниже SKILL.md воспроизведён из othreecodes/claude-code-nano-banana (коммит 56e8b75) под лицензией MIT. Текст не изменён; опущены только метаданные заголовка файла, изображения показаны как ссылки, а очень длинные файлы сокращены. Авторские права: 2025. Лицензия: LICENSE. Показан только файл с инструкциями; скрипты смотрите в исходном репозитории.

Nano Banana Image Generation

Generate and edit images using Google's Gemini Image models (Nano Banana and Nano Banana Pro).

Prerequisites

  1. API Key: Set the GEMINI_API_KEY environment variable

  2. uv: The script uses inline dependencies with uv (no manual install needed)

Quick Start

Using the Script

# Generate an image
uv run scripts/generate_image.py "A futuristic city at sunset" -o city.png

# Edit an existing image
uv run scripts/generate_image.py "Remove the background" -i photo.jpg -o edited.png

# Use Nano Banana Pro for higher quality
uv run scripts/generate_image.py "Create a detailed infographic" -m pro -o infographic.png

Direct Python Usage (with uv)

uv run --with google-genai python -c '
from google import genai
import os

client = genai.Client(api_key=os.environ["GEMINI_API_KEY"])

response = client.models.generate_content(
    model="gemini-2.5-flash-image",
    contents=["Create an image of a cat wearing a space helmet"]
)

for part in response.candidates[0].content.parts:
    if part.inline_data:
        with open("output.png", "wb") as f:
            f.write(part.inline_data.data)
        print("Saved to output.png")
'

Model Selection

Model Use Case
gemini-2.5-flash-image (Nano Banana) Fast generation, iterations, high volume
gemini-3-pro-image-preview (Nano Banana Pro) Professional quality, text rendering, complex prompts

Common Tasks

Image Generation

uv run scripts/generate_image.py "A serene Japanese garden with cherry blossoms" -o garden.png

Image Editing

uv run scripts/generate_image.py "Change the background to a beach sunset" -i input.jpg -o edited.png

Infographics (use Pro model)

uv run scripts/generate_image.py "Create an infographic about renewable energy" -m pro -o infographic.png

Resources

  • Script: scripts/generate_image.py - CLI tool with inline uv dependencies
  • API Reference: See references/api_reference.md for detailed SDK usage
  • Prompting Guide: See references/prompting_guide.md for effective prompts

Pricing

~$0.039 per image for Nano Banana (1290 tokens per image at $30/1M tokens)

Полный текст лицензии (MIT)
MIT License

Copyright (c) 2025

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.