{"skill":{"slug":"nano-banana-v3","displayName":"Nano banana","summary":"Generate/edit images with Nano Banana Pro (Gemini 3 Pro Image). Use for image create/modify requests incl. edits. Supports text-to-image + image-to-image; 1K...","description":"---\nname: nano-banana-pro\ndescription: Generate/edit images with Nano Banana Pro (Gemini 3 Pro Image). Use for image create/modify requests incl. edits. Supports text-to-image + image-to-image; 1K/2K/4K; use --input-image.\n---\n\n# Nano Banana Pro Image Generation & Editing\n\nGenerate new images or edit existing ones using Google's Nano Banana Pro API (Gemini 3 Pro Image).\n\n## Usage\n\nRun the script using absolute path (do NOT cd to skill directory first):\n\n**Generate new image:**\n```bash\nuv 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]\n```\n\n**Edit existing image:**\n```bash\nuv 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]\n```\n\n**Important:** Always run from the user's current working directory so images are saved where the user is working, not in the skill directory.\n\n## Default Workflow (draft → iterate → final)\n\nGoal: fast iteration without burning time on 4K until the prompt is correct.\n\n- Draft (1K): quick feedback loop\n  - `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`\n- Iterate: adjust prompt in small diffs; keep filename new per run\n  - If editing: keep the same `--input-image` for every iteration until you’re happy.\n- Final (4K): only when prompt is locked\n  - `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`\n\n## Resolution Options\n\nThe Gemini 3 Pro Image API supports three resolutions (uppercase K required):\n\n- **1K** (default) - ~1024px resolution\n- **2K** - ~2048px resolution\n- **4K** - ~4096px resolution\n\nMap user requests to API parameters:\n- No mention of resolution → `1K`\n- \"low resolution\", \"1080\", \"1080p\", \"1K\" → `1K`\n- \"2K\", \"2048\", \"normal\", \"medium resolution\" → `2K`\n- \"high resolution\", \"high-res\", \"hi-res\", \"4K\", \"ultra\" → `4K`\n\n## API Key\n\nThe script checks for API key in this order:\n1. `--api-key` argument (use if user provided key in chat)\n2. `GEMINI_API_KEY` environment variable\n\nIf neither is available, the script exits with an error message.\n\n## Preflight + Common Failures (fast fixes)\n\n- Preflight:\n  - `command -v uv` (must exist)\n  - `test -n \\\"$GEMINI_API_KEY\\\"` (or pass `--api-key`)\n  - If editing: `test -f \\\"path/to/input.png\\\"`\n\n- Common failures:\n  - `Error: No API key provided.` → set `GEMINI_API_KEY` or pass `--api-key`\n  - `Error loading input image:` → wrong path / unreadable file; verify `--input-image` points to a real image\n  - “quota/permission/403” style API errors → wrong key, no access, or quota exceeded; try a different key/account\n\n## Filename Generation\n\nGenerate filenames with the pattern: `yyyy-mm-dd-hh-mm-ss-name.png`\n\n**Format:** `{timestamp}-{descriptive-name}.png`\n- Timestamp: Current date/time in format `yyyy-mm-dd-hh-mm-ss` (24-hour format)\n- Name: Descriptive lowercase text with hyphens\n- Keep the descriptive part concise (1-5 words typically)\n- Use context from user's prompt or conversation\n- If unclear, use random identifier (e.g., `x9k2`, `a7b3`)\n\nExamples:\n- Prompt \"A serene Japanese garden\" → `2025-11-23-14-23-05-japanese-garden.png`\n- Prompt \"sunset over mountains\" → `2025-11-23-15-30-12-sunset-mountains.png`\n- Prompt \"create an image of a robot\" → `2025-11-23-16-45-33-robot.png`\n- Unclear context → `2025-11-23-17-12-48-x9k2.png`\n\n## Image Editing\n\nWhen the user wants to modify an existing image:\n1. Check if they provide an image path or reference an image in the current directory\n2. Use `--input-image` parameter with the path to the image\n3. The prompt should contain editing instructions (e.g., \"make the sky more dramatic\", \"remove the person\", \"change to cartoon style\")\n4. Common editing tasks: add/remove elements, change style, adjust colors, blur background, etc.\n\n## Prompt Handling\n\n**For generation:** Pass user's image description as-is to `--prompt`. Only rework if clearly insufficient.\n\n**For editing:** Pass editing instructions in `--prompt` (e.g., \"add a rainbow in the sky\", \"make it look like a watercolor painting\")\n\nPreserve user's creative intent in both cases.\n\n## Prompt Templates (high hit-rate)\n\nUse templates when the user is vague or when edits must be precise.\n\n- Generation template:\n  - “Create an image of: <subject>. Style: <style>. Composition: <camera/shot>. Lighting: <lighting>. Background: <background>. Color palette: <palette>. Avoid: <list>.”\n\n- Editing template (preserve everything else):\n  - “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.”\n\n## Output\n\n- Saves PNG to current directory (or specified path if filename includes directory)\n- Script outputs the full path to the generated image\n- **Do not read the image back** - just inform the user of the saved path\n\n## Examples\n\n**Generate new image:**\n```bash\nuv 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\n```\n\n**Edit existing image:**\n```bash\nuv 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\n```\n","tags":{"latest":"3.0.0"},"stats":{"comments":0,"downloads":183,"installsAllTime":0,"installsCurrent":0,"stars":0,"versions":1},"createdAt":1772062270177,"updatedAt":1778491644319},"latestVersion":{"version":"3.0.0","createdAt":1772062270177,"changelog":"nothing","license":null},"metadata":null,"owner":{"handle":"rmsscalez-blip","userId":"s179n625h72t0dbny2ddbezwyh88408n","displayName":"rmsscalez-blip","image":"https://avatars.githubusercontent.com/u/256500461?v=4"},"moderation":{"isSuspicious":false,"isMalwareBlocked":false,"verdict":"clean","reasonCodes":["review.llm_review"],"summary":"Review: review.llm_review","engineVersion":"v2.4.24","updatedAt":1779961061953}}