nano-banana-pro by intellectronica/agent-skills
npx skills add https://github.com/intellectronica/agent-skills --skill nano-banana-pro使用 Google 的 Nano Banana Pro API(Gemini 3 Pro Image)生成新图像或编辑现有图像。
使用绝对路径运行脚本(不要先切换到技能目录):
生成新图像:
uv run ~/.claude/skills/nano-banana-pro/scripts/generate_image.py --prompt "your image description" --filename "output-name.png" [--resolution 1K|2K|4K] [--api-key KEY]
编辑现有图像:
uv run ~/.claude/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]
重要提示: 始终从用户的当前工作目录运行,以便图像保存在用户工作的地方,而不是技能目录中。
Gemini 3 Pro Image API 支持三种分辨率(必须使用大写 K):
将用户请求映射到 API 参数:
1K广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
1K2K4K脚本按以下顺序检查 API 密钥:
--api-key 参数(如果用户在聊天中提供了密钥则使用)GEMINI_API_KEY 环境变量如果两者都不可用,脚本将退出并显示错误信息。
使用以下模式生成文件名:yyyy-mm-dd-hh-mm-ss-name.png
格式: {时间戳}-{描述性名称}.png
yyyy-mm-dd-hh-mm-ss(24 小时制)x9k2、a7b3)示例:
2025-11-23-14-23-05-japanese-garden.png2025-11-23-15-30-12-sunset-mountains.png2025-11-23-16-45-33-robot.png2025-11-23-17-12-48-x9k2.png当用户想要修改现有图像时:
--input-image 参数并指定图像路径对于生成: 将用户的图像描述原样传递给 --prompt。仅在明显不足时进行改写。
对于编辑: 在 --prompt 中传递编辑说明(例如 "在天空中添加一道彩虹"、"使其看起来像水彩画")
在两种情况下都要保留用户的创作意图。
生成新图像:
uv run ~/.claude/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
编辑现有图像:
uv run ~/.claude/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
每周安装量
1.5K
代码仓库
GitHub 星标数
228
首次出现
Jan 20, 2026
安全审计
安装于
opencode1.3K
gemini-cli1.3K
codex1.3K
github-copilot1.2K
cursor1.1K
amp1.0K
Generate new images or edit existing ones using Google's Nano Banana Pro API (Gemini 3 Pro Image).
Run the script using absolute path (do NOT cd to skill directory first):
Generate new image:
uv run ~/.claude/skills/nano-banana-pro/scripts/generate_image.py --prompt "your image description" --filename "output-name.png" [--resolution 1K|2K|4K] [--api-key KEY]
Edit existing image:
uv run ~/.claude/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 from the user's current working directory so images are saved where the user is working, not in the skill directory.
The Gemini 3 Pro Image API supports three resolutions (uppercase K required):
Map user requests to API parameters:
1K1K2K4KThe script checks for API key in this order:
--api-key argument (use if user provided key in chat)GEMINI_API_KEY environment variableIf neither is available, the script exits with an error message.
Generate filenames with the pattern: yyyy-mm-dd-hh-mm-ss-name.png
Format: {timestamp}-{descriptive-name}.png
yyyy-mm-dd-hh-mm-ss (24-hour format)x9k2, a7b3)Examples:
2025-11-23-14-23-05-japanese-garden.png2025-11-23-15-30-12-sunset-mountains.png2025-11-23-16-45-33-robot.png2025-11-23-17-12-48-x9k2.pngWhen the user wants to modify an existing image:
--input-image parameter with the path to the imageFor 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.
Generate new image:
uv run ~/.claude/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 ~/.claude/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
Weekly Installs
1.5K
Repository
GitHub Stars
228
First Seen
Jan 20, 2026
Security Audits
Gen Agent Trust HubFailSocketPassSnykFail
Installed on
opencode1.3K
gemini-cli1.3K
codex1.3K
github-copilot1.2K
cursor1.1K
amp1.0K
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
102,200 周安装