figma-overlay-cleanuplisted
Install: claude install-skill dengshangli/dsl-skills
# Figma Overlay Cleanup
Remove only comparison artifacts recorded by `$figma-overlay-check`. For a current v3 overlay, clean up exactly three project changes: the marked page-entry import, the one temporary source file, and the one static design image. Preserve every UI fidelity fix.
## Workflow
### 1. Resolve and validate the manifest
Resolve the canonical project root and read only:
```text
<project-root>/.figma-overlay-state.json
```
Require `projectRoot` to equal the canonical project root. Support:
- version 3: single temporary source file plus one marked page-entry import
- version 2: legacy source-backed overlay with generated files and integration blocks
- version 1: legacy runtime-injected overlay
Stop if the manifest is missing, invalid, belongs to another project, uses an unsupported version, or contains an unsafe path. Do not guess paths or remove unrecorded files.
For all versions, validate `staticImagePath`, `downloadedImagePath`, and every `artifactPaths` item as exact file paths. Project paths must resolve inside `projectRoot`; temporary paths must resolve under `/tmp/figma-overlay`. Reject directories, broad paths, wildcards, and ordinary application assets.
For version 3, require:
- `temporarySourcePath` resolves inside `projectRoot`, names one overlay-specific regular file, and is not the page-entry file
- `entryImport.path` resolves inside `projectRoot` and names an existing application source file
- `entryImport.startMarker` and `entryImport.en