gpt-image-edit
Edit images with OpenAI GPT Image 2 (the `/edit` endpoint of ChatGPT Images 2.0) on RunComfy — bundled with the model's documented prompting patterns so the skill gets sharper output than naive prompting against the same model. Documents GPT Image Edit's strengths (preservation language, multilingual in-image text editing, multi-reference up to 10 images, layout / typography precision), the schema, and when to route to Nano Banana Edit / Flux Kontext / GPT Image 2 t2i instead. Calls `runcomfy run openai/gpt-image-2/edit` through the local RunComfy CLI. Triggers on "gpt image edit", "gpt-image-edit", "chatgpt image edit", "edit with gpt image 2", or any explicit ask to edit with this model.
1How It Works & Mechanism
Implemented via a "zero-code + external CLI delegation" pattern: gpt-image-edit/ contains only a single SKILL.md without scripts; at runtime, the host agent executes `runcomfy run openai/gpt-image-2/edit --input '<JSON>' --output-dir <path>` via Bash. The incremental value of the skill lies in solidifying the GPT Image 2 /edit schema (3 fields) and multilingual typographic prompting techniques into directly reusable documentation, without performing any local image processing.
The skill invokes `runcomfy run openai/gpt-image-2/edit` with a JSON body matching the schema.
The schema contains only three fields: prompt (required), images (string[], up to 10 public HTTPS URLs, with the first as primary and the rest as secondary cues), and size (auto / 1024_1024 / 1024_1536 / 1536_1024). These minimal fields delegate all capability differentiation to prompting, so the documentation focuses heavily on phrasing.
| `images` | string[] | yes | — | **Up to 10** publicly-fetchable HTTPS URLs. First is primary; rest are auxiliary. |
The core content details operational practices for "multilingual in-image typography": characters must be quoted verbatim and the writing system must be explicitly named (Japanese kana / Cyrillic / Arabic right-to-left), with paraphrasing strictly prohibited. This discipline explains its superiority over peer models in multilingual ad localization scenarios.
**Multilingual text — quote the characters, name the script.** `"the headline reads \"コーヒー\" in bold Japanese kana"`, `"the label says \"АРОМА\" in Cyrillic, white on black"`, `"the right-margin caption reads \"تخفيض\" in Arabic right-to-left"`. Don't paraphrase — quote.
Multi-reference composition relies on "numbered indexing" to route cues: multiple images are referenced by number (subject from image 1, lighting from image 2, color palette from image 3), allowing the model to assign distinct roles to each image accordingly.
**Multi-ref numbering.** When passing multiple `images`, refer to them by number: `"subject from image 1, lighting from image 2, color palette from image 3"`. The model routes cues correctly.
Directional spatial edits are expressed using directional language: 'move the headline from top-right to bottom-center', 'remove the leftmost object only', or 'replace the watermark in the bottom-right corner'—translating layout-level modifications into determinable spatial directives.
**Directional language for spatial edits.** Concrete spatial scopes work: `"move the headline from top-right to bottom-center"`, `"remove the leftmost object only"`, `"replace the watermark in the bottom-right corner"`.
The routing table divides sibling models into four use cases (batch ≤20 → Nano Banana Edit; single-reference fidelity → Flux Kontext; generation from scratch → sibling gpt-image-2 skill; batch SKU → Nano Banana Edit), while explicitly stating in the limitations section that portrait photorealism is inferior to Nano Banana Pro.
| Generate from scratch with GPT Image 2 | sibling [`gpt-image-2`](../gpt-image-2) skill |
Execution chain: The CLI POSTs JSON to `/v1/models/openai/gpt-image-2/edit` on the RunComfy Model API, polls for completion, and downloads allowlisted `.runcomfy.net` / `.runcomfy.com` artifacts to `--output-dir`; Ctrl-C cancels the remote request.
The CLI POSTs to `https://model-api.runcomfy.net/v1/models/openai/gpt-image-2/edit`, 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.
2Core Capabilities
3External Dependencies
| Kind | Dependency / Endpoint |
|---|---|
| cli | runcomfy(RunComfy 官方 CLI) |
| package | @runcomfy/cli(npm 全局包) |
| package | npx skills(skills.sh 安装器) |
| api | RunComfy Model API(OpenAI GPT Image 2 /edit) |
| network | RunComfy 产物下载白名单 |
| network | 用户传入的源图/参考图 URL(最多 10 张,由 RunComfy 服务器抓取,非本机) |
| network | RunComfy 站点/模型页/文档(文档引用,非运行时调用) |
| network | GitHub(技能源码链接) |
4Recommended Governance & Evidence
- scripts/: Execution of local scripts or commands: (Skill itself contains no scripts) Host agent executes out-of-repo CLI via Bash: `runcomfy run <vendor>/<model>/<endpoint>`
- 网络端点: Declared external network access: POST https://model-api.runcomfy.net/v1/models/openai/gpt-image-2/edit (via runcomfy CLI)
- 本地工作目录: File I/O and artifact output: Generated artifacts are downloaded and written to `--output-dir` by the out-of-repo CLI (documentation states downloads abort if single file > 2 GiB to prevent disk saturation)
5Second-Pass Verification
- [ok] skill 目录内容 = 仅 SKILL.md — git ls-tree HEAD 与 ls -a 双向核实;仓库根仅 LICENSE + README.md + 31 个技能目录,无 scripts/、plugins/、.claude/。
- [ok] 全部外部依赖条目回查调用点真实存在 — runcomfy CLI 调用点 3 处(单参考/多语文字/多参考示例)、npm 安装 1 处、npx skills 1 处、model-api 端点 1 处、白名单与外部 URL 抓取各 1 处、文档/模型页/GitHub 链接多处,均实读命中。
- [discrepancy] 路由兜底句 'route here regardless' 缺失(家族内不一致) — flux-kontext / wan-2-7 / seedance-v2 / happyhorse-1-0 四份在路由表后都有 'If the user said ... explicitly, route here regardless.',本技能的路由表直接接 ## Prerequisites,无该兜底句(触发词仅存在于 frontmatter description 的 'Triggers on ...' 列表)。后果:当用户说『用 GPT Image 编辑这张图』时,是否优先于同族 router 的意图分类由宿主自行判断,家族内无统一行为。
- [ok] size 枚举与 warning 口径一致 — schema 行列出 auto/1024_1024/1024_1536/1536_1024;正文 'Use `size: "auto"` to preserve input ratio' 与 'asking for `size` outside the 3 fixed values + auto → 422'、Limitations 'size: 3 fixed values + auto — anything else 422s' 三处一致(3 个固定值 + auto 的说法自洽)。
- [unlocatable] Security & Privacy 的技术断言可在本仓证实 — 0600 token 权限、2 GiB 下载上限、无 shell 展开、下载白名单、退出码语义均为仓外 @runcomfy/cli 行为;仓内无 CLI 源码或版本 pin,只能作为文档自述引用(同仓 runcomfy-cli/SKILL.md 为同源转述,非独立证据)。
- [discrepancy] 安装一行与 GitHub 链接指向旧仓 agentspace-so/runcomfy-skills — 安装行 `npx skills add agentspace-so/runcomfy-skills --skill gpt-image-edit -g` 与 GitHub 链接 github.com/agentspace-so/runcomfy-skills 均指向旧仓;本仓 pin 在 prime-skills/runcomfy-agent-skills(README 用 runcomfy-agent-skills)。gh api:agentspace-so/runcomfy-skills 仍存在(5★、pushed 2026-04-29、含 gpt-image-edit 目录);prime-skills/runcomfy-agent-skills 与 agentspace-so/runcomfy-agent-skills 为同一仓(相同 stats,full_name=prime-skills/runcomfy-agent-skills)。按文档安装可能装到旧版。
- [ok] 多语言字符引用写法可执行性 — 正文给出的日文假名(コーヒー / 今日のおすすめ)、西里尔(АРОМА)、阿拉伯(تخفيض)样例在文件内为真实 UTF-8 字符;配套反模式(paraphrase → text comes out different)同页存在,属可执行指引。
- [discrepancy] 未声明 allowed-tools(执行面未收窄) — frontmatter 无 allowed-tools;同仓 runcomfy-cli/SKILL.md 声明 `allowed-tools: Bash(runcomfy *)`。家族内部工具权限声明不一致。
6Verdict & Scenarios
c5a2b82fedddc872…