i2i-prompting — Claude Code rule: FLUX image editing
i2i-prompting — a rule for writing image-to-image editing prompts with FLUX.2. Use it for targeted changes, style transfers, text edits, and staged transformations.
AGPL-3.0 ★ 78,316 updated 2026-10-24
.claude/rules/i2i-prompting.mdWhat i2i-prompting does
This rule guides an agent through image-to-image edits for FLUX.2 models. It covers changes to backgrounds, clothing, expressions, weather, seasons, objects, and visible text. The guidance also shows how to state which parts of a reference image must remain unchanged.
The material includes simple edit patterns, preservation instructions, and a stepwise method for larger transformations. An image is required as the reference input. Pass it through input_image; a URL is preferred over base64 when one is available. FLUX.2 [klein] supports up to 4 reference images, [pro] and [flex] up to 8, while [max] supports up to 8-10.
What it helps with
- change a scene background without moving the subject
- preserve composition, style, or lighting during an edit
- replace clothing or objects in a reference image
- add, revise, or remove visible text
- turn a large transformation into several prompt steps
Example prompts for the agent
- Change the background to a beach at sunset while keeping the subject’s pose and clothing unchanged.
- Replace the modern car with a vintage model and preserve the original composition.
- Split the office-to-library transformation into separate edits, with the lighting change as its own step.
How to install i2i-prompting
Manually: put the files in place
.claude/rules/i2i-prompting.mdThe paths frontmatter field limits the files
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.cursor/rules/i2i-prompting.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.github/instructions/i2i-prompting.instructions.mdThe applyTo field sets which files it applies to
Manually: put the files in place
.devin/rules/i2i-prompting.mdManually: put the files in place
.clinerules/i2i-prompting.mdStep by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use
Questions about i2i-prompting
How do I install i2i-prompting in Claude Code?
Place the rule at .claude/rules/i2i-prompting.md.
What does i2i-prompting do?
It helps the agent write focused FLUX.2 image-editing prompts and specify both the requested change and the elements that should stay intact.
How many reference images does FLUX.2 support?
[klein] supports up to 4 reference images, [pro] and [flex] up to 8, and [max] up to 8-10. The reference can be supplied as a URL or base64, with URLs preferred.