edit-image

edit-image is a skill for Claude Code, Codex from Sateezg/codex-bridge. It costs 90 tokens per session (902 once invoked), scanned A, original, MIT.

A command-line skill for changing an existing image with OpenAI’s image-generation tool while preserving parts that should stay the same.

In plain words
What is it for?
Use it to change backgrounds, recolor artwork, fix or add text, or create style-matched variations from reference images.
Why use it?
It lets you make targeted edits without modifying the original image.

Skill for Claude CodeCodex

Part of the codex-bridge plugin — 6 skills, 5 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/sateezg/codex-bridge/edit-image
Any agent
npx skills add Sateezg/codex-bridge --skill edit-image
Clone the repo
git clone --depth 1 https://github.com/Sateezg/codex-bridge

Made for: Claude Code, Codex.

Or install codex-bridge, the plugin that ships this one along with the rest of its 6 skills, 5 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for edit-image

README.md
[![agentmods](https://agentmods.dev/badge/skills/sateezg/codex-bridge/edit-image.svg)](https://agentmods.dev/skills/sateezg/codex-bridge/edit-image)
Your own site
<a href="https://agentmods.dev/skills/sateezg/codex-bridge/edit-image"><img src="https://agentmods.dev/badge/skills/sateezg/codex-bridge/edit-image.svg" alt="Measured on agentmods" height="20"></a>
Per session 90 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 902 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00090 $0.00902
Opus 5 $0.00045 $0.00451
Sonnet 5 $0.00018 $0.00180
Haiku 4.5 $0.00009 $0.00090

Measured 4d ago against content hash 21ac926bdbd6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

edit-image scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/edit-image/SKILL.md · 74 lines

How it starts

The opening of the file, as written. The whole thing — 74 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Edit an existing image (gpt-image-2 via Codex CLI)

Same wrapper as generation, plus --ref to attach the source image:

codex-imagegen "<what to change>" <output.png> --ref <source.png> [--size WxH]

The wrapper attaches the reference with codex exec -i, tells Codex to preserve everything not mentioned, and prints the absolute path of the new file. The source file is never modified — always write to a new path.

Examples

# change one thing, keep the rest
codex-imagegen "change the sky to a sunset orange, keep the building and people identical" \
  ./out/hero-sunset.png --ref ./assets/hero.png

# recolor to a brand palette
codex-imagegen "recolor to a monochrome palette of #2563EB on white, keep the exact shapes" \
  ./out/icon-blue.png --ref ./assets/icon.png

# style-matched sibling asset
codex-imagegen "a settings gear icon in exactly the style of the reference: same stroke weight, same palette, same corner radius" \
  ./out/settings.png --ref ./assets/home.png

Up to four --ref images can be passed — useful when one is the subject and the others are style references. Say in the prompt which is which.

Writing the change description

Be surgical. The model preserves what you don't mention, so name the change and then name what must survive it:

  • Good: "replace the text on the sign with 'OPEN 24/7', keep the font style, lighting and every other element identical"
  • Bad: "make it better" — produces an unrelated image

For a series of edits, chain them one at a time (each output becomes the next --ref) rather than stacking five changes into one prompt.

Rules

  1. Never overwrite the source. Write to a new file; offer to replace only after the user has seen the result. Note that Codex itself resists overwriting — the wrapper prints the path actually written, which may be a versioned sibling like out-v2.png. Use the printed path, not the one you asked for.
  2. Verify by viewing. Read the output PNG with the Read tool and compare against the request before reporting done. Regenerate with a sharper prompt if the model drifted — at most 2 retries.
  3. Use a Bash timeout of at least 300000 ms (5 minutes).
  4. For a transparent result, regenerate the subject on a flat #00FF00 background (#FF00FF if the subject is green) and strip the key with the helper Codex ships:
    python "${CODEX_HOME:-$HOME/.codex}/skills/.system/imagegen/scripts/remove_chroma_key.py" \
      --input ./keyed.png --out ./final.png --auto-key border --soft-matte \
      --transparent-threshold 12 --opaque-threshold 220 --despill
    
    Verify transparent corners and no colour fringe afterwards. True native transparency needs Codex's CLI fallback plus an OPENAI_API_KEY — only raise that option for hard subjects (hair, fur, glass, smoke) and let the user decide.
  5. Not for precise pixel work. Cropping, resizing, rotating, format conversion and compression are faster and lossless with ImageMagick or sips — use those directly instead of regenerating.
  6. Each edit spends the user's ChatGPT plan quota. Don't loop unprompted.

Read the full file on GitHub · 74 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 74 lines · 90 tokens per session scan A 21ac926bdbd6

Subscribe to this mod's changes

edit-image is a skill published in the GitHub repository Sateezg/codex-bridge (253 stars, last pushed 24d ago), licensed MIT. It adds 90 tokens to every session and 902 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

imagegen

Pre-flight check across ANY project type — websites, landing pages, marketing sites, homepages, portfolios, web/mobile/desktop apps, games (sprites/textures/tiles/character art/enemy rosters/environment art), CLI tools, libraries/SDKs, READMEs, docs, tutorials, blog posts, slide decks, brand/identity work, mockups…

colin-automates/Codex-ImageGen--Claude-Code · 483 tokens

meta-ads-creative

Create evidence-based Meta ad creative briefs, copy angles, and testable asset concepts for Facebook and Instagram. Use when asked for Meta ad creative, Facebook ads copy, Instagram ad assets, UGC concepts, creative briefs, new ad concepts, or creative refreshes.

nowork-studio/notfair-plugin · 59 tokens

paid-ads-creative

Create grounded paid-media creative concepts, copy angles, refresh hypotheses, and measurable test briefs across advertising platforms. Use for ad copy, creative briefs, UGC concepts, headlines, creative fatigue, asset ideas, or a creative refresh.

nowork-studio/notfair-plugin · 52 tokens

sheet-music-publisher

Converts mastered audio to sheet music and creates printable songbooks. Use after mastering when the user wants sheet music or a songbook for their album.

bitwize-music-studio/claude-ai-music-skills · 36 tokens

genre-creator

Create new genre documentation files for the bitwize-music genre library. Use when the user wants to add a genre, says "/genre-creator", "neues Genre erstellen", "Genre hinzufuegen", "add genre", or asks to create genre documentation. Takes a genre name as argument.

bitwize-music-studio/claude-ai-music-skills · 66 tokens

import-art

Places album art files in the correct audio and content directory locations. Use when the user has generated or downloaded album artwork that needs to be saved.

bitwize-music-studio/claude-ai-music-skills · 32 tokens