Image editing

From event4u-app/agent-config · View interactive version

Image editing is an AI agent skill from the GitHub repository event4u-app/agent-config. Edit an existing image — inpaint, background swap, variation — via providers that support it. Use when editing/modifying/inpainting an image or making variations.

How to use this skill

Skill file

image-editing

Edit or vary an existing image: inpaint masked regions, swap backgrounds, produce

variations from a seed, or upscale — routed to providers that support the edit API,

with governance applied before delivery. All adapters are scaffold-tier (dry-run) until promoted to stable.

When to use

Procedure

  1. Identify the edit type — classify the request: inpaint (replace a masked

region), background (remove or swap), variation (alternate version of the

same subject), or upscale (resolution increase).

  1. Confirm provider support — not all providers support image editing. GPT Image 2

and gemini-image both expose an edit/inpaint endpoint. Flux and Recraft support

variation via seed/ref-image only; Ideogram is largely generate-only. Check

the provider's capability before proceeding.

  1. Route the provider via CODE0 —

route to a provider whose adapter exposes an edit endpoint for the required edit

type. Selecting a generate-only provider for an inpaint task will fail silently.

  1. Author the edit instruction via CODE0 —

write the edit prompt in the target provider's grammar. For inpaint, describe what

fills the masked region. For variation, carry the original seed/ref-image path forward.

  1. Invoke the adapter (dry-run today) — run

node_modules/@event4u/agent-config/src/scripts/ai-image/adapters/<provider>.sh with the assembled params including

the source image path and, for inpaint, the mask path. Validate the returned

artifact path or dry-run confirmation. All adapters are experimental

(scaffold-tier); no live editing occurs until a maintainer promotes the adapter

via provider-lifecycle-discipline.

  1. Apply rights and disclosure governance — run the rights check

(image-likeness-and-rights) when the source image or edit instruction involves

a real person's likeness, a brand mark, or a named living artist's style. Attach

the AI-disclosure footer per media-governance-routing before delivering output.

Output format

  1. Edit plan — edit type, chosen provider, routing rationale, and prompt string

ready to copy.

  1. Provider + params — adapter file reference, source image path, mask path (if

inpaint), key params (aspect ratio, strength, seed/ref-image for variation).

  1. Artifact path / dry-run note — the path returned by the adapter, or an

explicit note: "adapter is experimental (scaffold-tier) — dry-run plan only; no

edited asset until promotion per provider-lifecycle-discipline."

Gotcha

gemini-image, Flux, and Recraft are scaffold-tier (dry-run only). This skill

produces the edit blueprint + dry-run confirmation; actual edits require a

maintainer to capture a smoke trace and promote the adapter to stable. Claiming

an edited asset exists when no adapter is stable misleads the caller.

generate-only; they do not expose a mask-based inpaint endpoint. Routing an

inpaint task to them silently falls back to generation from scratch, discarding the

source image entirely.

carrying the seed value or ref-image path from the original generation will produce

a stylistically unrelated result. The seed/ref-image is the only reliable

continuity lever for variation workflows.

Do NOT

before routing; a generate-only provider will discard the source image.

involves a real person's face, a brand mark, or a named living artist's style.

the dry-run caveat explicitly every time.

CODE0 instead.

See also

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.