Skip to content

haotongl/gemini-image-skill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

🍌 gemini-image-skill

Equip Claude Code with Nano Banana — give Claude the power to generate and edit images.

This is a Claude Code skill that integrates Google Gemini's Nano Banana image models, enabling Claude to generate images from text, edit existing images, iteratively refine images through multi-turn conversation, and output in 2K/4K resolution.

Capabilities

Feature Description
Text-to-Image Generate images from text descriptions
Image Editing Modify existing images with natural language instructions
Multi-turn Iteration Refine images through conversation until you're satisfied
HD Output Support 2K / 4K resolution via Pro model

Setup

1. Get a Gemini API Key

Go to Google AI Studio to create your API key.

Important: Nano Banana models do NOT support the free tier. You must bind a credit card and upgrade to a paid plan to use the image generation API.

2. Set Environment Variable

Add your API key to ~/.zshrc or ~/.bashrc:

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

3. Install Python Dependencies

pip install google-genai Pillow

4. Install the Skill

Clone this repo into Claude Code's skills directory:

git clone https://github.com/haotongl/gemini-image-skill.git ~/.claude/skills/gemini-image

Restart Claude Code and you're good to go.

Usage

Once installed, just talk to Claude Code in natural language:

> Draw a cyberpunk cat sitting on the moon

> Change the background of this image to a starry sky  (drag in an image or specify a path)

> Make the colors brighter, add a glow effect  (multi-turn iteration)

> Generate the final version in 2K HD

Models

Model Codename Use Case
gemini-3.1-flash-image-preview Nano Banana 2 Fast generation/editing, default
gemini-3-pro-image-preview Nano Banana Pro High quality, 2K/4K output

Network Proxy

If you're behind a proxy, set the environment variables in your shell config (~/.zshrc or ~/.bashrc):

export http_proxy="http://your-proxy:port"
export https_proxy="http://your-proxy:port"

License

MIT

About

Equip Claude Code with Nano Banana - image generation & editing via Gemini API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages