Nano Banana logo

Nano Banana

Community
LichAmnesia
nano-banana

Generate or edit images with Google's Nano Banana 2 (`gemini-3.1-flash-image-preview`). Use when the user asks to generate an image, edit an image, or create a picture. Supports 512 / 1K / 2K / 4K resolutions.

Overview

PublisherLichAmnesia
Repositorylich-skills
Skill namenano-banana
Stars
231
Forks
26
Bundled files
1
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by LichAmnesia on GitHub. Read the source before you install it.

Installation

Install the Nano Banana AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/LichAmnesia/lich-skills/tree/main/skills/nano-banana
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/LichAmnesia/lich-skills.git /tmp/lich-skills
mkdir -p .claude/skills
cp -r /tmp/lich-skills/skills/nano-banana .claude/skills/nano-banana
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Nano Banana in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Nano Banana on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Nano Banana is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Nano Banana 2

Text-to-image and image edit via Google's Nano Banana 2 model, aka gemini-3.1-flash-image-preview. Fast, cheap, high-quality. Returns PNG.

When to use

  • User asks for an image, picture, photo, thumbnail, cover art, poster, icon, etc.
  • User provides an input image and wants it modified (background change, object removal, style swap)
  • You need a quick visual for a blog post, README, demo, or slide

When NOT to use

  • User wants a video — Nano Banana is image-only
  • User wants a pixel-perfect UI mockup — use a design tool
  • User needs a specific licensed stock photo — use a stock service

Setup

  1. Get a Gemini API key: https://aistudio.google.com/app/apikey

  2. Export it:

    bash
    export GEMINI_API_KEY="YOUR_KEY_HERE"
    # or
    export GOOGLE_API_KEY="YOUR_KEY_HERE"
  3. Install uv if missing:

    bash
    command -v uv || curl -LsSf https://astral.sh/uv/install.sh | sh

First run auto-installs google-genai and pillow via uv's inline script deps.

Generate

bash
uv run ~/.claude/skills/lich-skills/skills/nano-banana/scripts/generate_image.py \
    --prompt "A cinematic rainy Tokyo alley, neon reflections, 35mm, low angle" \
    --filename "tokyo-alley.png" \
    --resolution 1K

Output is saved to tokyo-alley.png in the current directory unless the filename is absolute.

Edit

Pass an input image with --input-image. The model sees the image + your instruction.

bash
uv run .../generate_image.py \
    --prompt "Remove the crowd behind the subject. Keep framing and grading unchanged." \
    --filename "cleaned.png" \
    --input-image "./portrait.png" \
    --resolution 2K

When editing, the script auto-matches output resolution to the input's dimensions unless you explicitly pass --resolution.

Flags

FlagDefaultPurpose
--prompt, -prequiredImage description or edit instruction
--filename, -frequiredOutput path (PNG)
--input-image, -i—Source image for editing
--resolution, -r1KOne of 512, 1K, 2K, 4K
--api-key, -kenvOverrides GEMINI_API_KEY / GOOGLE_API_KEY
--model, -mgemini-3.1-flash-image-previewRarely needed

Resolution mapping

Map loose user language to a resolution flag:

User saysUse
(nothing)1K
"small", "thumbnail", "quick draft"512
"normal", "medium"1K
"high quality", "large"2K
"4k", "print", "wallpaper"4K

Prompt template (generation)

Subject: <subject>.
Style: <photo | illustration | 3D | painting | pixel art | ...>.
Composition: <shot type, angle>.
Lighting: <lighting description>.
Background: <background>.
Avoid: <what should NOT be in the image>.

Prompt template (editing)

Change only: <the specific edit>.
Keep subject, framing, lighting, palette, text, and overall style unchanged.

Being explicit about what to keep is the difference between a clean edit and a total re-render.

Environment

  • Key lookup order: --api-key → GEMINI_API_KEY → GOOGLE_API_KEY
  • Output format: PNG (RGBA converted to RGB on white background)
  • Never prints the API key or image bytes to stdout

Fast checks

bash
command -v uv
test -n "$GEMINI_API_KEY" || test -n "$GOOGLE_API_KEY"
# If editing:
test -f ./input.png

Common failures

ErrorFix
Error: No API key provided.Export GEMINI_API_KEY or pass --api-key
Error loading input image:Bad path or unreadable file
Error: No image was generated in the response.Prompt too vague or unsafe — rewrite
403 / quotaWrong key, region-locked, or over quota

Red flags

  • Hardcoding the API key in any script or example
  • Committing generated images to git without checking size
  • Re-running the same prompt 10 times hoping for luck — instead, rewrite the prompt with the template above

Verification

  • $GEMINI_API_KEY or $GOOGLE_API_KEY set in env, not in files
  • A test generation produces a PNG at the expected path
  • gitleaks detect --source . clean

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Nano Banana AI skill do?

Generate or edit images with Google's Nano Banana 2 (`gemini-3.1-flash-image-preview`). Use when the user asks to generate an image, edit an image, or create a picture. Supports 512 / 1K / 2K / 4K resolutions.

Why use Nano Banana on TypingMind?

Because you install it once and use it with any model. Nano Banana is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Nano Banana in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/LichAmnesia/lich-skills/tree/main/skills/nano-banana. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Nano Banana?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Nano Banana?

As many as you like. As long as a model supports skills, you can use Nano Banana with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Nano Banana AI skill free?

Yes. It is published on GitHub by LichAmnesia under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇