Shan Shutong

Nano Banana Pro OpenRouter

设计创意v1.0.1
作者:Shan Shutong更新于 2026-05-11共 2 个版本 · 最新版本发布于 2026-02-03nano-banana-pro-openrouter@clawhub_duffycoder/nano-banana-pro-openrouter
图片生成#Image Generation

据 AlphaMoat 统计,截至 2026-09,Nano Banana Pro OpenRouter 累计下载 4,247 次、获 1 个星标,在全部 5,078 个 AI 技能中排名第 2,340 位,在「设计创意」分类(512 个)中排名第 226 位。

累计安装
627
累计下载
4,247
星标
1
全站排名
#2,340
全站前 47% · 「设计创意」前 45%
平台累计安装累计下载星标评论
ClawHub ↗1063,2371-
SkillHub ↗6274,2471—

各平台的计数口径不同,统计时间不一致。

这个技能是做什么的

按提示词出图,分辨率可选 1K、2K、4K,最低一档适合先快速看效果。脚本要用绝对路径运行,不要先切到技能目录;图片固定存到输出目录,文件名带路径时只取最后一段。需要 OpenRouter 的密钥。shell 版本目前只支持生成,不支持传入图片编辑。

资料发布于 2026-10-27

可以用来做什么

  • 按描述快速出一版草图看方向
  • 批量生成同风格配图并归档

什么时候用

  • 需要快速试画面方向时
  • 手上有 OpenRouter 密钥想直接出图时

示例提示词

以下是根据技能文档生成的示例,不代表实际运行结果。

用最低分辨率先出一版看看效果
按这段描述生成一张 2K 的插画

月度数据趋势

累计下载4,247
2,6933,5284,3622026-03 · 累计下载 2,8082026-05 · 累计下载 3,2862026-06 · 累计下载 3,4002026-07 · 累计下载 3,5722026-08 · 累计下载 3,7162026-09 · 累计下载 4,24726-0326-09
星标1
0122026-03 · 星标 12026-05 · 星标 12026-06 · 星标 12026-07 · 星标 12026-08 · 星标 12026-09 · 星标 126-0326-09

2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。

月份累计下载环比星标
2026-094,247—1
2026-083,716+4.0%1
2026-073,572+5.1%1
2026-063,400+3.5%1
2026-053,286—1
2026-032,808—1

SKILL.md 原文

以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。

5.7 KB · ClawHub v1.0.1
---
name: 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.
---

# Nano Banana Pro Image Generation

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

## Usage
展开全部(共 143 行)

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

Generate new image:
```bash
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 "<draft 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 "<final 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: <subject>. Style: <style>. Composition: <camera/shot>. Lighting: <lighting>. Background: <background>. Color palette: <palette>. Avoid: <list>."

## 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:
```bash
sh ~/.openclaw/workspace/skills/nano-banana-pro-openrouter/scripts/generate_image.sh --prompt "A serene Japanese garden with cherry blossoms" --filename auto --resolution 4K
```

「设计创意」分类下的热门技能

数据月份:2026-09 · 下载/星标/安装数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。