Back to Skills

nano-banana-pro

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file

264stars22forksUpdated 5/20/2026

Security Assessment

Safe(100/100)
Security Score100/100

About nano-banana-pro

The nano-banana-pro skill is designed to generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. It addresses the challenge of quickly producing high-quality images from text prompts or modifying existing images without requiring users to manually handle API calls or file processing. By providing a simple command-line interface, it streamlines the workflow for image creation and editing tasks, enabling users to focus on their creative vision rather than technical integration details.

This skill supports both text-to-image generation and image-to-image editing. Users can specify resolution options of 1K, 2K, or 4K depending on their needs, with 1K being the default. Editing is facilitated through the --input-image parameter, allowing modifications such as adding or removing elements, changing styles, adjusting colors, or altering backgrounds. The script automatically manages filenames with timestamp-based formatting and descriptive identifiers, ensuring consistent and organized output. API key management is straightforward, checking first for a provided argument or falling back to an environment variable.

Typical use cases include generating artistic visuals from descriptive prompts, modifying existing images for creative projects, or producing high-resolution assets for design purposes. Target users range from digital artists and graphic designers to content creators and developers needing automated image generation capabilities. The skill is especially useful in scenarios where rapid iteration or batch image editing is required, providing a reliable and flexible toolset for both personal and professional projects.

FAQ

How do I generate a new image using this skill?

Run the generate_image.py script with the --prompt argument describing the image, specify --filename for output, and optionally set --resolution (1K, 2K, or 4K) and --api-key. Always execute from your current working directory.

Can I edit an existing image?

Yes. Use the --input-image parameter with the path to the existing image, and provide your editing instructions via --prompt. The script will save the modified image in the current directory.

What happens if I don't specify a resolution?

If no resolution is mentioned, the skill defaults to 1K (~1024px). You can also specify 'low', '2K', or 'high' in your prompt to map to different resolutions.

How is the API key managed?

The script first checks for an --api-key argument, then for the GEMINI_API_KEY environment variable. If neither is provided, the script will exit with an error.

Where are the generated or edited images saved?

Images are saved as PNG files in the current working directory. The filename is automatically generated with a timestamp and descriptive name based on your prompt or input.

All Files

2 files
scripts/generate_image.py5.5 KB
View
SKILL.md4.2 KB
View

Install nano-banana-pro

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill