image-edit
RunComfy上の画像編集モデルを賢く選択し、背景変更やオブジェクト削除、文字修正など、ユーザーの意図に最適な編集を、各モデルのプロンプトパターンを活用して実現するSkill。
📜 元の英語説明(参考)
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.
🇯🇵 日本人クリエイター向け解説
RunComfy上の画像編集モデルを賢く選択し、背景変更やオブジェクト削除、文字修正など、ユーザーの意図に最適な編集を、各モデルのプロンプトパターンを活用して実現するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o image-edit.zip https://jpskill.com/download/10366.zip && unzip -o image-edit.zip && rm image-edit.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/10366.zip -OutFile "$d\image-edit.zip"; Expand-Archive "$d\image-edit.zip" -DestinationPath $d -Force; ri "$d\image-edit.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
image-edit.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
image-editフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
Image Edit — RunComfy の Pro Pack
runcomfy.com · Nano Banana Edit · GPT Image 2 Edit · Flux Kontext · Z-Image Inpaint · GitHub
画像編集、意図に基づいたルーティング。 このスキルは、1つのモデルに限定されるものではありません。ユーザーが実際に何を求めているかに基づいて、RunComfy カタログから適切な編集モデルを選択します。バッチでの同一性保持、多言語テキストの書き換え、シングルショットでの正確な編集、またはマスク駆動の領域置換などに対応します。
npx skills add agentspace-so/runcomfy-skills --skill image-edit -g
ユーザーの意図に合ったモデルを選択
| ユーザーの意図 | モデル | 理由 |
|---|---|---|
| 1〜20枚の画像を整合性をもってバッチ編集(SKUギャラリー、A/Bバリアント) | Nano Banana Edit | 1回の呼び出しあたり最大20枚の入力画像。シリーズ用にアスペクト比/解像度を固定 |
| 背景を入れ替え、被写体の同一性を保持 | Nano Banana Edit | 「Xを変更しない」プロンプトで強力な同一性保持 |
| 空間言語(「左側のオブジェクト」、「右上隅」)を使用したローカライズされたオブジェクトの削除/追加 | Nano Banana Edit | 方向性のある空間範囲を尊重 |
| 多言語/非ラテン文字の画像内テキストの書き換え(日本語の仮名、キリル文字、アラビア語) | GPT Image 2 Edit | 多言語タイポグラフィでクラス最強 |
| 複数参照の構成(img1からの被写体、img2からのシーン、img3からのパレット) | GPT Image 2 Edit | 番号付き参照がキューを正しくルーティング |
| レイアウトに正確な再配置(「見出しを右上から下中央に移動」) | GPT Image 2 Edit | レイアウトレベルで方向性言語を尊重 |
| 翻訳された見出しバリアント全体での同一性保持 | GPT Image 2 Edit | 同じソースアセット→多くの言語バリアント、同一性は安定 |
| シングルショットでの正確なローカル編集(「彼女はオレンジ色の傘を持っている」) | Flux Kontext Pro | シングル参照、シングル命令、高忠実度の保持 |
| マスク駆動のオブジェクト削除(ケーブル、透かし、邪魔なもの) | Z-Image Turbo Inpaint | マスク必須、強度調整可能、エッジ整合性 |
| マスク駆動の領域置換(マスクを使用した完全な背景の入れ替え) | Z-Image Turbo Inpaint | 高強度+クリーンなマスク=クリーンな置換 |
| 未指定の場合のデフォルト | Nano Banana Edit | 最も柔軟性があり、シングルとバッチの両方をサポート |
エージェントはこの表を読み、ユーザーの意図を分類し、一致する以下のサブセクションを選択します。
前提条件
- RunComfy CLI —
npm i -g @runcomfy/cli - RunComfy アカウント —
runcomfy login。 - CI / コンテナ —
RUNCOMFY_TOKEN=<token>を設定。
ルート 1: Nano Banana Edit — 一般的な編集 + バッチのデフォルト
モデル: google/nano-banana-2/edit
スキーマ
| フィールド | タイプ | 必須 | デフォルト | 注 |
|---|---|---|---|---|
prompt |
string | yes | — | 保持目標から始め、変更で終わります。 |
image_urls |
array | yes | — | 1〜20 個の公開されている HTTPS URL。 |
number_of_images |
int | no | 1 | 1回の呼び出しあたり1〜4個の出力。 |
aspect_ratio |
enum | no | auto |
auto は入力を追跡します。バッチの一貫性のためにロックします。 |
resolution |
enum | no | 1K |
0.5K / 1K / 2K / 4K。 |
output_format |
enum | no | png |
png / jpeg / webp。 |
seed |
int | no | — | 再現性。 |
enable_web_search |
bool | no | false | Webに基づいた編集(追加のレイテンシ)。 |
呼び出し
runcomfy run google/nano-banana-2/edit \
--input '{
"prompt": "被写体の同一性、ポーズ、および服装を変更しないようにしてください。背景を雨のネオンサイバーパンクストリートに変換します。",
"image_urls": ["https://.../portrait.jpg"]
}' \
--output-dir <absolute/path>
バッチ(アスペクト比+解像度をロック):
runcomfy run google/nano-banana-2/edit \
--input '{
"prompt": "右下の透かしを、クリーンな白いサンセリフ体のテキスト「AURA」に置き換えます。その他はすべて入力とまったく同じにしてください。",
"image_urls": ["https://.../sku-1.jpg", "https://.../sku-2.jpg", "https://.../sku-3.jpg"],
"aspect_ratio": "1:1",
"resolution": "1K"
}' \
--output-dir <absolute/path>
プロンプトのヒント
- 最初に保持:
" [アイデンティティ/ポーズ/ブランド/フレーミング] を変更しないようにしてください。"次に変更を記述します。 - 空間範囲: 「背景のみ」、「左側のオブジェクト」、「右上象限」— 具体的な場所が尊重されます。
- バッチの一貫性: バッチ全体で
aspect_ratioとresolutionをロックします。 - 小さく反復: 複合編集を複数の短いパスに分割します。
ルート 2: GPT Image 2 Edit — 多言語テキスト + 複数参照構成
モデル: openai/gpt-image-2/edit
スキーマ
| フィールド | タイプ | 必須 | デフォルト | 注 |
|---|---|---|---|---|
prompt |
string | yes | — | 編集指示。保持から始めます。 |
images |
string[] | yes | — | 最大10個のHTTPS URL。最初はプライマリ。残りは補助。 |
size |
enum | no | auto |
auto、1024_1024、1024_1536、1536_1024。これらのみ。 |
呼び出し
多言語テキストの書き換え:
runcomfy run openai/gpt-image-2/edit \
--input '{
"prompt": "写真、レイアウト、およびブランドマークを入力とまったく同じにしてください。画像内の見出しのみを置き換えます。新しい見出しは、同じ位置とフォントウェイトで、太字の日本語の仮名で「今日のおすすめ」と表示されます。",
"images": ["https://.../poster-en.jpg"]
}' \
--output-dir <absolute/path>
複数参照構成:
runcomfy run openai/gpt-image-2/edit \
--
(原文はここで切り詰められています) 📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Image Edit — Pro Pack on RunComfy
runcomfy.com · Nano Banana Edit · GPT Image 2 Edit · Flux Kontext · Z-Image Inpaint · GitHub
Image edit, intent-routed. This skill doesn't lock you to one model — it picks the right edit model in the RunComfy catalog based on what the user actually wants: batch identity-preservation, multilingual text rewrite, single-shot precise edit, or mask-driven region replacement.
npx skills add agentspace-so/runcomfy-skills --skill image-edit -g
Pick the right model for the user's intent
| 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 |
| Swap background, preserve subject identity | Nano Banana Edit | Strong identity preservation under "keep X unchanged" prompts |
| Localized object removal / addition with spatial language ("the left object", "upper-right corner") | Nano Banana Edit | Honors directional spatial scope |
| Multilingual / non-Latin in-image text rewrite (Japanese kana, Cyrillic, Arabic) | GPT Image 2 Edit | Strongest in class for multilingual typography |
| Multi-reference composition (subject from img1, scene from img2, palette from img3) | GPT Image 2 Edit | Numbered refs route cues correctly |
| Layout-precise repositioning ("move headline from top-right to bottom-center") | GPT Image 2 Edit | Directional language honored at layout level |
| Identity preservation across translated headline variants | GPT Image 2 Edit | Same source asset → many language variants, identity stable |
| Single-shot precise local edit ("she's now holding an orange umbrella") | Flux Kontext Pro | Single-ref single-instruction, high-fidelity preservation |
| Mask-driven object removal (cables, watermarks, distractions) | Z-Image Turbo Inpaint | Mask-required, strength-tunable, edge-consistent |
| Mask-driven region replacement (full background swap with mask) | Z-Image Turbo Inpaint | High strength + clean mask = clean replacement |
| Default if unspecified | Nano Banana Edit | Most flexible, supports both single and batch |
The agent reads this table, classifies the user's intent, and picks the matching subsection below.
Prerequisites
- RunComfy CLI —
npm i -g @runcomfy/cli - RunComfy account —
runcomfy login. - CI / containers — set
RUNCOMFY_TOKEN=<token>.
Route 1: Nano Banana Edit — default for general edit + batch
Model: google/nano-banana-2/edit
Schema
| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
prompt |
string | yes | — | Lead with preservation goals, end with the change. |
image_urls |
array | yes | — | 1–20 publicly-fetchable HTTPS URLs. |
number_of_images |
int | no | 1 | 1–4 outputs per call. |
aspect_ratio |
enum | no | auto |
auto follows input; lock for batch consistency. |
resolution |
enum | no | 1K |
0.5K / 1K / 2K / 4K. |
output_format |
enum | no | png |
png / jpeg / webp. |
seed |
int | no | — | Reproducibility. |
enable_web_search |
bool | no | false | Web-grounded edits (extra latency). |
Invoke
runcomfy run google/nano-banana-2/edit \
--input '{
"prompt": "Keep the subject identity, pose, and clothing unchanged. Convert the background into a rainy neon cyberpunk street.",
"image_urls": ["https://.../portrait.jpg"]
}' \
--output-dir <absolute/path>
Batch (lock aspect + resolution):
runcomfy run google/nano-banana-2/edit \
--input '{
"prompt": "Replace the watermark in the bottom-right with the text \"AURA\" in clean white sans-serif. Keep everything else exactly as in the input.",
"image_urls": ["https://.../sku-1.jpg", "https://.../sku-2.jpg", "https://.../sku-3.jpg"],
"aspect_ratio": "1:1",
"resolution": "1K"
}' \
--output-dir <absolute/path>
Prompting tips
- Preservation first:
"Keep [identity / pose / brand / framing] unchanged."Then state the change. - Spatial scope: "background only", "the left object", "upper-right quadrant" — concrete locations honored.
- Batch consistency: lock
aspect_ratioandresolutionacross the batch. - Iterate small: split compound edits into multiple shorter passes.
Route 2: GPT Image 2 Edit — multilingual text + multi-ref composition
Model: openai/gpt-image-2/edit
Schema
| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
prompt |
string | yes | — | Edit instruction; lead with preservation. |
images |
string[] | yes | — | Up to 10 HTTPS URLs. First is primary; rest are auxiliary. |
size |
enum | no | auto |
auto, 1024_1024, 1024_1536, 1536_1024. Only these. |
Invoke
Multilingual text rewrite:
runcomfy run openai/gpt-image-2/edit \
--input '{
"prompt": "Keep the photograph, layout, and brand mark exactly as in the input. Replace only the in-image headline. The new headline reads \"今日のおすすめ\" in bold Japanese kana, same position and font weight.",
"images": ["https://.../poster-en.jpg"]
}' \
--output-dir <absolute/path>
Multi-ref composition:
runcomfy run openai/gpt-image-2/edit \
--input '{
"prompt": "Compose subject from image 1 into the room from image 2. Match the lighting and color palette of image 2. Keep image 1 subject identity unchanged.",
"images": ["https://.../subject.jpg", "https://.../room.jpg"]
}' \
--output-dir <absolute/path>
Prompting tips
- Quote in-image text exactly. Name the script for non-Latin:
"Japanese kana","Cyrillic","Arabic right-to-left". - Number multi-refs:
"subject from image 1, lighting from image 2". - Directional layout language:
"move the headline from top-right to bottom-center","replace the watermark in the bottom-right". size: "auto"preserves input ratio — recommended unless the edit changes framing.
Route 3: Flux Kontext Pro — single-shot precise local edit
Model: blackforestlabs/flux-1-kontext/pro/edit
Schema (minimal)
| Field | Type | Required | Notes |
|---|---|---|---|
prompt |
string | yes | One declarative edit instruction. |
image |
string | yes | Single source image URL. |
aspect_ratio |
enum | no | Pick from supported W:H values. |
seed |
int | no | Reproducibility. |
Single image only — no array. For multi-image flows, use Route 1 (Nano Banana Edit).
Invoke
runcomfy run blackforestlabs/flux-1-kontext/pro/edit \
--input '{
"prompt": "Keep the person'\''s face, pose, and clothing unchanged. Add an orange umbrella in her left hand and a slight smile.",
"image": "https://.../portrait.jpg"
}' \
--output-dir <absolute/path>
Prompting tips
- One declarative instruction. "She is now holding an orange umbrella and smiling" — imperative, single change.
- Preservation first. Lead with
"Keep [unchanged elements]"then state the change. - Iterate small. Compound edits drift on a single pass; split into sequential passes.
Route 4: Z-Image Turbo Inpaint — mask-driven precise region edit
Model: tongyi-mai/z-image/turbo/inpainting
Schema
| Field | Type | Required | Notes |
|---|---|---|---|
prompt |
string | yes | What to fill / replace; preservation constraints for the unmasked surround. |
image |
string | yes | Source image URL. |
mask_image |
string | yes | Grayscale mask URL (white = inpaint, black = preserve). |
strength |
float | no | 0.3–0.6 retouching, 0.7–1.0 full replacement. |
control_scale |
float | no | 0.6–0.9 typical. |
aspect_ratio |
enum | no | W:H output ratio. |
seed |
int | no | Reproducibility. |
Invoke
Object removal (low strength):
runcomfy run tongyi-mai/z-image/turbo/inpainting \
--input '{
"prompt": "Remove overhead cables; preserve rooflines and sky gradient; thin clean sky.",
"image": "https://.../street.jpg",
"mask_image": "https://.../cables-mask.png",
"strength": 0.5,
"control_scale": 0.8
}' \
--output-dir <absolute/path>
Region replacement (high strength):
runcomfy run tongyi-mai/z-image/turbo/inpainting \
--input '{
"prompt": "Replace busy backdrop with smooth light gray studio paper; mask background only.",
"image": "https://.../product.jpg",
"mask_image": "https://.../bg-mask.png",
"strength": 0.9
}' \
--output-dir <absolute/path>
Prompting tips
- A mask URL is required — grayscale, white = inpaint region, black = preserve. Slight blur on mask edges (1–3px) blends better than sharp binary.
- Strength by intent:
0.3–0.5for retouching / cleanup,0.6–0.7for object replacement with style match,0.8–1.0for full-region replacement. - Name what stays outside the mask in the prompt:
"preserve rooflines and sky gradient","match brick pattern and mortar tone". - Spatial labels still help even though the mask defines the region:
"the left shelf","upper-right quadrant".
Limitations
- Each route inherits its model's limits. Nano Banana: 1–20 inputs, 1–4 outputs. GPT Image 2 Edit: up to 10 refs, 4 fixed sizes. Flux Kontext: single ref. Z-Image Inpaint: mask required.
- No multi-route blending. This skill picks one model per call.
- 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.
Exit codes
| code | meaning |
|---|---|
| 0 | success |
| 64 | bad CLI args |
| 65 | bad input JSON / schema mismatch |
| 69 | upstream 5xx |
| 75 | retryable: timeout / 429 |
| 77 | not signed in or token rejected |
Full reference: docs.runcomfy.com/cli/troubleshooting.
How it works
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. The CLI POSTs to the Model API, polls the request, fetches the result, and downloads any .runcomfy.net/.runcomfy.com URL into --output-dir. Ctrl-C cancels the remote request before exit.
Security & Privacy
- Token storage:
runcomfy loginwrites the API token to~/.config/runcomfy/token.jsonwith mode 0600 (owner-only read/write). SetRUNCOMFY_TOKENenv var to bypass the file entirely in CI / containers. - Input boundary: the user prompt is passed as a JSON string to the CLI via
--input. The CLI does NOT shell-expand the prompt; it transmits the JSON body directly to the Model API over HTTPS. No shell injection surface from prompt content. - Third-party content: image / mask / video URLs you pass are fetched by the RunComfy model server, not by the CLI on your machine. Treat external URLs as untrusted; image-based prompt injection is a known risk for any image-edit / video-edit model.
- Outbound endpoints: only
model-api.runcomfy.net(request submission) and*.runcomfy.net/*.runcomfy.com(download whitelist for generated outputs). No telemetry, no callbacks. - Generated-file size cap: the CLI aborts any single download > 2 GiB to prevent disk-fill from a malicious or runaway model output.