Home / All Skills / Content & Media Creation / image-edit
Content & Media Creation · prime-skills/runcomfy-agent-skills

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.

L4 High-Privilege · Graded auth & full auditV1 Commit-PinnedExecute CommandNetwork AccessWrite FileDual-pass Audit
Author prime-skillsGitHub prime-skills/runcomfy-agent-skills ↗Stars 43License MIT(仓库根 LICENSE:Copyright (c) 2026 RunComfy / agentspace-so;GitHub API spdx=MIT)Commit fca19ae084
Control levels describe skill capabilities and suggested control measures; they do not represent quality or safety certifications, nor do they dictate usability. Usage decisions rest entirely with users and administrators. Different agent hosts apply varying constraints; do not assume hosts provide automatic protection. Third-party skill copyrights belong to their original authors. Use at your own risk.

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.

image-edit/SKILL.md
| 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 |
The routing table contains 12 intent rows + Default if unspecified → Nano Banana Edit. The transitional phrase `The agent reads this table, classifies the user's intent, and picks the matching subsection below.` follows the same template as video-edit; classification is an LLM decision with no executable code in the skill.

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.

image-edit/SKILL.md
**Model**: `google/nano-banana-2/edit`
Comparing it with the Route section of nano-banana-edit/SKILL.md shows verbatim consistency (including the `Keep the subject identity, pose, and clothing unchanged. Convert the background into a rainy neon cyberpunk street.` example); the difference is that secondary fields like safety_tolerance/limit_generations are omitted here, while enable_web_search is retained.

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).

image-edit/SKILL.md
| `images` | string[] | yes | — | **Up to 10** HTTPS URLs. First is primary; rest are auxiliary. |
The prompt discipline guidelines require `Quote in-image text exactly. Name the script for non-Latin`—translating the product positioning of 'the model excels most at multilingual typographic text' into actionable prompt instructions; the size enum is restricted to four options: auto/1024_1024/1024_1536/1536_1024.

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.

image-edit/SKILL.md
| `mask_image` | string | yes | **Grayscale mask URL** (white = inpaint, black = preserve). |
The Z-Image discipline guidelines provide a semantic mapping for strength (0.3–0.5 retouching / 0.6–0.7 object replacement / 0.8–1.0 full replacement) and a 1–3px mask edge feathering tip—this is the only workflow among the four routes that requires 'generating an additional mask', marking an essential difference from pure prompt-based editing.

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.

image-edit/SKILL.md
- **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.
The three named brand skill directories all exist in the repository; Z-Image has no corresponding brand directory (not included in the override list), and its route model tongyi-mai/z-image/turbo/inpainting has no standalone skill in the repo.

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.

image-edit/SKILL.md
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.
Edit inputs (source image/mask/reference images) are all external URLs fetched by RunComfy servers; the local machine only runs the CLI to exchange JSON payloads and retrieve artifacts.

2Core Capabilities

01Four-model editing intent routing (batch / multilingual text / single-ref / mask region), defaulting to Nano Banana Edit
02Batch consistent editing of 1–20 images + series output with locked aspect/resolution
03In-image text rewriting and layout-level recomposition for multilingual/non-Latin scripts (GPT Image 2 Edit)
04Multi-reference composition: numbered refs routing (e.g., subject from image 1 / lighting from image 2)
05Single-reference high-fidelity local editing (Flux Kontext Pro: single image + single declarative instruction)
06Mask-driven precise region editing (Z-Image Turbo Inpaint: grayscale mask + tiered strength/control_scale)

3External Dependencies

KindDependency / Endpoint
cliruncomfy(@runcomfy/cli 官方 CLI)
package@runcomfy/cli(npm 全局安装)
api四个云端编辑模型端点(经 runcomfy CLI + RunComfy Model API)
networkRunComfy Model API(请求提交)与生成结果下载
network用户提供的源图/参考图/mask URL——由 RunComfy 模型服务器抓取
networkRunComfy 模型页 / 文档站(引用链接)

4Recommended Governance & Evidence

Suggested Controls for Safe Operation
For Agent Runtime
Graded/per-use authorization, sandbox recommended
For Administrators
Approval workflow, rollback support, full audit
Evidence & Triggers (File Paths & Excerpts)
  • 网络端点: 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
Audit Notes: According to the unified grading guidelines: At runtime, it invokes the third-party npm package/CLI @runcomfy/cli, which reads user RunComfy credentials (~/.config/runcomfy/token.json or the RUNCOMFY_TOKEN environment variable) on every call—triggering 'invokes third-party npm/CLI and potentially reads quotas/keys → orange'. The execution plane (CLI, four-model APIs, token reading) is entirely outside the repository, and documentation claims (0600 permissions, 2 GiB limit, no shell expansion) cannot be verified in this pin; adhering to 'when uncertain, escalate to the higher tier' sets this to orange. Furthermore, external network transmission exists: source images, reference images, and masks are all external URLs fetched by RunComfy servers for inference (batch and mask workflows send more unreleased SKUs, human faces, and brand assets to third-party clouds), giving it the broadest exposure to untrusted images among family routers, with prompt injection risks acknowledged in documentation. The skill itself is pure markdown, containing no scripts, obfuscation, or hidden endpoints, thus not triggering the red tier.

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

  • Four editing routes cover the full spectrum from 'background swap' to 'mask inpainting', backed by a default route fallback to load multiple capabilities at once
  • Systematic knowledge base for multilingual text editing prompts (verbatim quotes + script naming + layout direction cues)
  • Semantic mask workflow parameters: three-tier strength mapping + mask edge feathering tips, transferring trial-and-error experience directly to the agent
  • Transparent limitations: input/output/reference caps per route are clearly stated in Limitations without overpromising all-around capability
  • Seamless handoff to dedicated brand skills (gpt-image-edit/flux-kontext/nano-banana-edit), forming an in-catalog relay
  • Best for: Ideal for users with a RunComfy account who need a single entry point to handle diverse editing needs such as background swapping, object removal, in-image text modification, batch SKU editing, and mask inpainting; friendly to progressive workflows starting with defaults and drilling down into brand skills; a high-frequency hub for marketing, e-commerce, and content teams performing batch asset edits.
    Not for: Not suitable for deep scenarios requiring a specific model (should directly use the gpt-image-edit / flux-kontext / nano-banana-edit brand skills, as the router only acts as a guide); not suitable for workflows requiring locally generated masks (masks must also be public URLs); not suitable for users without a RunComfy account, those unwilling to upload assets to the cloud, or those needing to edit untrusted third-party images; not suitable for composite edits requiring multiple models in a single call (the documentation explicitly states it picks one model per call).
    Install Agent-Ready
    ① Verified Mirror 2026-09-09
    Option A · Direct DownloadDownload image-edit.tar.gz
    sha256: 173c3a258c664f4a…
    Option B · Copy Guide for Agent
    install.json
    Agents automatically download and verify mirrors from this JSON guide.
    ② Upstream GitHub
    GitHub Repo ↗
    Pinned to commit fca19ae084.