首页龙虾技能列表 › Nano Banana — Nano工具

Nano Banana — Nano工具

v1.0.0

Generate/edit images with Nano Banana 图像工具 Pro (Gemini 3 Pro Image). Use for image create/modify requests incl. edits. Supports 文生图 + 图生图; 1K...

0· 197·0 当前·0 累计
by @keyserkazi1 (Keyserkazi1)·MIT-0
下载技能包
License
MIT-0
最后更新
2026/4/12
安全扫描
VirusTotal
无害
查看报告
OpenClaw
可疑
medium confidence
The skill's code and instructions generally match its image-generation purpose, but there are inconsistencies (undeclared required API key, missing install steps for dependencies, and metadata mismatches) that merit caution before installing.
评估建议
This skill appears to implement Gemini-based image generation and editing and does not contain obvious exfiltration. However: - The script requires a GEMINI_API_KEY (or --api-key) but the registry metadata does not declare that requirement — verify you are comfortable supplying an API key and that the key has appropriate (limited) permissions and quota. - There is no install spec: you must ensure Python >=3.10 and install google-genai and pillow before running. Consider running it in an isolated...
详细分析 ▾
用途与能力
The skill claims to generate/edit images via Google's Gemini (Nano Banana / Gemini 3 Pro Image) and the included script implements that (uses google.genai, calls model 'gemini-3-pro-image-preview'). However the registry metadata declares no required environment variables or primary credential while the script and SKILL.md clearly require a GEMINI_API_KEY or --api-key. Also the _meta.json ownerId does not match the registry ownerId, creating an ownership/metadata inconsistency.
指令范围
SKILL.md and the script limit actions to generating or editing images and saving them to disk. The runtime instructions only reference the GEMINI API key and local image files; they do not instruct reading unrelated system files or exfiltrating data to unexpected endpoints. The script prints model text output and the saved image path, which is expected for this purpose.
安装机制
There is no install spec despite the script listing dependencies (google-genai, pillow) in comments. That means users/agents must ensure Python >=3.10 and install those packages themselves. Absence of an install step is not malicious but is an inconsistency and could lead to runtime failures.
凭证需求
The script requires a GEMINI_API_KEY (or --api-key) to operate, but the registry lists no required env vars or primary credential — this is a mismatch. Requesting a single API key for the external image model is proportionate to the stated purpose, but the missing declaration and lack of guidance about key scope/permissions raises concern.
持久化与权限
The skill is not always-included, is user-invocable, and does not request elevated or persistent privileges. It does not modify other skills or global agent settings.
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

无特殊依赖

版本

latestv1.0.02026/3/17

- Initial release of Nano Banana Pro skill. - Provides image generation and editing using Google's Gemini 3 Pro Image API. - Supports text-to-image and image-to-image in 1K, 2K, and 4K resolutions. - Includes workflow guidance, filename conventions, prompt handling, and error troubleshooting. - Usage instructions and practical examples are documented.

● 无害

安装命令 点击复制

官方npx clawhub@latest install nano-banana-pro1
镜像加速npx clawhub@latest install nano-banana-pro1 --registry https://cn.clawhub-mirror.com

技能文档

Generate new images or edit existing ones using Google's Nano Banana Pro API (Gemini 3 Pro Image).

Usage

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

Generate 新的 image:

uv run ~/.codex/skills/nano-banana-pro/scripts/generate_image.py --prompt "your image description" --filename "output-name.png" [--resolution 1K|2K|4K] [--api-key KEY]

编辑 existing image:

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

Important: Always run 从 用户's current working directory 所以 images saved 在哪里 用户 working, 不 在...中 skill directory.

默认 Workflow (draft → iterate → final)

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

  • Draft (1K): quick feedback 循环
- uv run ~/.codex/skills/nano-banana-pro/scripts/generate_image.py --prompt "" --filename "yyyy-mm-dd-hh-mm-ss-draft.png" --resolution 1K
  • Iterate: adjust prompt 在...中 small diffs; keep filename 新的 per run
- 如果 editing: keep 相同 --输入框-image 对于 every iteration until 您’re happy.
  • Final (4K): 仅 当...时 prompt locked
- uv run ~/.codex/skills/nano-banana-pro/scripts/generate_image.py --prompt "" --filename "yyyy-mm-dd-hh-mm-ss-final.png" --resolution 4K

Resolution Options

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

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

Map user requests to API parameters:

  • 否 mention 的 resolution → 1K
  • "low resolution", "1080", "1080p", "1K" → 1K
  • "2K", "2048", "normal", "medium resolution" → 2K
  • "high resolution", "high-res", "hi-res", "4K", "ultra" → 4K

API 键

The script checks for API key in this order:

  • --api-键 argument (使用 如果 用户 provided 键 在...中 chat)
  • GEMINI_API_KEY environment 变量

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

Preflight + Common Failures (fast fixes)

  • Preflight:
- command -v uv (必须 exist) - test -n \"$GEMINI_API_KEY\" (或 pass --api-键) - 如果 editing: test -f \"path/到/输入框.png\"

  • Common failures:
- 错误: 否 API 键 provided. → 设置 GEMINI_API_KEY 或 pass --api-键 - 错误 loading 输入框 image: → wrong path / unreadable file; 验证 --输入框-image points 到 real image - “quota/权限/403” 样式 API errors → wrong 键, 否 access, 或 quota exceeded; try 不同 键/账户

Filename Generation

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

格式: {时间戳}-{descriptive-name}.png

  • 时间戳: Current 日期/时间 在...中 格式 yyyy-mm-dd-hh-mm-ss (24-hour 格式)
  • Name: Descriptive lowercase text 带有 hyphens
  • Keep descriptive part concise (1-5 words typically)
  • 使用 context 从 用户's prompt 或 conversation
  • 如果 unclear, 使用 random identifier (e.g., x9k2, a7b3)

Examples:

  • Prompt " serene Japanese garden" → 2025-11-23-14-23-05-japanese-garden.png
  • Prompt "sunset 在...上 mountains" → 2025-11-23-15-30-12-sunset-mountains.png
  • Prompt "创建 image 的 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:

  • Check 如果 它们 provide image path 或 reference image 在...中 current directory
  • 使用 --输入框-image parameter 带有 path 到 image
  • prompt 应该 contain editing instructions (e.g., "使 sky 更多 dramatic", "移除 person", "更改 到 cartoon 样式")
  • Common editing tasks: 添加/移除 elements, 更改 样式, adjust colors, blur background, etc.

Prompt Handling

对于 generation: Pass 用户's image description 作为- 到 --prompt. 仅 rework 如果 clearly insufficient.

对于 editing: Pass editing instructions 在...中 --prompt (e.g., "添加 rainbow 在...中 sky", "使 look 点赞 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 模板:
- “创建 image 的: . 样式: <样式>. Composition: . Lighting: . Background: . Color palette: . Avoid: <列表>.”

  • Editing 模板 (preserve everything 否则):
- “更改 仅: . Keep identical: subject, composition/crop, pose, lighting, color palette, background, text, 和 overall 样式. 做 不 添加 新的 objects. 如果 text exists, keep unchanged.”

输出

  • Saves PNG 到 current directory (或 specified path 如果 filename includes directory)
  • Script outputs 满 path 到 generated image
  • 做 不 读取 image back - 只是 inform 用户 的 saved path

Examples

Generate 新的 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

编辑 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