Files
pi-skill/skills/nano-banana/SKILL.md
2026-05-25 16:41:08 +07:00

2.2 KiB
Raw Blame History

name, description, allowed-tools
name description allowed-tools
nano-banana 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. Bash(node agent/skills/nano-banana/generate-image.js:*)

Nano Banana Image Generation

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 users request is ambiguous, clarify what should change and what must remain untouched.