# Layer Rebuild

Local prototype · 2026-10-26

A local image-processing experiment that extracts selected elements, attempts background repair, and produces a layered PSD draft for further design work.

## Design question

How can a designer recover useful, editable structure from an image that only exists as a flat file?

Combine an interactive Claude Code skill with a parameterized image pipeline. Keep selection and external-processing choices visible, and inspect the output before accepting it.

## My contribution

Workflow design, a custom Claude Code skill, and a local interface for planning and reviewing layer extraction.

## Workflow

1. **Select** — Choose the image and identify the elements that must be separated.

2. **Extract** — Route regions through segmentation or local extraction methods.

3. **Repair** — Choose whether and how to fill exposed background areas.

4. **Inspect** — Review layers and export a PSD draft with its recipe.

## Mechanisms

**Skill + tools** — A custom Claude Code skill guides choices and prepares a JSON recipe for segmentation, edge refinement, repair, and PSD assembly.

**Execution controls** — The local interface requests separate consent for external segmentation and generative fill, and fails required-object extraction when it cannot be fulfilled.

**Output validation** — Checks confirm the PSD exists and contains layers; visual separation and repair quality still require human inspection.

## From pixels to a reviewable layer stack.

Workflow illustration · no original product image or application screenshot

**Intent** — “Separate the main object and the label.”

Required elements become explicit extraction requests rather than an implied promise to separate everything.

**Processing** — A recipe records the chosen operations.

The image, selected elements, repair method, and output paths form a repeatable processing configuration.

**Review** — Inspect the foreground and the background separately.

A valid PSD does not prove that all objects are correctly separated or repaired.

**Handoff** — Export a layered draft and its recipe.

The local export also includes a preview and a manifest describing unresolved limitations.

The current local UI does not reconstruct hidden object parts. Its text layers are raster pixels; the advanced pipeline has separate, manually configured text reconstruction.

## Current state and next steps

The parameterized pipeline and local alpha interface run locally. Exports are explicitly treated as drafts.

Improve per-object selection and the quality of background repair before preparing a hosted trial.

Built around the SAM3 Cutout pipeline, using existing segmentation and inpainting models alongside local image-processing methods.

https://linadong.design/lab/layer-rebuild
