nano-banana-pro-openrouter
GitHubOpenRouter图像生成适配器,用于Nano Banana Pro。作为meta-skill执行器,接收结构化或纯文本输入,调用API生成图片并保存,输出IMAGE_READY记录,支持断点续传与错误处理,确保凭证安全及确定性行为。
Trigger Scenarios
Install
npx skills add opensquilla/opensquilla --skill nano-banana-pro-openrouter -g -y
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 provideOPENROUTER_API_KEY. - Does not read
.envfiles, 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_FAILEDwith 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


