Skip to main content
rule CX Codex

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

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/rules/i2i-prompting.md
Open on GitHub

What 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.md

The paths frontmatter field limits the files

Step 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.

Similar IDE rules

All IDE rules for AI and ML →

From the same set101

The whole set →
video-toolkit video-toolkit automates video creation: generates voiceovers, background music, animates talking heads, and composes scenes with Remotion. Requires Node.js, Python3, ffmpeg, and cloud GPU access (Modal or RunPod). CX Codex +1 1,200installs azure-speech-to-text azure-speech-to-text transcribes local audio files into text with word-level timestamps and speaker diarization using Azure AI Speech. Speeds up subtitle creation and audio processing in OpenMontage pipelines. CX Codex +1 913installs azure-text-to-speech azure-text-to-speech synthesizes neural voiceover audio using the Azure AI Speech REST API. Ideal for OpenMontage pipelines that need multilingual narration voices. CX Codex +1 738installs json-structured-prompting json-structured-prompting defines a JSON architecture for complex image prompts with multiple subjects, explicit positioning, and variable templates. CX Codex +1 ★ 78,316repo stars flux2-models Rule with prompting patterns for FLUX.2 models: klein, max, pro, flex, and dev. Shows the agent how to write generation and editing prompts for each variant. CX Codex +1 ★ 78,316repo stars hyperframes-core hyperframes-core defines the technical contract for rendering video from HTML in HyperFrames, covering track timing data attributes, deterministic rules, and sub-compositions. CX Codex +1 ★ 78,316repo stars hyperframes-animation The hyperframes-animation skill for Claude Code builds HyperFrames motion from reusable rules and scene blueprints. Consult runtime-specific API notes when authoring choreography or auditing a composition. CX Codex +1 ★ 78,316repo stars model-selection-guide model-selection-guide — a decision rule that matches FLUX models to priorities: speed, quality, balance, typography, or image editing. Quick matrix and decision tree streamline the choice for each task. CX Codex +1 ★ 78,316repo stars

More in the catalog

Project sponsors

Companies that keep this analytics open