Agent Skillsopensquilla/opensquilla › nano-banana-pro-openrouter

nano-banana-pro-openrouter

GitHub

OpenRouter图像生成适配器,用于Nano Banana Pro。作为meta-skill执行器,接收结构化或纯文本输入,调用API生成图片并保存,输出IMAGE_READY记录,支持断点续传与错误处理,确保凭证安全及确定性行为。

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

Trigger Scenarios

需要生成本地图像文件 Meta-skill流程中需要结构化IMAGE_READY记录

Install

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

Non-standard path

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

Use without installing

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

指定 Agent (Claude Code)

npx skills add opensquilla/opensquilla --skill nano-banana-pro-openrouter -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-openrouter",
    "homepage": "https:\/\/clawhub.ai\/skills\/nano-banana-pro-openrouter",
    "metadata": {
        "opensquilla": {
            "risk": "high",
            "requires": {
                "env": [],
                "bins": [
                    "python3"
                ],
                "config": [
                    "awesome_webpage.openrouter.models.image_generation",
                    "awesome_webpage.output_dir"
                ]
            },
            "capabilities": [
                "network-write",
                "filesystem-write"
            ]
        }
    },
    "entrypoint": {
        "env": {
            "OPENSQUILLA_META_CAPABILITY_LEASE_REQUIRED": "1"
        },
        "args": [
            "--model",
            "{{ with.model | default('google\/gemini-3-pro-image-preview') }}",
            "--output-dir",
            "{{ with.output_dir }}",
            "--filename",
            "{{ with.filename | default('image.png') }}",
            "--resolution",
            "{{ with.resolution | default('1K') }}",
            "--max-images",
            "{{ with.max_images | default('6') }}",
            "--local-path-prefix",
            "{{ with.local_path_prefix | default('project\/assets\/images') }}"
        ],
        "parse": "text",
        "stdin": "{{ with.payload | default(with.prompt | default(inputs.user_message)) }}",
        "command": "python {baseDir}\/scripts\/openrouter_image.py",
        "timeout": 300
    },
    "provenance": {
        "origin": "clawhub-mit0",
        "license": "MIT-0",
        "upstream_url": "https:\/\/clawhub.ai\/skills\/nano-banana-pro-openrouter",
        "maintained_by": "OpenSquilla"
    },
    "description": "Deterministic OpenRouter image generation adapter for Nano Banana Pro \/ Gemini image models. Use as skill_exec when a meta-skill needs local image files and structured IMAGE_READY records without spawning an LLM agent.",
    "description_zh": "针对Nano Banana Pro \/ Gemini图像模型的确定性OpenRouter图像生成适配器。当元技能需要本地图片文件和结构化的IMAGE_READY记录且不想启动LLM代理时,作为skill_exec使用。",
    "user-invocable": false,
    "disable-model-invocation": true
}

Nano Banana Pro OpenRouter Adapter

This skill is a deterministic adapter around OpenRouter image generation. It is intended for meta-skill skill_exec use, not as an open-ended agent surface.

Contract

  • During MetaSkill execution, accepts only the parent-resolved, process-local provider lease. The credential, endpoint, and proxy never enter with, argv, the plan, or persisted run data. Direct standalone CLI use may still provide OPENROUTER_API_KEY.
  • Does not read .env files, prompt for credentials, print credentials, or write credentials to disk.
  • Uses only the model, base URL, output directory, and local path prefix passed by the caller.
  • Saves generated image bytes under the supplied output directory.
  • Emits one IMAGE_READY: JSON line per saved image.
  • A missing/invalid required MetaSkill lease exits 78 before any provider submission. Provider failures after submission emit IMAGE_GENERATION_FAILED with exit 0 so the webpage can bind a replacement slot without auto-replay.

Meta-Skill Payload Mode

When stdin is JSON containing media_slots, image_slots, slots, or page_outline, the adapter generates image slots and preserves already downloaded images. Structured slots are preferred over free-form outline text:

{
  "requirement_framing": "...",
  "media_slots": {"slots": [{"slot_id": "hero-visual", "modality": "image"}]},
  "page_outline": "...",
  "image_download": "...",
  "include_images": "YES",
  "visual_style": "..."
}

Existing IMAGE_READY: records in image_download are preserved. If IMAGE_DOWNLOAD_INCOMPLETE: lists unfilled_slot_ids, only those slots are generated. If the caller requested images but both structured slots and outline slot parsing are empty, the adapter synthesizes minimal webpage-safe image slots from the brief instead of emitting no_image_slots_to_generate.

Plain Prompt Mode

When stdin is plain text, the adapter generates one image using that text as the prompt and the --filename stem as the slot_id.

Version History

  • 95673be Current 2026-08-07 00:58

    强化MetaSkill契约:凭证不再通过with注入而是使用进程局部租赁;缺失/无效租约时退出码78;提供商失败后保持退出0以允许页面绑定替换槽位而非自动重放。

  • f662be3 2026-07-31 11:48
  • 7f72a32 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/meta-kid-project-planner/SKILL.md
src/opensquilla/skills/bundled/multi-search-engine/SKILL.md
src/opensquilla/skills/bundled/music-and-singing-studio/SKILL.md
src/opensquilla/skills/bundled/nano-banana-pro/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-artifact-runtime/SKILL.md
src/opensquilla/skills/bundled/paper-citation-integrity-gate/SKILL.md
src/opensquilla/skills/bundled/paper-citation-planner/SKILL.md
src/opensquilla/skills/bundled/paper-delivery-summary/SKILL.md
src/opensquilla/skills/bundled/paper-experiment-stub/SKILL.md
src/opensquilla/skills/bundled/paper-latex-sanitizer/SKILL.md
src/opensquilla/skills/bundled/paper-length-gate/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-quality-gate/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/paper-source-readiness-gate/SKILL.md
src/opensquilla/skills/bundled/pptx/SKILL.md
src/opensquilla/skills/bundled/seedance-2-prompt/SKILL.md
src/opensquilla/skills/bundled/short-drama-delivery-audit/SKILL.md
src/opensquilla/skills/bundled/short-drama-review-normalizer/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

Metadata

Files
0
Version
95673be
Hash
dedbb140
Indexed
2026-07-05 18:39

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-08 06:39
浙ICP备14020137号-1 $Carte des visiteurs$