image-edit
Edit images on RunComfy — this skill is a smart router that matches the user's intent to the right edit model in the RunComfy catalog. Picks Nano Banana Edit (batch up to 20, identity-preserving default), OpenAI GPT Image 2 Edit (multilingual in-image text rewrite, multi-ref composition, layout precision), Flux Kontext Pro (single-ref high-fidelity local edit), or Z-Image Turbo Inpaint (mask-driven precise region edit). Bundles each model's documented prompting patterns so the skill gets sharper edits without burning iterations on the wrong model. Calls `runcomfy run <vendor>/<model>/edit` through the local RunComfy CLI. Triggers on "image edit", "edit image", "image-to-image", "i2i", "swap background", "remove object", "rewrite headline", or any explicit ask to edit a single or batch of images.
1How It Works & Mechanism
Four-model image editing intent routing (family router type): Batch identity preservation → Nano Banana Edit (default), multilingual text rewriting/multi-reference composition → GPT Image 2 Edit, single-reference high-fidelity local editing → Flux Kontext Pro, mask-driven regional replacement → Z-Image Turbo Inpaint; the agent reads the table to classify intent and lands on the corresponding route subsection.
| User intent | Model | Why | |---|---|---| | Batch edit 1–20 images consistently (SKU gallery, A/B variants) | **Nano Banana Edit** | Up to 20 input images per call; locked aspect/resolution for series |
Route 1 (Nano Banana Edit) shares its source content with the single-model skill nano-banana-edit: identical preservation-first syntax, cyberpunk/AURA examples, and image_urls 1–20 schema—the router integrates the single-model skill as the default route.
**Model**: `google/nano-banana-2/edit`
Route 2 (GPT Image 2 Edit) focuses on multilingual in-image text and multi-reference composition: images array (≤10, first image primary), 4 fixed sizes, numbered refs syntax, verbatim quoting + explicit script naming (Japanese kana/Cyrillic/Arabic right-to-left).
| `images` | string[] | yes | — | **Up to 10** HTTPS URLs. First is primary; rest are auxiliary. |
Route 3/4 cover protocol differences at two extremes: 'single-reference precise editing' vs. 'mask-driven inpainting': Flux Kontext uses a single image field + a single declarative instruction; Z-Image Inpaint additionally accepts mask_image (grayscale convention: white=inpaint/black=preserve) + strength (tiered semantics across 0.3–1.0) + control_scale.
| `mask_image` | string | yes | **Grayscale mask URL** (white = inpaint, black = preserve). |
Brand referral boundaries: When a user specifies a particular model, hand off to gpt-image-edit / flux-kontext / nano-banana-edit brand skills for more complete handling; mixing multiple routes in a single request is prohibited.
- **Brand-specific overrides** — if the user named a specific model, route to the corresponding brand skill (`gpt-image-edit`, `flux-kontext`, `nano-banana-edit`) for fuller treatment.
Execution delegated to runcomfy CLI + cloud inference: `runcomfy run <model_id>` + matching JSON body; the CLI submits to the Model API, polls for status, and downloads artifacts to --output-dir.
The skill picks one of Nano Banana Edit / GPT Image 2 Edit / Flux Kontext Pro / Z-Image Turbo Inpaint based on user intent and invokes `runcomfy run <model_id>` with the matching JSON body.
2Core Capabilities
3External Dependencies
| Kind | Dependency / Endpoint |
|---|---|
| cli | runcomfy(@runcomfy/cli 官方 CLI) |
| package | @runcomfy/cli(npm 全局安装) |
| api | 四个云端编辑模型端点(经 runcomfy CLI + RunComfy Model API) |
| network | RunComfy Model API(请求提交)与生成结果下载 |
| network | 用户提供的源图/参考图/mask URL——由 RunComfy 模型服务器抓取 |
| network | RunComfy 模型页 / 文档站(引用链接) |
4Recommended Governance & Evidence
- 网络端点: Declares external network access: model-api.runcomfy.net — Edit request submission (the only submission channel declared in docs, via runcomfy CLI)
- 本地工作目录: File I/O and artifact output: CLI downloads generated results to the local directory specified by --output-dir (path determined by caller)
- SKILL.md: Declares invocation of host CLI interpreter or external runtime environment
5Second-Pass Verification
- [ok] 四个 route 模型 ID 与调用示例、schema 一致 — 四条 Route 的 **Model** 行与各自 `runcomfy run` 示例成对出现:google/nano-banana-2/edit、openai/gpt-image-2/edit、blackforestlabs/flux-1-kontext/pro/edit、tongyi-mai/z-image/turbo/inpainting,无悬空引用。
- [ok] Route 1 与 nano-banana-edit 技能同源 — preservation-first 话术、cyberpunk/AURA 示例、schema 字段与 nano-banana-edit/SKILL.md 逐字一致;此处略去 safety_tolerance/limit_generations 属有意精简,非错误。
- [ok] 品牌 override 目标(gpt-image-edit、flux-kontext、nano-banana-edit)可达性 — 三个目录在仓库根真实存在;Z-Image 无对应品牌技能且未被列入 override,文档未作虚假承诺。
- [ok] Z-Image mask 工作流字段与纪律自洽 — mask_image 必填、strength 0.3–1.0 分档语义、control_scale 0.6–0.9 在 schema 与 prompting tips 两处数字一致。
- [unlocatable] SKILL.md 对 CLI 行为的断言(token 0600、2 GiB、无 shell 展开) — CLI 源码不在本仓库,仅文档自述,无法独立证实。
- [unlocatable] GPT Image 2 / Z-Image 的能力宣称(Strongest in class for multilingual typography 等) — 路由表 Why 列为站外比较性宣称,pin 内无评测证据可复核。
- [discrepancy] 身份/安装链接一致性 — SKILL.md 安装与 GitHub 链接指向 agentspace-so/runcomfy-skills,被 pin 镜像为 prime-skills/runcomfy-agent-skills——来源标识不一致(发布身份漂移,非代码缺陷)。
6Verdict & Scenarios
173c3a258c664f4a…