Token导航 LogoToken导航TokenDH.com
研究检索敏感数据clawhub未标认证来源可访问clear审计提醒

nano-banana-2-pro纳米香蕉 2 Pro

Agent Skill

nano-banana-2-pro 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

4,163

周安装

177

GitHub Stars

1

下载量

1,458
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:nano-banana-2-pro(纳米香蕉 2 Pro)
来源仓库:https://github.com/gybin02/nano-banana-2-pro
安装命令:
openclaw skills install nano-banana-2-pro
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install nano-banana-2-pro

简介

nano-banana-2-pro 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。

  • 适用于图像创建/修改请求,包括编辑功能,支持文本转图像+图像转图像。
  • 通过 clawhub 安装并使用 openclaw skills install nano-banana-2-pro 命令部署。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写操作。
  • 可结合来源仓库和原始 README 继续核验具体用法和功能细节。

SKILL.md

name
nano-banana-2
description
Generate/edit images with Nano Banana 2 (Gemini 3.1 Flash Image). Use for image create/modify requests incl. edits. Supports text-to-image + image-to-image; 512/1K/2K/4K; 14 aspect ratios; up to 14 input images; thinking levels; use --input-image.

Nano Banana 2 Image Generation & Editing

Generate new images or edit existing ones using Google's Nano Banana 2 API (Gemini 3.1 Flash Image Preview).

Usage

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

Generate new image:

uv run ~/.codex/skills/nano-banana-pro/scripts/generate_image.py --prompt "your image description" --filename "output.png" [--model MODEL] [--resolution 512|1K|2K|4K] [--aspect-ratio RATIO] [--thinking-level minimal|high] [--image-only] [--api-key KEY]

Edit existing image:

uv run ~/.codex/skills/nano-banana-pro/scripts/generate_image.py --prompt "editing instructions" --filename "output.png" --input-image "path/to/input.png" [--model MODEL] [--resolution 512|1K|2K|4K] [--aspect-ratio RATIO] [--api-key KEY]

Multiple input images (up to 14):

uv run ~/.codex/skills/nano-banana-pro/scripts/generate_image.py --prompt "combine these elements" --filename "output.png" --input-image "img1.png" "img2.png" "img3.png" [--model MODEL] [--resolution 2K] [--api-key KEY]

Important: Always run from the user's current working directory so images are saved where the user is working, not in the skill directory.

Default Workflow (draft → iterate → final)

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

  • Draft (1K): quick feedback loop

- uv run ~/.codex/skills/nano-banana-pro/scripts/generate_image.py --prompt "<draft prompt>" --filename "yyyy-mm-dd-hh-mm-ss-draft.png" --resolution 1K

  • Iterate: adjust prompt in small diffs; keep filename new per run

- If editing: keep the same --input-image for every iteration until you're happy.

  • Final (4K): only when prompt is locked

- uv run ~/.codex/skills/nano-banana-pro/scripts/generate_image.py --prompt "<final prompt>" --filename "yyyy-mm-dd-hh-mm-ss-final.png" --resolution 4K

Model Selection

Use --model to specify the Gemini model. Default: gemini-3.1-flash-image-preview.

Available models:

Model ID别名分辨率宽高比多图输入ThinkingGoogle Search Grounding特点
gemini-3.1-flash-image-previewNano Banana 2512 / 1K / 2K / 4K14 种(含 1:4, 4:1, 1:8, 8:1)最多 14 张(10 物体 + 4 角色)minimal / highWeb Search + Image Search速度/质量/成本最佳平衡,默认推荐
gemini-3-pro-image-previewNano Banana Pro1K / 2K / 4K10 种最多 11 张(6 物体 + 5 角色)默认开启(不可关闭)Web Search专业素材制作,高级推理,高保真文字渲染
gemini-2.5-flash-imageNano Banana仅 1K(1024px)9 种最多 3 张不支持不支持最快最便宜,适合高并发低延迟场景

Map user requests:

  • Default / no preference → gemini-3.1-flash-image-preview
  • "pro", "best quality", "professional" → gemini-3-pro-image-preview
  • "fast", "cheap", "basic" → gemini-2.5-flash-image

Resolution Options

Gemini 3.1 Flash Image supports four resolutions (uppercase K required, except 512):

  • 512 (0.5K) - ~512px resolution (fastest, lowest cost)
  • 1K (default) - ~1024px resolution
  • 2K - ~2048px resolution
  • 4K - ~4096px resolution

Map user requests to API parameters:

  • No mention of resolution → 1K
  • "thumbnail", "tiny", "preview", "0.5K", "512" → 512
  • "low resolution", "1080", "1080p", "1K" → 1K
  • "2K", "2048", "normal", "medium resolution" → 2K
  • "high resolution", "high-res", "hi-res", "4K", "ultra" → 4K

Aspect Ratio Options

14 aspect ratios supported. Use --aspect-ratio to set:

  • 1:1 - Square (default if no input image)
  • 1:4, 4:1 - Extreme vertical / horizontal (new in 3.1 Flash)
  • 1:8, 8:1 - Ultra-extreme vertical / horizontal (new in 3.1 Flash)
  • 2:3, 3:2 - Classic portrait / landscape
  • 3:4, 4:3 - Standard photo portrait / landscape
  • 4:5, 5:4 - Instagram-style portrait / landscape
  • 9:16, 16:9 - Phone vertical / widescreen
  • 21:9 - Ultra-widescreen / cinematic

Map user requests:

  • "square" → 1:1
  • "portrait", "vertical" → 3:4 or 9:16
  • "landscape", "horizontal" → 4:3 or 16:9
  • "widescreen", "cinematic" → 16:9 or 21:9
  • "phone", "story", "reel" → 9:16
  • "banner", "ultra-wide" → 21:9
  • "tall banner", "vertical banner" → 1:4 or 1:8
  • "horizontal banner" → 4:1 or 8:1

If no --aspect-ratio is specified, the model defaults to matching the input image's ratio, or 1:1 for text-to-image.

Thinking Level

Control the model's reasoning depth with --thinking-level:

  • minimal (default) - Fastest response, lowest latency
  • high - Best quality, model reasons more deeply about composition

Use high for complex scenes, detailed compositions, or when quality matters more than speed. The model always uses some thinking internally; minimal just reduces it.

Multiple Input Images

Nano Banana 2 supports up to 14 reference images in a single request:

  • Up to 10 images of objects with high-fidelity
  • Up to 4 images of characters for character consistency

Use cases:

  • Character consistency: Provide a character reference image, generate different poses/angles
  • Composition: Combine elements from multiple images into one scene
  • Style transfer: Provide a style reference + content image
  • Product mockups: Place product on different backgrounds
  • 360° views: Generate different angles of a character by providing previous outputs

Example:

uv run ~/.codex/skills/nano-banana-pro/scripts/generate_image.py \
  --prompt "An office group photo of these people, they are making funny faces" \
  --input-image person1.png person2.png person3.png person4.png \
  --filename "2026-03-24-10-00-00-group-photo.png" \
  --resolution 2K --aspect-ratio 5:4

Image-Only Mode

Use --image-only to suppress text in the response and return only the generated image. Useful when you don't need the model's text commentary.

uv run ~/.codex/skills/nano-banana-pro/scripts/generate_image.py --prompt "a sunset" --filename "sunset.png" --image-only

API Key

The script checks for API key in this order:

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

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

Preflight + Common Failures (fast fixes)

  • Preflight:

- command -v uv (must exist) - test -n "$GEMINI_API_KEY" (or pass --api-key) - If editing: test -f "path/to/input.png"

  • Common failures:

- Error: No API key provided. → set GEMINI_API_KEY or pass --api-key - Error loading input image: → wrong path / unreadable file; verify --input-image points to a real image - Maximum 14 input images supported. → reduce the number of input images - "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 user's prompt or conversation
  • If unclear, use random identifier (e.g., x9k2, a7b3)

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-x9k2.png

Image Editing

When the user wants to modify an existing image:

  1. Check if they provide an image path or reference an image in the current directory
  2. Use --input-image parameter with the path to the image
  3. The prompt should contain editing instructions (e.g., "make the sky more dramatic", "remove the person", "change to cartoon style")
  4. Common editing tasks: add/remove elements, change style, adjust colors, blur background, inpainting, style transfer, sketch-to-photo, etc.

Prompt Handling

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

For editing: Pass editing instructions in --prompt (e.g., "add a rainbow in the sky", "make it look like a watercolor painting")

Preserve user's creative intent in both cases.

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>."

  • Editing template (preserve everything else):

- "Change ONLY: <single change>. Keep identical: subject, composition/crop, pose, lighting, color palette, background, text, and overall style. Do not add new objects. If text exists, keep it unchanged."

  • Photorealistic template:

- "A photorealistic [shot type] of [subject], [action or expression], set in [environment]. The scene is illuminated by [lighting description], creating a [mood] atmosphere. Captured with a [camera/lens details], emphasizing [key textures and details]."

  • Inpainting template (semantic masking):

- "Using the provided image, change only the [specific element] to [new element/description]. Keep everything else in the image exactly the same, preserving the original style, lighting, and composition."

  • Style transfer template:

- "Transform the provided photograph of [subject] into the artistic style of [artist/art style]. Preserve the original composition but render it with [description of stylistic elements]."

  • Multi-image composition template:

- "Create a new image by combining the elements from the provided images. Take the [element from image 1] and place it with/on the [element from image 2]. The final image should be a [description of the final scene]."

Output

  • Saves PNG to current directory (or specified path if filename includes directory)
  • Script outputs the full path to the generated image
  • Do not read the image back - just inform the user of the saved path
  • All generated images include a SynthID watermark

Examples

Generate new image:

uv run ~/.codex/skills/nano-banana-pro/scripts/generate_image.py --prompt "A serene Japanese garden with cherry blossoms" --filename "2025-11-23-14-23-05-japanese-garden.png" --resolution 4K

Edit existing image:

uv run ~/.codex/skills/nano-banana-pro/scripts/generate_image.py --prompt "make the sky more dramatic with storm clouds" --filename "2025-11-23-14-25-30-dramatic-sky.png" --input-image "original-photo.jpg" --resolution 2K

Widescreen cinematic shot:

uv run ~/.codex/skills/nano-banana-pro/scripts/generate_image.py --prompt "Epic fantasy castle on a cliff at sunset" --filename "2025-11-23-15-00-00-castle.png" --resolution 4K --aspect-ratio 21:9

High-quality with deep thinking:

uv run ~/.codex/skills/nano-banana-pro/scripts/generate_image.py --prompt "A detailed infographic explaining photosynthesis as a recipe" --filename "2025-11-23-15-30-00-infographic.png" --resolution 2K --aspect-ratio 3:4 --thinking-level high

Combine multiple images:

uv run ~/.codex/skills/nano-banana-pro/scripts/generate_image.py --prompt "Create a professional e-commerce fashion photo. Put the dress from the first image on the model from the second image" --filename "2025-11-23-16-00-00-fashion.png" --input-image dress.png model.png --resolution 2K

Quick thumbnail preview:

uv run ~/.codex/skills/nano-banana-pro/scripts/generate_image.py --prompt "Logo for a coffee shop called The Daily Grind" --filename "2025-11-23-16-30-00-logo.png" --resolution 512 --aspect-ratio 1:1 --image-only

适合场景

01

文本生成图片

02

图片风格化

03

产品图和创意图

04

需要 FLUX 模型时

能力概览

能力 1

调用 FLUX 图像模型

能力 2

支持文本生图和图像改写

能力 3

覆盖 LoRA 或风格适配

能力 4

适合创意视觉生成

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

78.96%
按下载量换算1,151

安全审计

VirusTotal

通过

ClawScan

可疑

Static analysis

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills