Ghost Heal
Detailed Ghost Heal guide: how SXL Studio repairs ghost modes, orphan collections, stale variable bindings, and duplicate collections.
What Ghost Heal is for
Ghost Heal repairs stale variable infrastructure in a Figma file when references become inconsistent.
Typical symptoms:
- deleted modes or collections still appear in
Apply variable mode; - bindings exist visually, but source variables cannot be resolved normally;
- duplicated local collections with the same name;
- stale references after copy/paste from other files or library migrations.
Ghost Heal scans, remaps, and cleans those references with controlled steps.
How to run it
- Open the target Figma file.
- Open SXL Studio -> Inspect.
- In the left tree footer, click Ghost Heal.
- Review options in the modal.
- Click Run Ghost Heal.
- Read the notification summary and warnings.
Default profile (safe baseline)
Default options from current plugin build:
Clean explicit mode overrides: ONRebind exact variable matches: ONRemove orphan local collections: ONMerge visible duplicate collections: OFFForce-clean unresolved ghosts: ON
Final diagnostics are always executed at the end of the run.
Option reference
| Option | What it does | Risk profile |
|---|---|---|
| Clean explicit mode overrides | Clears resolvable/stale explicit mode overrides on nodes/pages before and after heal stages. | Low |
| Rebind exact variable matches | Rebinds by exact triplet: collection name + variable name + variable type. | Low |
| Remove orphan local collections | Removes orphan collections after safe rebind. Auto-coupled with exact-match rebind. | Medium |
| Merge visible duplicate collections | Merges same-name local collections into one repair target. | Medium/High (structural change) |
| Force-clean unresolved ghosts | Detaches unresolved ghost bindings from affected nodes and can recreate stubborn text nodes when required. | High (may intentionally break stale binding links) |
Execution model and scope
Ghost Heal dynamically chooses scope based on options:
- If
Remove orphan local collections+Rebind exact variable matchesare both ON, it runs in document repair mode. - Otherwise, it focuses on the active page where possible.
Core stages:
- initial explicit mode cleanup;
- duplicate collection analysis and optional merge;
- orphan collection scan and exact variable remap plan;
- swap-stage rebind for variables/styles (
pageordocumentscope depending on repair type); - orphan/duplicate collection removal when enabled;
- force-clean detach pass for unresolved ghosts when enabled;
- post-cleanup explicit mode pass;
- final diagnostics of resolved-mode ghost references.
Understanding the result
Ghost Heal returns structured counters in the notification/report, including:
mode override(s) cleanedbinding(s) reboundcollection(s) removedghost node(s) force-cleanedtext node(s) recreated- unresolved ghost reference counters
If unresolved items remain, the plugin reports them explicitly instead of silently mutating unrelated data.
Recommended runbook
- Start with defaults.
- If unresolved references remain, verify local variable availability (name/type alignment).
- Re-run after required fonts/libraries are available.
- Enable
Merge visible duplicate collectionsonly when you intentionally want consolidation. - After Ghost Heal, run Swap if you still need library/local migration.
Important behavior guarantees
- Ghost Heal does not randomly guess replacement variables.
- Exact-match rebind is deterministic.
- Destructive actions are tied to explicit options.
- Under Figma
dynamic-pageAPI limits, some references may be detectable but not removable; these are reported as unresolved.