Who it is forA designer or product team member who has an existing image, such as a mockup or character sheet, and needs targeted changes in the same project.
The problemEach generation call is ephemeral, so a revision built from the original source silently discards earlier edits.
The outcomeAn edited PNG saved alongside the earlier output, with the edit chain kept intact.
What you need first
- A ChatGPT or Codex plan that permits image generation (the README says Codex image generation is not available on the Free plan)
- Node.js 22 or newer
- Git, for installing from GitHub
- Codex CLI signed in with ChatGPT, or a host that provides subscription-native image_gen
Steps
- Place the source image inside the project, or use an explicit filesystem path or @path reference to it.
- Ask for the change in Codex with
$gpt-image Change the sky to dusk and keep the layout, using @path/to/source.png as the edit target.(inferred, check the README) - For a follow-up change to the result you just made, reuse the last returned PATH as the new edit target and reattach every reference you still need.
- Compare the new PNG with the previous one and confirm only the requested part changed.
Prompt for your agent
Using the GPT Image Skill in <repo path>, edit <existing image path> with the change <requested change> and keep the rest of the layout. Expect a new PNG in /generated-images and a PATH=... line. Verify that the previous output was the edit target for any follow-up request.
Caveat. A pasted image in chat is not automatically passed to the nested Codex process, so the source must be a readable file path inside the project.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for GENEXIS-AI/gpt-image-skill and "Revise an existing image without losing prior edits"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer