Nano Banana logo

Nano Banana

Organization
OpenMinis
nano-banana

Generate or edit images using Google Nano Banana (Gemini image generation API). Trigger this skill whenever the user asks to generate an image, draw something, create artwork, edit a photo, or mentions "nano banana", "nanobanana", or any AI image generation/editing need — even if they don't explicitly mention Nano Banana. Proactively use this skill for any image creation or transformation request.

Overview

PublisherOpenMinis
RepositoryMinisSkills
Skill namenano-banana
Stars
543
Forks
86
Bundled files
3
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.

  • 3 bundled files

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

  • Open source

    Published by OpenMinis 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/OpenMinis/MinisSkills/tree/main/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/OpenMinis/MinisSkills.git /tmp/MinisSkills
mkdir -p .claude/skills
cp -r /tmp/MinisSkills/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 — Image Generation Skill

Generate or edit images locally using the Google Gemini image generation API (a.k.a. Nano Banana).

Quick Workflow

  1. Check environment (API key + dependencies)
  2. Identify the mode: text-to-image / image editing / batch generation
  3. Choose the right model
  4. Use the bundled scripts directly — no need to rewrite them
  5. Run the script and save output to /var/minis/attachments/
  6. Display the result inline in the conversation

Environment Setup

Check API Key

bash
source /etc/profile && echo $GEMINI_API_KEY | head -c 10

⚠️ Always run source /etc/profile first — environment variables are stored there and won't be available otherwise.

If not set, direct the user to Google AI Studio to obtain a key, then:

bash
echo 'export GEMINI_API_KEY="your_key_here"' >> /etc/profile

Check Dependencies

bash
pip show google-genai pillow 2>&1 | grep -E "^Name|not found"

If missing:

bash
pip install google-genai pillow

Model Selection

ModelModel IDBest For
Nano Banana 2 (recommended)gemini-3.1-flash-image-previewFast, high quality, 2K support — default choice
Nano Banana Progemini-3-pro-image-previewComplex prompts, professional assets, precise text rendering
Nano Banana (original)gemini-2.5-flash-imageUltra-low latency, simple tasks

Default to gemini-3.1-flash-image-preview unless the user explicitly requests another version.


⚠️ Known API Pitfalls

1. Aspect ratio / resolution config

❌ Wrong (old API, throws AttributeError):

python
# types.ImageGenerationConfig does not exist!
image_generation_config=types.ImageGenerationConfig(aspect_ratio="16:9")

✅ Correct:

python
config=types.GenerateContentConfig(
    response_modalities=["IMAGE"],
    image_config=types.ImageConfig(
        aspect_ratio="16:9",  # options: 1:1, 4:3, 3:4, 16:9, 9:16
        image_size="2K",      # options: 1K, 2K (default: 1K)
    ),
)

2. Environment variable loading

❌ Running python3 script.py directly may not have the API key
✅ Always prefix with source /etc/profile && python3 script.py

3. Saving images

part.as_image() returns a PIL Image object — call .save(path) directly. No need to handle base64 manually.


Bundled Scripts

Run any script with:

bash
source /etc/profile && python3 <skill-path>/nano-banana/scripts/<script>.py [args]

📄 gen.py — Text to Image

Usage:  gen.py "prompt" [output_path] [aspect_ratio] [resolution]
Example: gen.py "a panda drinking tea in a bamboo forest" /var/minis/attachments/out.png 1:1 2K

📄 edit.py — Image Editing (image + prompt → image)

Usage:   edit.py <input_image> "edit instruction" [output_path]
Example: edit.py /var/minis/attachments/photo.jpg "add a wizard hat to the cat" /var/minis/attachments/edited.png

📄 batch.py — Batch Generation (multiple prompts → multiple images)

Edit the TASKS list at the top of the script, then run it.


Step-by-Step

When the user makes an image generation request:

  1. Understand the request — text-to-image, image editing, or batch?
  2. Check API key — source /etc/profile && echo $GEMINI_API_KEY | head -c 10
  3. Verify scripts exist — ls <skill-path>/nano-banana/scripts/
  4. If scripts are missing, use file_write to recreate them from the source in this skill
  5. Run the appropriate script:
    • Text-to-image: source /etc/profile && python3 <skill-path>/nano-banana/scripts/gen.py "prompt" /var/minis/attachments/out.png 16:9 2K
    • Image editing: source /etc/profile && python3 <skill-path>/nano-banana/scripts/edit.py <image_path> "instruction" /var/minis/attachments/out.png
    • Batch: edit TASKS in scripts/batch.py, then run it
  6. Display the result — ![description](minis://attachments/out.png)

Prompt Tips

  • Describe a scene, don't just stack keywords — "An elderly Japanese potter focused at the wheel, soft afternoon light through a studio window, photorealistic" beats "Japan pottery old man realistic"
  • Specify style explicitly — for photography add camera details ("50mm lens, shallow depth of field"); for illustration name the style ("Ghibli-style watercolor")
  • Text in images — spell out exactly what text should appear; the model renders it more accurately when it's explicit
  • Iterate with edit.py — make small adjustments on an existing image rather than regenerating from scratch
  • Aspect ratio guide — 16:9 for banners/social media, 1:1 for avatars/covers, 9:16 for phone wallpapers, 3:4 for portrait cards

Troubleshooting

IssueCause & Fix
AttributeError: ImageGenerationConfigDeprecated API — use image_config=types.ImageConfig(...) instead
KeyError: GEMINI_API_KEYRun source /etc/profile before executing the script
Only text returned, no imageEnsure response_modalities includes "IMAGE"
Poor image qualitySwitch to gemini-3-pro-image-preview or refine the prompt
Rate limit errorFree tier has limits — wait a moment and retry
Save failsConfirm /var/minis/attachments/ directory exists

References

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 using Google Nano Banana (Gemini image generation API). Trigger this skill whenever the user asks to generate an image, draw something, create artwork, edit a photo, or mentions "nano banana", "nanobanana", or any AI image generation/editing need — even if they don't explicitly mention Nano Banana. Proactively use this skill for any image creation or transformation request.

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/OpenMinis/MinisSkills/tree/main/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 OpenMinis 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 👇