nano-banana-pro-openrouter — GitHub Copilot skill
Generates and edits images through OpenRouter with Gemini 3 Pro Image. Use it for text-to-image work, file edits, and multi-image compositions.
npx skills add github/awesome-copilot --skill nano-banana-pro-openrouterWhat nano-banana-pro-openrouter does
This skill runs scripts/generate_image.py with uv and sends requests to google/gemini-3-pro-image-preview. It can create an image from a prompt, alter one source image, or combine several files into one composition. Output supports 1K, 2K, and 4K; the default is 1K.
You can pass up to 3 files by repeating --input-image. --filename accepts relative and absolute paths, while multiple returned images get -1, -2, and similar suffixes. The script prints each saved result as MEDIA: .
The skill requires uv and OPENROUTER_API_KEY. Its image-generation behaviour can be adjusted in assets/SYSTEM_TEMPLATE. Install it if your image workflow already uses OpenRouter; it will not run without an API key.
What it helps with
- generate an image from a text prompt
- replace a background or detail in an input image
- combine up to
3images into one portrait - save output to a relative or absolute path
- choose
1K,2K, or4Koutput
Example prompts for the agent
- Create an image of snow-capped mountains at sunset and save it as `sunset.png`.
- Replace the sky in `input.jpg` with an aurora and write the result to `aurora.png`.
- Combine `face1.jpg` and `face2.jpg` into a studio portrait at `2K` resolution.
How to install nano-banana-pro-openrouter
1Skills CLI (Vercel)
npx skills add github/awesome-copilot --skill nano-banana-pro-openrouter2GitHub CLI
gh skill install github/awesome-copilot nano-banana-pro-openrouter3Manually: put the files in place
.github/skills/nano-banana-pro-openrouter/SKILL.md1Skills CLI (Vercel)
npx skills add github/awesome-copilot --skill nano-banana-pro-openrouter -a claude-code2Manually: put the files in place
~/.claude/skills/nano-banana-pro-openrouter/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/nano-banana-pro-openrouter/
Manually: put the files in place
.agents/skills/nano-banana-pro-openrouter/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/nano-banana-pro-openrouter/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
Platform CLI
gemini skills install https://github.com/github/awesome-copilot --path skills/nano-banana-pro-openrouterManually: put the files in place
.devin/skills/nano-banana-pro-openrouter/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set554
The whole set →Similar
Questions about nano-banana-pro-openrouter
How do I install nano-banana-pro-openrouter in GitHub Copilot?
Install the skill with npx skills add github/awesome-copilot --skill nano-banana-pro-openrouter. You can also use gh skill install github/awesome-copilot nano-banana-pro-openrouter.
What does nano-banana-pro-openrouter do?
It generates images through OpenRouter, edits one input image, and builds compositions from multiple images. It uses google/gemini-3-pro-image-preview for generation.
What does nano-banana-pro-openrouter need to run?
It requires uv and the OPENROUTER_API_KEY environment variable. The skill accepts up to 3 input images and supports 1K, 2K, and 4K output.
Source text
SKILL.md · MIT
---
name: nano-banana-pro-openrouter
description: 'Generate or edit images via OpenRouter with the Gemini 3 Pro Image model. Use for prompt-only image generation, image edits, and multi-image compositing; supports 1K/2K/4K output.'
metadata:
emoji: 🍌
requires:
bins:
- uv
env:
- OPENROUTER_API_KEY
primaryEnv: OPENROUTER_API_KEY
---
# Nano Banana Pro OpenRouter
## Overview
Generate or edit images with OpenRouter using the `google/gemini-3-pro-image-preview` model. Support prompt-only generation, single-image edits, and multi-image composition.
### Prompt-only generation
```
uv run {baseDir}/scripts/generate_image.py \
--prompt "A cinematic sunset over snow-capped mountains" \
--filename sunset.png
```
### Edit a single image
```
uv run {baseDir}/scripts/generate_image.py \
--prompt "Replace the sky with a dramatic aurora" \
--input-image input.jpg \
--filename aurora.png
```
### Compose multiple images
```
uv run {baseDir}/scripts/generate_image.py \
--prompt "Combine the subjects into a single studio portrait" \
--input-image face1.jpg \
--input-image face2.jpg \
--filename composite.png
```
## Resolution
- Use `--resolution` with `1K`, `2K`, or `4K`.
- Default is `1K` if not specified.
## System prompt customization
The skill reads an optional system prompt from `assets/SYSTEM_TEMPLATE`. This allows you to customize the image generation behavior without modifying code.
## Behavior and constraints
- Accept up to 3 input images via repeated `--input-image`.
- `--filename` accepts relative paths (saves to current directory) or absolute paths.
- If multiple images are returned, append `-1`, `-2`, etc. to the filename.
- Print `MEDIA: <path>` for each saved image. Do not read images back into the response.
## Troubleshooting
If the script exits non-zero, check stderr against these common blockers:
| Symptom | Resolution |
|---------|------------|
| `OPENROUTER_API_KEY is not set` | Ask the user to set it. PowerShell: `$env:OPENROUTER_API_KEY = "sk-or-..."` / bash: `export OPENROUTER_API_KEY="sk-or-..."` |
| `uv: command not found` or not recognized | macOS/Linux: <code>curl -LsSf https://astral.sh/uv/install.sh | sh</code>. Windows: <code>powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"</code>. Then restart the terminal. |
| `AuthenticationError` / HTTP 401 | Key is invalid or has no credits. Verify at <https://openrouter.ai/settings/keys>. |
For transient errors (HTTP 429, network timeouts), retry once after 30 seconds. Do not retry the same error more than twice — surface the issue to the user instead.
© github · MIT · github/awesome-copilot