← All resources
Companion · Video 01

Nano Banana × Claude Code

Make Claude Code generate any image in 10 minutes.

$0 to start · Cost~6 min · TimeMac · Linux · WSL · Platform
Claude CodeSkillsImage generationGemini
What gets installed

One folder. Two files. That's the whole skill.

A Claude Code skill is just a folder Claude reads on startup. No plugin store, no manifest, no registration. After Step 2, your home directory will look like this:

~/
├── .env                            # your Gemini API key
└── .claude/
    └── skills/
        └── nano-banana/              # the skill folder
            ├── SKILL.md             # tells Claude when to use it
            └── scripts/
                └── generate.py      # the image generator
Before you start

Prerequisites.

01

Claude Code installed

Mac, Linux, or Windows-via-WSL. Install →

02

Python 3

Already on every modern Mac/Linux/WSL. Run python3 --version to confirm.

03

Google account

For the free Gemini API key. We'll grab it in Step 1.

Step 1 · ~3 min

Get a free Gemini API key.

Open aistudio.google.com/apikey, click Create API key, and copy the string. The free tier is generous, so generate freely.

Then paste your key into Claude Code with the prompt below. Claude saves it to ~/.env in the right format and locks the file permissions for you.

Paste into Claude Code:

Save my Gemini API key to ~/.env as GEMINI_API_KEY and lock the file so only I can read it. The key is: paste-your-key-here

🔒 Never commit the key. The skill knows to look in ~/.env, which lives in your home folder, not inside any project, so it can't accidentally end up in a git repo.
Step 2 · ~1 min

Install the skill.

The whole skill lives in a public GitHub repo. Just paste this prompt into Claude Code, and it'll clone the repo into your skills folder for you.

Paste into Claude Code:

Install the nano-banana skill from https://github.com/Sneaky-Goat-Dev/nano-banana-claude-code-skill into my Claude Code skills directory.

Claude will run a git clone into ~/.claude/skills/nano-banana/, confirm the files landed, and tell you it's ready. The skill triggers on the very next prompt, no restart needed.

Prefer the manual version?

One command, same result:

terminal
git clone https://github.com/Sneaky-Goat-Dev/nano-banana-claude-code-skill \
    ~/.claude/skills/nano-banana
💡 Updates are a git pull away. Because the skill is a real git checkout, you can cd ~/.claude/skills/nano-banana && git pull any time to grab improvements.
Step 3 · ~2 min

Generate your first image.

Open Claude Code in any project and ask. The skill auto-triggers, so you don't need to name it.

You ask:

"Make me a wide hero image for a portfolio site. Abstract, warm, late-afternoon light, cream and burnt-orange tones, no text."

Claude picks the skill, runs generate.py, and prints the saved file path. The PNG opens, the JSON sidecar lands beside it. Done.

Test the script directly

If you want to confirm the install without going through Claude:

terminal
python3 ~/.claude/skills/nano-banana/scripts/generate.py \
    "a tabby cat napping in a sunbeam, photo, soft window light, 35mm" \
    --aspect 1:1 --resolution 1K --output ./test.png
Under the hood

Two files. That's the whole skill.

You don't have to read these to use the skill. If you're curious how skills work, or you want to fork this and build your own, here's exactly what got installed.

SKILL.md→ ~/.claude/skills/nano-banana/SKILL.md
Loading…
Why the description matters

Claude triggers a skill by reading the frontmatter description. Vague description = unreliable triggering. Name actual user phrasing: "make", "create", "render", "design", "edit a photo".

Why one rule beats ten

Nano Banana's #1 strength is language understanding. A coherent paragraph beats keyword soup every time. Don't write cyberpunk, neon, 4k. Describe the scene like you saw it.

generate.py→ ~/.claude/skills/nano-banana/scripts/generate.py
Loading…
💡 The sidecar is the part people skip and regret. Every generation writes a tiny .jsonnext to the PNG with the prompt and config. That's how future-you iterates instead of starting from scratch.
Bonus

Use your own images as references.

Anything visual you want the model to stay faithful to can be passed in as a reference. A logo, a product photo, a headshot, a sketch, a moodboard, a brand colour palette. Drop the file in a folder called image-gen-resources/ in your project, then point Claude at it by name.

The unlock is being explicit about what to preserve. The model will happily reinterpret anything you don't pin down. Name the parts that matter (colours, shapes, typography, identity, composition) and it'll hold the line on those.

A few examples

Logo on a product mockup:

"Place the logo in image-gen-resources/logo.pngon the chest of a black cotton t-shirt, hanging on a wooden hanger against a neutral linen backdrop. Preserve the exact logo proportions, colours, and spacing."

Person, dramatic shot:

"Use the headshot in image-gen-resources/headshot.jpgand put me on the cover of TIME magazine. Preserve the exact facial features, hair, skin tone, and clothing from the reference image."

Style transfer from a moodboard:

"Generate a hero image of a coffee shop interior, in the same warm muted-pastel illustration style as image-gen-resources/moodboard.jpg. Match the colour palette and brushwork."

Up to 14 refs per call

You can pass multiple images in one go, useful for combining a logo, a product, and a style reference together.

Don't change too much at once

Big leaps from the reference (pose, angle, scale) degrade fidelity. Stay close to what's in the source image where you can.

What's not in the ref gets invented

The model fills gaps with guesses. If something has to look right, make sure it's actually visible in the reference, or pin it down explicitly in the prompt.

What you just built

A free, auto-triggering image-gen skill, yours.

  • Plain-English prompts hand you back PNG files on disk.
  • Every generation is reproducible via the JSON sidecar.
  • Reference images for character / product / logo consistency.
  • Triggers automatically inside Claude Code. No command, no flag.
  • Pattern works for any external API. The folder is the skill.
Need a website or AI workflow for your business?

I design websites and
custom AI workflows for clients.

Polished, fast websites and custom AI integrations tailored to how your business actually runs. Whether you need a marketing site, a portal, or an automation that saves you hours, let's talk.