Use this skill when users ask to generate, edit, or compose images with Gemini Nano Banana 2, including text-to-image, image editing, multi-image composition, grounding, and output sizing/saving controls.
@google/genai) as the primary flow (multi-turn edits, grounding, advanced generationConfig).scripts/gemini-nanobanana-cli.js for quick single-turn generation/editing runs.curl; keep guidance in JS CLI/wrapper form.GEMINI_NANOBANANA_API_KEY with fallback GEMINI_API_KEY.gemini-3.1-flash-image-preview (allow env override via GEMINI_NANOBANANA_MODEL).minimal|low|medium|high), default High.--google-search when needed.nanobanana-output/, unless the prompt explicitly asks for another location.imageConfig.imageSize as string "512" in API calls (never numeric 512).references\image-generation-api.md for operational payload rules, model behavior, sizing, thinking, grounding, and limits.references\sources.md to verify source provenance and jump to upstream docs.After successful generation, always report results in this format:
✅ 圖片已產出JPEG/PNG), dimensions, file size<!-- githubclaw-artifacts: {"images":[{"branch":"{BRANCH}","path":"{relative_path}"}],"html":[]} -->Assuming GITHUB_REPO=test/baoclaw-5, BRANCH=issue-3:
✅ 圖片已產出

- 格式:JPEG · 1408×768 · 757 KB
<!-- githubclaw-artifacts: {"images":[{"branch":"issue-3","path":"issue-3/artifacts/4153431460/matcha-latte-01.jpg"}],"html":[]} -->
✅ 圖片已產出


- 圖 1:JPEG · 1408×768 · 703 KB
- 圖 2:JPEG · 1408×768 · 512 KB
<!-- githubclaw-artifacts: {"images":[{"branch":"issue-3","path":"issue-3/artifacts/4153431460/cute-puppy-01.jpg"},{"branch":"issue-3","path":"issue-3/artifacts/4153431460/cute-puppy-02.jpg"}],"html":[]} -->
githubclaw-artifacts metadata → downloads image via GitHub API → sends as photo.?raw=true ensures GitHub serves raw image bytes instead of the HTML file viewer.issue-N/; resolve the repo root first):
REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || echo "../..") then
node "$REPO_ROOT/.agents/skills/gemini-nanobanana/scripts/gemini-nanobanana-cli.js" --prompt "..."-i/--image (up to 14).--google-search when prompt needs fresh web context.GEMINI_NANOBANANA_API_KEY / GEMINI_API_KEY) is injected by the workflow environment; do not hardcode it. The CLI reads it automatically from the environment.