Nano Banana Image Generation

SkillFiles & storage

Generate or edit images with OpenRouter using the google/gemini-3.1-flash-image-preview model. Use when the user asks for image generation, wants a new visual from a text prompt, or wants modifications to an existing screenshot or image and expects an image file back.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the Nano Banana Image Generation skill

What this skill tells your AI

The instructions your AI receives, as published by ruizrica/agent-pi in skills/nano-banana/SKILL.md and read by ahel’s review.

Use this skill when the user wants an image back, either from a fresh prompt or from editing an existing image.

Model

  • Provider: OpenRouter
  • Model: google/gemini-3.1-flash-image-preview
  • Friendly name: Nano Banana

Supported workflows

  1. Text-to-image: user provides a prompt, you generate an image.
  2. Image edit: user provides an image or screenshot plus instructions, you generate a modified image.

Before you run

  • Make sure the prompt is explicit enough to produce the desired image.
  • If editing an image, first save or locate the input image path in the workspace.
  • The script writes generated files to .context/generated-images/ by default.

Usage

Generate a new image

node agent/skills/nano-banana/generate-image.js \
  --prompt "A clean product hero shot of a matte black coffee grinder on a soft beige background, studio lighting" \
  --output .context/generated-images/coffee-grinder.png

Edit an existing image

node agent/skills/nano-banana/generate-image.js \
  --prompt "Keep the layout the same, but change the CTA button to green, replace the headline with 'Ship faster', and make the page look more premium" \
  --input-image path/to/screenshot.png \
  --output .context/generated-images/edited-screenshot.png

Response handling

  • The script prints JSON with an output field containing the saved image path.
  • After running it, tell the user the output file path.
  • If the model returns no image, inspect the JSON warning and summarize the failure clearly.

Notes

  • Prefer PNG outputs unless the user asks for another format.
  • Preserve existing composition when the user asks for modifications to a screenshot.
  • If the user’s request is ambiguous, clarify what should change and what must remain untouched.

Signals

GitHub stars
270
Forks
41
Last commit
Jul 2026
Advanced
Catalog kind
skill
Gateway key
nano-banana-ruizrica
Source
github.com/ruizrica/agent-pi