← Back to Skills Marketplace
duffycoder

Nano Banana Pro OpenRouter

by Shan Shutong · GitHub ↗ · v1.0.1
cross-platform ⚠ suspicious
2255
Downloads
1
Stars
10
Active Installs
2
Versions
Install in OpenClaw
/install nano-banana-pro-openrouter
Description
Generate images with Nano Banana Pro via OpenRouter. Use when the user asks for image generation, mentions Nano Banana Pro, Gemini 3 Pro Image, or OpenRouter image generation.
README (SKILL.md)

Nano Banana Pro Image Generation

Generate new images using OpenRouter's Nano Banana Pro (Gemini 3 Pro Image Preview).

Usage

Run the script using an absolute path (do NOT cd to the skill directory first):

Generate new image:

sh ~/.openclaw/workspace/skills/nano-banana-pro-openrouter/scripts/generate_image.sh --prompt "your image description" [--filename "output-name.png" | --filename auto] [--resolution 1K|2K|4K] [--api-key KEY]

Note: the shell version currently supports generation only (no input image editing).

Important:

  • Images are always saved under ~/.openclaw/workspace/outputs/nano-banana-pro-openrouter
  • If --filename contains a path, only the basename is used

Default Workflow (draft -> iterate -> final)

Goal: fast iteration without burning time on 4K until the prompt is correct.

  • Draft (1K): quick feedback loop
    • sh ~/.openclaw/workspace/skills/nano-banana-pro-openrouter/scripts/generate_image.sh --prompt "\x3Cdraft prompt>" --filename auto --resolution 1K
  • Iterate: adjust prompt in small diffs; keep filename new per run
  • Final (4K): only when prompt is locked
    • sh ~/.openclaw/workspace/skills/nano-banana-pro-openrouter/scripts/generate_image.sh --prompt "\x3Cfinal prompt>" --filename auto --resolution 4K

Resolution Options

The Gemini 3 Pro Image API supports three resolutions (uppercase K required):

  • 1K (default) - ~1024px resolution
  • 2K - ~2048px resolution
  • 4K - ~4096px resolution

Map user requests to API parameters:

  • No mention of resolution -> 1K
  • "low resolution", "1080", "1080p", "1K" -> 1K
  • "2K", "2048", "normal", "medium resolution" -> 2K
  • "high resolution", "high-res", "hi-res", "4K", "ultra" -> 4K

API Key and Base URL

The script checks for the API key in this order:

  1. --api-key argument (use if user provided a key in chat)
  2. OPENROUTER_API_KEY environment variable

The API base URL must be set via OPENROUTER_BASE_URL. Use the full chat completions endpoint (for OpenRouter: https://openrouter.ai/api/v1/chat/completions).

The script also loads .env files automatically (if present):

  • Current working directory .env
  • Skill directory .env

Important: If a .env file exists, do not ask the user for the key up front. Just run the script and only ask if it errors with "No API key provided."

OpenClaw Chat Execution Rules

  • OpenClaw does NOT auto-source the skill .env file
  • If ~/.openclaw/workspace/skills/nano-banana-pro-openrouter/.env exists:
    1. Use the read tool to read .env
    2. Extract OPENROUTER_API_KEY and OPENROUTER_BASE_URL
    3. Always pass the key via --api-key when running the script
  • Only ask the user if .env is missing or the key cannot be read
  • If the user asks for a timestamped filename, prefer --filename auto (do not handwrite dates)

If neither is available, the script exits with an error message.

Preflight and Common Failures (fast fixes)

Preflight:

  • command -v sh (must exist)
  • command -v curl (must exist)
  • command -v base64 (must exist)

Common failures:

  • Error: No API key provided. -> read .env and retry with --api-key; if still failing, ask the user to set OPENROUTER_API_KEY
  • Error: No API base URL provided. -> ensure OPENROUTER_BASE_URL is set to a full chat completions endpoint
  • Error loading input image: -> wrong path or unreadable file; verify --input-image points to a real image
  • "quota/permission/403" style API errors -> wrong key, no access, or quota exceeded; try a different key/account

Filename Generation

Generate filenames with the pattern: yyyy-mm-dd-hh-mm-ss-name.png

Format: {timestamp}-{descriptive-name}.png

  • Timestamp: Current date/time in format yyyy-mm-dd-hh-mm-ss (24-hour format)
  • Name: Descriptive lowercase text with hyphens
  • Keep the descriptive part concise (1-5 words typically)
  • Use context from the user's prompt or conversation
  • If unclear, use image

Examples:

  • Prompt "A serene Japanese garden" -> 2025-11-23-14-23-05-japanese-garden.png
  • Prompt "sunset over mountains" -> 2025-11-23-15-30-12-sunset-mountains.png
  • Prompt "create an image of a robot" -> 2025-11-23-16-45-33-robot.png
  • Unclear context -> 2025-11-23-17-12-48-image.png

Tip: To avoid incorrect timestamps, pass --filename auto and let the script generate the filename using the system clock.

Image Editing (Not Supported in Shell Version)

The shell script only supports generating new images. Editing an input image is not available in this version.

Prompt Handling

For generation: pass the user's image description as-is to --prompt. Only rework if clearly insufficient.

Prompt Templates (high hit-rate)

Use templates when the user is vague or when edits must be precise.

Generation template:

  • "Create an image of: \x3Csubject>. Style: \x3Cstyle>. Composition: \x3Ccamera/shot>. Lighting: \x3Clighting>. Background: \x3Cbackground>. Color palette: \x3Cpalette>. Avoid: \x3Clist>."

Output

  • Saves PNG to ~/.openclaw/workspace/outputs/nano-banana-pro-openrouter
  • If --filename includes a path, only the basename is used
  • Script outputs the full path to the generated image
  • Script also outputs MEDIA_URL=file:///absolute/path for each image

Show the image in the reply

  • Use the MEDIA_URL value to attach the image in the model response
  • In OpenClaw, prefer sending a message with mediaUrl set to that file:// URL
  • Also include the file path in text for reference

Examples

Generate new image:

sh ~/.openclaw/workspace/skills/nano-banana-pro-openrouter/scripts/generate_image.sh --prompt "A serene Japanese garden with cherry blossoms" --filename auto --resolution 4K
Usage Guidance
This skill appears to be a legitimate OpenRouter image generator, but exercise caution before installing or running it. Key points: - The script requires an API key and a base URL (OPENROUTER_API_KEY and OPENROUTER_BASE_URL) but the skill metadata does not declare these — treat that as a red flag and verify where you'll store/provide the key. - The script will load and export variables from both the current working directory's .env (PWD/.env) and the skill's .env. That means if you run it from a project directory with a .env containing other service credentials, those values could be exported into the script environment. Avoid running this from directories with unrelated secrets. - The SKILL.md also instructs the agent to read the skill .env file (using the read tool) and pass the key. Reading files to obtain secrets is necessary for operation but increases risk — inspect the .env contents yourself before allowing the agent to read it. - Recommended precautions: (1) Put your OpenRouter API key in a dedicated, minimal .env inside the skill directory (or pass --api-key explicitly), (2) do not run the script from a project folder that contains other sensitive .env files, (3) review the script and test in a restricted/sandboxed environment first, and (4) ask the skill author to update registry metadata to declare required env vars and to avoid loading PWD/.env unnecessarily.
Capability Analysis
Type: OpenClaw Skill Name: nano-banana-pro-openrouter Version: 1.0.1 The skill bundle is designed for image generation via OpenRouter and appears benign. The `SKILL.md` provides clear instructions for the agent, without any prompt injection attempts to subvert its behavior. The `generate_image.sh` script correctly handles arguments, validates inputs, and uses controlled output paths. While the script loads `.env` files from the current working directory (`PWD/.env`), this risk is mitigated by the `load_env_file` function which only exports variables if they are not already set, and by the `SKILL.md` instructions which direct the agent to explicitly pass the API key via the `--api-key` argument, overriding any environment variables.
Capability Assessment
Purpose & Capability
The name/description, runtime script, and instructions all match: the skill calls an OpenRouter-compatible chat/completions endpoint to request Gemini-3-Pro-image generation and saves resulting images. However, the skill metadata declares no required environment variables or primary credential even though the runtime requires OPENROUTER_API_KEY and OPENROUTER_BASE_URL — this mismatch should be fixed.
Instruction Scope
SKILL.md instructs the agent to read .env files (using the read tool) and tells the agent not to ask the user for a key if a .env exists. The included script itself loads both "$PWD/.env" and the skill's .env. Directing the agent to read files that may contain secrets and relying on PWD/.env expands scope beyond the skill folder and can expose unrelated credentials.
Install Mechanism
No install spec; this is an instruction-only skill with a shell script. Nothing is downloaded or written by an installer, which is low risk.
Credentials
The runtime clearly needs OPENROUTER_API_KEY and OPENROUTER_BASE_URL, but the registry metadata lists no required env vars/primary credential. Worse, the load_env_file function exports every valid key from loaded .env files (including PWD/.env), which can cause unrelated secrets to be read/used. Requesting the OpenRouter key is reasonable, but reading arbitrary .env files is disproportionate.
Persistence & Privilege
The skill is not always-enabled and does not request persistent system-wide changes. It does not modify other skills or agent configuration. Autonomous invocation is allowed (platform default) but is not combined with other high-privilege requests here.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install nano-banana-pro-openrouter
  3. After installation, invoke the skill by name or use /nano-banana-pro-openrouter
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.1
Switch to pure sh+curl; remove Python dependency
v1.0.0
Initial release of nano-banana-pro-openrouter skill for image generation and editing. - Generate or edit images with Nano Banana Pro (Gemini 3 Pro Image) via OpenRouter. - Supports resolutions: 1K (default), 2K, and 4K; maps common user phrases to correct resolution. - Filenames auto-generated with timestamp and descriptive name; use --filename auto for best results. - API key management via command-line, environment, or .env file; prompts user only if missing. - Provides error handling guidance and example bash commands for all workflows. - Outputs images to a specific directory and shares MEDIA_URL for easy viewing in replies.
Metadata
Slug nano-banana-pro-openrouter
Version 1.0.1
License
All-time Installs 10
Active Installs 10
Total Versions 2
Frequently Asked Questions

What is Nano Banana Pro OpenRouter?

Generate images with Nano Banana Pro via OpenRouter. Use when the user asks for image generation, mentions Nano Banana Pro, Gemini 3 Pro Image, or OpenRouter image generation. It is an AI Agent Skill for Claude Code / OpenClaw, with 2255 downloads so far.

How do I install Nano Banana Pro OpenRouter?

Run "/install nano-banana-pro-openrouter" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Nano Banana Pro OpenRouter free?

Yes, Nano Banana Pro OpenRouter is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Nano Banana Pro OpenRouter support?

Nano Banana Pro OpenRouter is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Nano Banana Pro OpenRouter?

It is built and maintained by Shan Shutong (@duffycoder); the current version is v1.0.1.

💬 Comments