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

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.

L4 High-Privilege · Graded auth & full auditV1 Commit-PinnedExecute CommandNetwork AccessWrite FileDual-pass Audit
Author prime-skillsGitHub prime-skills/runcomfy-agent-skills ↗Stars 48License 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

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.

gpt-image-edit/SKILL.md
The skill invokes `runcomfy run openai/gpt-image-2/edit` with a JSON body matching the schema.
Verified via `git ls-tree HEAD` that gpt-image-edit/ contains only a single entry: SKILL.md. runcomfy-cli/SKILL.md in the same repository serves as the documentation for the CLI itself, while this skill is strictly a single-model wrapper.

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.

gpt-image-edit/SKILL.md
| `images` | string[] | yes | — | **Up to 10** publicly-fetchable HTTPS URLs. First is primary; rest are auxiliary. |
"Up to 10 reference images" is the core differentiator of this skill compared to Flux Kontext (single image). The same page also provides rationale for recommending size=auto (preserving input aspect ratio) and notes that non-enumerated values return 422.

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.

gpt-image-edit/SKILL.md
**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.
One accompanying anti-pattern directly targets this pitfall: 'Paraphrasing in-image text instead of quoting it → text comes out different.' The document pairs failure modes directly with correct phrasing.

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.

gpt-image-edit/SKILL.md
**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.
This contrasts with flux-kontext's "single-reference" discipline within the family: the shared family template hardcodes the capability boundaries of the two models via input shape (≤10 vs. single image).

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.

gpt-image-edit/SKILL.md
**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"`.
Such "determinable positional phrases" represent the only descriptions covering "layout restructuring" across the family documentation, complementing Nano Banana Edit's batch identity preservation.

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.

gpt-image-edit/SKILL.md
| Generate from scratch with GPT Image 2 | sibling [`gpt-image-2`](../gpt-image-2) skill |
The relative link `../gpt-image-2` points to a sibling directory in the same repo (verified to exist). Unlike the other four in the family, this skill's table lacks the fallback clause 'route here regardless' for explicit naming (see second_pass discrepancy).

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.

gpt-image-edit/SKILL.md
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.
Multiple source images required for editing are fetched by RunComfy servers (not uploaded locally), meaning asset confidentiality depends entirely on the third-party cloud.

2Core Capabilities

01Multilingual / embedded in-image text rewriting (verbatim quoting + explicit writing system designation)
02Multi-reference synthesis up to 10 images (first as primary, others auxiliary, referenced by index)
03Preservation-first targeted editing (state Keep [face/pose/clothing/brand/framing] unchanged before describing modifications)
04Layout-level targeted repositioning (directional language: top-right → bottom-center, remove leftmost object only, replace bottom-right watermark)
05Output dimension control (size=auto preserves input aspect ratio; 3 fixed presets available, non-enumerated values return 422)
06Cross-asset brand/identity preservation (generating multilingual headline variations across identical visual assets)
07Sibling model routing decisions (batch ≤20 → Nano Banana Edit, single-reference → Flux Kontext, from scratch → gpt-image-2, portrait photorealism → Nano Banana Pro)
08Exit code semantics and retry evaluation (65 schema mismatch, 75 transient/retryable, 77 re-authentication required)

3External Dependencies

KindDependency / Endpoint
cliruncomfy(RunComfy 官方 CLI)
package@runcomfy/cli(npm 全局包)
packagenpx skills(skills.sh 安装器)
apiRunComfy Model API(OpenAI GPT Image 2 /edit)
networkRunComfy 产物下载白名单
network用户传入的源图/参考图 URL(最多 10 张,由 RunComfy 服务器抓取,非本机)
networkRunComfy 站点/模型页/文档(文档引用,非运行时调用)
networkGitHub(技能源码链接)

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)
  • 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)
Audit Notes: Per current unified grading criteria (image-edit in the same repo graded Amber): At runtime, it invokes the third-party npm package/CLI `@runcomfy/cli`, which reads user RunComfy credentials (~/.config/runcomfy/token.json or RUNCOMFY_TOKEN) on each call—triggering the tier for 'invoking third-party CLI/remote package touching credentials/quotas'. Assertions regarding CLI implementation, Model API behavior, 0600 permissions, 2 GiB limits, and exit code semantics all reside outside the repository without source code to audit in this pin, warranting Amber under 'when in doubt, choose the higher tier'. Additionally, multiple image assets leave the local perimeter (up to 10 fetched by third-party servers for inference), meaning confidentiality of unreleased brand assets, faces, and layouts is not locally controlled; calls are metered per use. The skill itself is pure Markdown with no scripts, obfuscation, or hidden endpoints, thus avoiding the Red tier.

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

  • Multilingual in-image text rewriting is an explicit first-class capability: verbatim quoting + writing system naming + no paraphrasing, complete with Japanese/Cyrillic/Arabic examples ready to copy-paste for ad localization.
  • Supports the highest number of reference images in its class (≤10 images) with numbered indexing protocols, offering actionable multi-image synthesis workflows.
  • Schema has only 3 fields, minimizing cognitive load; recommending size=auto by default prevents unnecessary 422 errors and aspect ratio distortion.
  • Layout-level editing incorporates directional phrasing protocols (top-right → bottom-center / remove leftmost object / bottom-right watermark), formulating layout changes into determinable commands.
  • Zero-code, single-file design: the entire directory can be audited before use, leaving zero script attack surface.
  • Best for: Best for: Multilingual advertisement localization (swapping in-image headlines into different languages across the same visual asset), brand-safe headline/CTA replacement, layout-level repositioning (moving headlines, removing objects, erasing watermarks), and multi-reference image synthesis (taking subject from image 1, scene from image 2). Prerequisite: runcomfy CLI installed and authenticated (or RUNCOMFY_TOKEN configured).
    Not for: Not suitable for: Batch edits of ≤20 images requiring consistency (use Nano Banana Edit), single-reference localized fine-tuning focused on source fidelity (Flux Kontext is better suited), generation from scratch without source images (use sibling gpt-image-2 t2i), or pursuit of extreme portrait photorealism (documentation acknowledges Nano Banana Pro is superior); also unsuitable for compliance environments requiring data to stay on-premise or auditable execution code (execution runtime is out-of-repo and unpinned).
    Install Agent-Ready
    ① Verified Mirror 2026-09-15
    Option A · Direct DownloadDownload gpt-image-edit.tar.gz
    sha256: c5a2b82fedddc872…
    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.