Agent Skillsopensquilla/opensquilla › nano-banana-pro

nano-banana-pro

GitHub

通过OpenRouter调用Gemini模型生成或编辑单张PNG图像。支持文生图及基于输入图像的编辑,可配置比例、分辨率及备用模型,适用于插画、概念设计及产品渲染等场景。

src/opensquilla/skills/bundled/nano-banana-pro/SKILL.md opensquilla/opensquilla

Trigger Scenarios

用户请求AI图像生成 用户请求插画或概念艺术设计 用户请求产品渲染图 用户希望修改现有图片

Install

npx skills add opensquilla/opensquilla --skill nano-banana-pro -g -y
More Options

Non-standard path

npx skills add https://github.com/opensquilla/opensquilla/tree/main/src/opensquilla/skills/bundled/nano-banana-pro -g -y

Use without installing

npx skills use opensquilla/opensquilla@nano-banana-pro

指定 Agent (Claude Code)

npx skills add opensquilla/opensquilla --skill nano-banana-pro -a claude-code -g -y

安装 repo 全部 skill

npx skills add opensquilla/opensquilla --all -g -y

预览 repo 内 skill

npx skills add opensquilla/opensquilla --list

SKILL.md

Frontmatter
{
    "name": "nano-banana-pro",
    "metadata": {
        "opensquilla": {
            "risk": "medium",
            "requires": {
                "envAny": [
                    "OPENROUTER_API_KEY"
                ],
                "anyBins": [
                    "python",
                    "python3"
                ]
            },
            "capabilities": [
                "network-read",
                "filesystem-write"
            ]
        }
    },
    "entrypoint": {
        "args": [
            "--prompt",
            "{{ with.prompt }}",
            "--filename",
            "{{ with.filename }}",
            "--aspect-ratio",
            "{{ with.aspect_ratio | default('1:1') }}",
            "--image-size",
            "{{ with.image_size | default('1K') }}",
            "--model",
            "{{ with.model | default('google\/gemini-3.1-flash-image-preview') }}",
            "--max-retries",
            "{{ with.max_retries | default(0) }}",
            "--fallback-model",
            "{{ with.fallback_model | default('') }}",
            "--placeholder-on-fail",
            "{{ with.placeholder_on_fail | default('no') }}"
        ],
        "parse": "text",
        "command": "python {baseDir}\/scripts\/generate_image.py",
        "timeout": 600
    },
    "provenance": {
        "origin": "clawhub-mit0",
        "license": "MIT-0",
        "upstream_url": "https:\/\/clawhub.ai\/steipete\/nano-banana-pro",
        "maintained_by": "OpenSquilla",
        "modifications": "Rewired from Google Gemini SDK to OpenRouter \/v1\/chat\/completions; pure-stdlib HTTP client.",
        "upstream_version": "1.0.1"
    },
    "description": "Generate or edit a single image via OpenRouter (google\/gemini-3.1-flash-image-preview by default). Accepts a text prompt and optional --input-image for image-to-image editing. Trigger when the user asks for an AI image, illustration, concept art, product render, or wants to modify an existing image."
}

nano-banana-pro — single-image generator via OpenRouter

Generates one PNG from a text prompt (optionally seeded with an input image for editing). Used by meta-short-drama for per-shot first-frame generation, but standalone for any single-image request.

Inputs (with:)

key required default notes
prompt yes Plain English prompt. Append --ar 9:16 etc. as text.
filename yes Output path. Relative resolves against process cwd.
aspect_ratio no 1:1 One of 1:1, 3:2, 2:3, 4:3, 3:4, 16:9, 9:16.
image_size no 1K 1K, 2K, 4K. Higher = slower + costlier.
model no google/gemini-3.1-flash-image-preview Any OpenRouter image-capable model.
max_retries no 0 Extra retries on the primary model before moving on to fallback_model.
fallback_model no "" Tried ONCE after the primary exhausts retries. Empty disables it. Common pick: google/gemini-3-pro-image-preview.
placeholder_on_fail no no yes / no. When every model refuses, write a 720x1280 solid-colour PNG with a "Scene placeholder" label so a downstream merge step still has a file in this slot.

To pass an input image for edit mode, invoke the script directly with --input-image PATH. The meta-skill engine does not route input images through with: by convention; for edit workflows call the script.

Auth

API-key resolution order (first hit wins):

  1. --api-key CLI argument (rarely used; meta-skills don't pass it)
  2. OPENROUTER_API_KEY environment variable (gateway injects from .env)
  3. OPENSQUILLA_LLM_API_KEY environment variable, only when the effective OpenSquilla LLM provider resolves to openrouter.
  4. llm.api_key or llm.api_key_env from the selected OpenSquilla TOML config file. Config discovery matches GatewayConfig.load: explicit OPENSQUILLA_GATEWAY_CONFIG_PATH first; otherwise ./opensquilla.toml, then default_opensquilla_home()/config.toml. OPENSQUILLA_STATE_DIR changes default_opensquilla_home(), so a state-dir profile does not fall through to ~/.opensquilla. Config-file credentials are consumed only when the selected config's llm.provider is openrouter or omitted.

No Google Gemini key needed — OpenRouter routes the request to the Gemini image model on the user's behalf.

Output

Prints the absolute path of the saved PNG on stdout. Non-zero exit on any error; stderr carries the diagnostic.

Cost / latency

  • 1K ~ 4-8s
  • 2K ~ 8-15s
  • 4K ~ 20-40s
  • Use 1K for draft, 4K only when the prompt is locked.

Common failures

  • no OpenRouter API key found → set OPENROUTER_API_KEY, pass --api-key, or configure [llm] provider = "openrouter" with api_key / api_key_env in the selected OpenSquilla config.
  • OpenRouter returned no image → the model rejected the prompt (content moderation or unsupported request). Rewrite prompt; check IP-safety rules in ai-video-script.
  • OpenRouter HTTP 402 / 429 → out of credits / rate-limited.

Version History

  • 7f72a32 Current 2026-07-05 18:39

Same Skill Collection

src/opensquilla/skills/bundled/advanced-dubbing-studio/SKILL.md
src/opensquilla/skills/bundled/ai-video-script/SKILL.md
src/opensquilla/skills/bundled/audio-cog/SKILL.md
src/opensquilla/skills/bundled/awesome-webpage-image-download/SKILL.md
src/opensquilla/skills/bundled/awesome-webpage-research/SKILL.md
src/opensquilla/skills/bundled/AwesomeWebpageMetaSkill/SKILL.md
src/opensquilla/skills/bundled/cron/SKILL.md
src/opensquilla/skills/bundled/docx/SKILL.md
src/opensquilla/skills/bundled/filesystem/SKILL.md
src/opensquilla/skills/bundled/git-diff/SKILL.md
src/opensquilla/skills/bundled/github/SKILL.md
src/opensquilla/skills/bundled/history-explorer/SKILL.md
src/opensquilla/skills/bundled/html-coder/SKILL.md
src/opensquilla/skills/bundled/html-to-pdf/SKILL.md
src/opensquilla/skills/bundled/http-fetch/SKILL.md
src/opensquilla/skills/bundled/latex-compile/SKILL.md
src/opensquilla/skills/bundled/memory/SKILL.md
src/opensquilla/skills/bundled/music-and-singing-studio/SKILL.md
src/opensquilla/skills/bundled/nano-banana-pro-openrouter/SKILL.md
src/opensquilla/skills/bundled/nano-pdf/SKILL.md
src/opensquilla/skills/bundled/openrouter-video-generator/SKILL.md
src/opensquilla/skills/bundled/paper-abstract-author/SKILL.md
src/opensquilla/skills/bundled/paper-citation-planner/SKILL.md
src/opensquilla/skills/bundled/paper-experiment-stub/SKILL.md
src/opensquilla/skills/bundled/paper-outline-author/SKILL.md
src/opensquilla/skills/bundled/paper-preference-planner/SKILL.md
src/opensquilla/skills/bundled/paper-refbib-stub/SKILL.md
src/opensquilla/skills/bundled/paper-revision-author/SKILL.md
src/opensquilla/skills/bundled/paper-section-author/SKILL.md
src/opensquilla/skills/bundled/paper-source-curator/SKILL.md
src/opensquilla/skills/bundled/pptx/SKILL.md
src/opensquilla/skills/bundled/seedance-2-prompt/SKILL.md
src/opensquilla/skills/bundled/skill-creator-linter/SKILL.md
src/opensquilla/skills/bundled/skill-creator-proposals/SKILL.md
src/opensquilla/skills/bundled/skill-creator-smoke-test/SKILL.md
src/opensquilla/skills/bundled/srt-from-script/SKILL.md
src/opensquilla/skills/bundled/stack-trace-generic-probe/SKILL.md
src/opensquilla/skills/bundled/stack-trace-go-probe/SKILL.md
src/opensquilla/skills/bundled/stack-trace-js-probe/SKILL.md
src/opensquilla/skills/bundled/stack-trace-python-probe/SKILL.md
src/opensquilla/skills/bundled/stack-trace-rust-probe/SKILL.md
src/opensquilla/skills/bundled/subtitle-burner/SKILL.md
src/opensquilla/skills/bundled/swe-bench/SKILL.md
src/opensquilla/skills/bundled/text-file-read/SKILL.md
src/opensquilla/skills/bundled/title-card-image/SKILL.md
src/opensquilla/skills/bundled/video-merger/SKILL.md
src/opensquilla/skills/bundled/video-still-animator/SKILL.md
src/opensquilla/skills/bundled/voice-clone-lab/SKILL.md
src/opensquilla/skills/bundled/voice-conversion-studio/SKILL.md
src/opensquilla/skills/bundled/voiceover-studio/SKILL.md
src/opensquilla/skills/bundled/weather/SKILL.md
src/opensquilla/skills/bundled/web-search/SKILL.md
src/opensquilla/skills/bundled/xlsx/SKILL.md
src/opensquilla/skills/exp/meta-arxiv-daily-digest-deck/SKILL.md
src/opensquilla/skills/exp/meta-codereview-current-diff/SKILL.md
src/opensquilla/skills/exp/meta-compliance-audit-bundle/SKILL.md
src/opensquilla/skills/exp/meta-diagram-triangulation/SKILL.md
src/opensquilla/skills/exp/meta-github-pr-watch-digest/SKILL.md
src/opensquilla/skills/exp/meta-issue-to-pr-autopilot/SKILL.md
src/opensquilla/skills/exp/meta-knowledge-base-bootstrap/SKILL.md
src/opensquilla/skills/exp/meta-migration-assistant/SKILL.md
src/opensquilla/skills/exp/meta-multi-format-export-pack/SKILL.md
src/opensquilla/skills/exp/meta-pdf-intelligence/SKILL.md
src/opensquilla/skills/exp/meta-pdf-reformat-pipeline/SKILL.md
src/opensquilla/skills/exp/meta-pre-commit-quality-gate/SKILL.md
src/opensquilla/skills/exp/meta-scheduled-morning-digest/SKILL.md
src/opensquilla/skills/exp/meta-security-review-bundle/SKILL.md
src/opensquilla/skills/exp/meta-spreadsheet-insight/SKILL.md
src/opensquilla/skills/exp/meta-stack-trace-investigator/SKILL.md
src/opensquilla/skills/exp/meta-travel-planner/SKILL.md
src/opensquilla/skills/exp/meta-web-to-pdf-briefing/SKILL.md
tests/_fixtures/meta-paper-write-handwritten.SKILL.md
src/opensquilla/skills/bundled/code-task/SKILL.md
src/opensquilla/skills/bundled/deep-research/SKILL.md
src/opensquilla/skills/bundled/meta-kid-project-planner/SKILL.md
src/opensquilla/skills/bundled/meta-paper-write/SKILL.md
src/opensquilla/skills/bundled/meta-short-drama/SKILL.md
src/opensquilla/skills/bundled/meta-skill-creator/SKILL.md
src/opensquilla/skills/bundled/multi-search-engine/SKILL.md
src/opensquilla/skills/bundled/pdf-toolkit/SKILL.md
src/opensquilla/skills/bundled/skill-creator/SKILL.md
src/opensquilla/skills/bundled/sub-agent/SKILL.md
src/opensquilla/skills/bundled/summarize/SKILL.md
src/opensquilla/skills/bundled/tmux/SKILL.md
src/opensquilla/skills/exp/meta-long-running-build-watchdog/SKILL.md
src/opensquilla/skills/bundled/paper-plot-stub/SKILL.md
src/opensquilla/skills/exp/meta-content-publish-pipeline/SKILL.md
src/opensquilla/skills/exp/meta-home-it-rescue/SKILL.md
src/opensquilla/skills/exp/meta-meeting-to-workflow/SKILL.md
src/opensquilla/skills/exp/meta-research-to-slide-deck/SKILL.md
src/opensquilla/skills/exp/meta-sales-lead-researcher/SKILL.md

Metadata

Files
0
Version
7f72a32
Hash
735c2d02
Indexed
2026-07-05 18:39

trang chủ - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-09 02:32
浙ICP备14020137号-1 $bản đồ khách truy cập$