nano-banana-2
Gemini image generation, editing, and search-grounded image creation via gemini-3.1-flash-image-preview (Nano Banana 2). USE FOR: - Generating images from text prompts (text-to-image) - Editing or transforming an existing image with text instructions - Generating images grounded in live web/image search results Requires GEMINI_API_KEY environment variable. See rules/setup.md for configuration and rules/security.md for output handling guidelines.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/frank-bot07/nano-banana-2-gemininano-banana-2
Gemini image generation and editing via gemini-3.1-flash-image-preview. All
output images are written to .nano-banana/ in the current project directory.
Prerequisites
GEMINI_API_KEY must be set in the environment. Verify with:
echo $GEMINI_API_KEY
If empty, see rules/setup.md. For output handling and security guidelines, see rules/security.md.
Workflow
Follow this escalation pattern:
- Generate - Create a new image from a text prompt only.
- Edit - Modify an existing local image with a text instruction.
- Search-Grounded - Generate informed by live web/image search results (use when current visual references, styles, or real-world accuracy matter).
| Goal | Operation | When |
|---|---|---|
| Create image from scratch | generate | No source image; prompt is self-contained |
| Modify or extend an existing image | edit | Have a local PNG/JPEG to transform |
| Ground output in current web data | search-grounded | Need up-to-date styles or real-world references |
Output & Organization
All images are saved to .nano-banana/ in the current working directory.
Add .nano-banana/ to .gitignore to prevent generated assets from being committed.
mkdir -p .nano-banana
echo ".nano-banana/" >> .gitignore
Naming conventions:
.nano-banana/gen-{slug}-{timestamp}.png
.nano-banana/edit-{slug}-{timestamp}.png
.nano-banana/search-{slug}-{timestamp}.png
Where {slug} is a short kebab-case label from the first 4-5 words of the prompt,
and {timestamp} is YYYYMMDD-HHMMSS.
After saving, open to confirm the result:
open "$(ls -t .nano-banana/*.png | head -1)"
API Reference
| Property | Value |
|---|---|
| Model | gemini-3.1-flash-image-preview |
| Endpoint | https://generativelanguage.googleapis.com/v1beta/models/gemini-3.1-flash-image-preview:generateContent |
| Auth header | x-goog-api-key: $GEMINI_API_KEY |
| Image output | candidates[0].content.parts[].inlineData.data (base64 PNG) |
Resolution options (imageConfig.imageSize)
| Value | Resolution |
|---|---|
512 | 0.5K (fastest) |
1024 | 1K (default) |
2048 | 2K |
4096 | 4K |
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-frank-bot07-nano-banana-2-gemini": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
Model Switchboard
Skill by frank-bot07
Openclaw Voice
Skill by frank-bot07
openclaw-ecommerce
E-commerce price monitoring, order tracking, and margin analysis for OpenClaw agents. Track product prices, get alerts on drops, manage orders, and calculate real margins after fees.
Openclaw Crm
Skill by frank-bot07
Openclaw Monitor
Skill by frank-bot07