design_diff
Compare a Figma design node against a saved baseline to identify specific property changes—fills, layout, text, token bindings—then update the baseline as needed.
Instructions
Diff a Figma node against a saved baseline of itself, so after a design changes you edit only the affected code instead of regenerating. First call on a node saves a baseline (its get_design_context, full detail) under .figwright/snapshots/ and returns status 'baseline-created'; a later call returns status 'diff' with the per-node, per-property changes (added / removed / changed nodes; fills, layout/padding, text, token bindings — resolved to readable values, not opaque ids) or 'no-changes'. Pass update:true to accept the current design as the new baseline (re-snapshot). nodeId defaults to the selection; rootDir defaults to the server cwd. The baseline is a plain file the tool writes under the project — committing it (so teammates share the baseline) or gitignoring it is your call; the tool never changes git. It never mutates Figma. Scope by a component / section nodeId, the same unit codegen works on.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodeId | No | Node to snapshot / diff (a pasted Figma URL also works); omit to use the selection | |
| update | No | After diffing, overwrite the baseline with the current design (accept the changes) | |
| rootDir | No | Project root; defaults to the server cwd |