Edit an existing interior design image — analyze objects, style, materials, then generate targeted prompts for specific changes. Use when the user sends a reference image and wants modifications (change style, swap furniture, adjust colors, add/remove elements).
Analyze a reference interior design image, identify what the user wants to change, and generate targeted prompts that preserve unchanged elements while modifying specific aspects.
Before ANY analysis, run these checks to determine what's available:
!ls projects/${PROJECT_NAME}/references/preprocessed/depth_map.png 2>/dev/null && echo "HAS_DEPTH=true" || echo "HAS_DEPTH=false"
!ls projects/${PROJECT_NAME}/references/preprocessed/canny_edge.png 2>/dev/null && echo "HAS_CANNY=true" || echo "HAS_CANNY=false"
!ls projects/${PROJECT_NAME}/references/preprocessed/semantic_analysis.json 2>/dev/null && echo "HAS_SEMANTIC=true" || echo "HAS_SEMANTIC=false"
!ls projects/${PROJECT_NAME}/references/preprocessed/segmentation.png 2>/dev/null && echo "HAS_SEGMENTATION=true" || echo "HAS_SEGMENTATION=false"
!ls projects/${PROJECT_NAME}/references/masks/*.png 2>/dev/null && echo "HAS_MASKS=true" || echo "HAS_MASKS=false"
HAS_DEPTH=false OR HAS_SEMANTIC=false?
└── Run /preprocess-room on the reference image AUTOMATICALLY (do NOT ask user).
Wait for completion before proceeding to analysis.
HAS_SEMANTIC=true?
└── Read semantic_analysis.json — use it for Scene Inventory (Step 1) instead of re-analyzing manually.
This gives you accurate style, materials, colors, lighting from Gemini Vision.
User wants specific element change (sofa, walls, floor)?
├── HAS_SEGMENTATION=true → Use segmentation to identify element boundaries
├── HAS_MASKS=true for that element → Reuse existing mask
└── Neither → Run /mask-room for target element
User wants full style change?
└── Use structure control (depth map) for rendering — HAS_DEPTH must be true
User wants minor adjustment (color, lighting)?
└── Inpainting with broad mask may suffice
This step is silent — just do it, don't explain to the user unless they ask.
Gather from the user (ask if not provided via $ARGUMENTS):
/preprocess-room if references/preprocessed/ is empty or stale/mask-room for target elementAnalyze the reference image and document:
## Scene Inventory
### Room
- Type: [bathroom / living room / bedroom / etc.]
- Dimensions feel: [compact / medium / spacious]
- Layout: [L-shaped / rectangular / open-plan / etc.]
### Objects
- [object 1]: [description, position, material, color]
- [object 2]: [description, position, material, color]
- ...
### Surfaces
- Walls: [material, color, finish]
- Floor: [material, color, pattern]
- Ceiling: [material, color, height feel]
### Style
- Primary: [identified style]
- Secondary influences: [if any]
- Era/mood: [modern luxury / rustic warmth / etc.]
### Materials Palette
- [material 1]: [where used]
- [material 2]: [where used]
### Color Palette
- Dominant: [color]
- Secondary: [color]
- Accents: [color]
### Lighting
- Type: [natural / artificial / mixed]
- Sources: [windows / recessed / pendant / LED strip / etc.]
- Mood: [warm / cool / dramatic / soft]
- Direction: [overhead / side / backlit / etc.]
### Camera
- Angle: [eye-level / elevated / low / bird's eye]
- Lens feel: [wide-angle / standard / telephoto]
- Composition: [centered / rule-of-thirds / diagonal]
Compare user's request against the scene inventory:
## Change Diff
### KEEP (unchanged)
- [element]: [reason to preserve]
- ...
### MODIFY (change in place)
- [element]: [current state] → [target state]
- ...
### ADD (new elements)
- [element]: [description, placement]
- ...
### REMOVE
- [element]: [reason]
- ...
### STYLE SHIFT (if applicable)
- From: [current style] → To: [target style]
- Keywords changing: [old keywords] → [new keywords]
- Materials changing: [old] → [new]
- Colors changing: [old] → [new]
Generate prompts per provider, incorporating the diff. Use style keywords from /style-guide for the target style.
IMPORTANT — Visual Context for Gemini: When rendering via Gemini, the /render skill will automatically attach all available preprocessed maps (depth, segmentation, masks) alongside the original image. Your edit prompt should reference these maps when relevant:
This gives Gemini multimodal context to understand room structure beyond just the photo.
For providers without edit/inpainting APIs — generate a complete prompt that describes the final desired result, preserving unchanged layout/composition while incorporating all changes.
Follow the provider-specific prompt structures from /generate-prompt:
For providers with edit APIs (OpenAI DALL-E edit, Stability AI inpainting):
## Inpainting Prompt
### Region to edit: [description of area — e.g., "the wall behind the vanity"]
### Edit instruction: [what to change in that region]
### Context preservation: [surrounding elements to keep consistent]
## 1. Scene Analysis
[Scene inventory from Step 1]
## 2. Edit Plan
[Change diff from Step 2]
## 3. Generated Prompts
### [Provider Name]
#### Full Re-render:
[complete prompt for generating the modified design from scratch]
#### Inpainting (if supported):
[targeted edit prompt for modifying specific regions]
## 4. Style Keywords Applied
- From `/style-guide` [target style]: [keywords used]
## 5. Recommendations
- [Which approach works best: full re-render vs inpainting]
- [Which provider handles this type of edit best]
- [Potential issues to watch for — e.g., "style blending may produce inconsistent furniture"]
/style-guide for accurate style vocabulary when shifting between styles/render — after generating edit prompts, use /render to execute them. For inpainting edits, ensure the provider supports edit APIs (OpenAI DALL-E edit, Stability inpainting)./style-guide — critical when changing styles. Use the target style's exact keywords, materials, and colors from the guide. Style shifts with wrong vocabulary produce hybrid-mush./generate-prompt — used internally for prompt format reference. Follow the same provider-specific structures when generating edit prompts./refine — if the first edit render doesn't match expectations, use /refine to iterate. Pass both the original image context and the edit feedback./compare-models — if editing across multiple providers, compare which one best preserved the unchanged elements while applying the edits./design-consult — if the user wants a complete redesign rather than targeted edits, redirect to /design-consult. Edit-design is for surgical changes, not ground-up rethinking.