skills/diff/SKILL.md
Fetches the current state of a Figma node and diffs it against the latest stored snapshot. Runs both structural diff (JSON node tree) and visual comparison (PNG via Claude vision). Use when the user runs /figma-differ:diff with a Figma URL, or says "diff this Figma frame", "what changed in Figma", "compare to snapshot", or "check Figma for changes".
npx skillsauth add tokyo-megacorp/figma-differ diffInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Extract fileKey and nodeId from the Figma URL (same as snapshot skill).
Check for --notify flag in arguments.
bash scripts/auth.sh status (if it fails, tell the user to run bash scripts/auth.sh set and stop)ls -t ~/.figma-differ/<fileKey>/<nodeId_safe>/ — take the first result/figma-differ:snapshot <url> first, then stop~/.figma-differ/)CURRENT_DIR=$(mktemp -d /tmp/figma-diff-XXXX)
bash $CLAUDE_PLUGIN_ROOT/scripts/figma-api.sh fetch_node_json <fileKey> <nodeId> > "$CURRENT_DIR/node.json"
NODE_TYPE=$(jq -r '.nodes["<nodeId>"].document.type // .document.type // empty' "$CURRENT_DIR/node.json")
bash $CLAUDE_PLUGIN_ROOT/scripts/figma-api.sh fetch_node_png <fileKey> <nodeId> "$CURRENT_DIR/screenshot.png" "${NODE_TYPE:-}"
If NODE_TYPE is CANVAS, treat the PNG step as an expected graceful skip. Structural diff still runs; visual comparison only runs when both screenshots exist.
Dispatch the structural-differ agent with:
~/.figma-differ/<fileKey>/<nodeId_safe>/<latest_timestamp>/node.json$CURRENT_DIR/node.jsonWait for the agent's JSON output.
Dispatch the vision-analyzer agent with:
~/.figma-differ/<fileKey>/<nodeId_safe>/<latest_timestamp>/screenshot.png$CURRENT_DIR/screenshot.pngWait for the agent's JSON output.
Format and display:
Structural Diff — <summary from structural-differ>
Severity: <severity>
Added: <count> nodes
Removed: <count> nodes
Changed: <count> nodes
<list top 5 changes with field + before/after>
Visual Fidelity — <overall_fidelity>/5
<summary from vision-analyzer>
Action items:
- <action_item_1>
- <action_item_2>
Snapshot baseline: ~/.figma-differ/<fileKey>/<nodeId_safe>/<timestamp>/
Write the combined result to ~/.figma-differ/<fileKey>/<nodeId_safe>/latest-diff.md.
This is what /figma-differ:notify will post.
If --notify was in the arguments, run the notify workflow (see notify skill).
Otherwise, remind user: Run /figma-differ:notify to post this to Slack.
testing
Subscribe to a Figma file for automatic syncing and semantic search. Adds the file to tracked.json, runs initial index + snapshot-all + frame.md generation, and initializes the QMD search collection. Use when the user runs /figma-differ:track or says "track this Figma file", "subscribe to Figma", "watch this design file", or "add to tracked files".
documentation
Refresh snapshots and search index for tracked Figma files. Fetches current state from Figma, generates frame.md documents, and updates the QMD search index. Use when the user runs /figma-differ:sync or says "sync Figma", "refresh snapshots", "update the Figma index", or "re-sync tracked files".
tools
Takes a snapshot of a Figma node — fetches its JSON structure and PNG screenshot and stores both to ~/.figma-differ/ for later diffing. Use when the user runs /figma-differ:snapshot with a Figma URL, or says "snapshot this Figma frame", "save a Figma baseline", or "take a Figma snapshot".
development
Bulk snapshots every frame in a Figma file — fetches all node JSONs, exports PNGs, and stores comments. Uses a single API call for the tree and batched image exports. Use when the user runs /figma-differ:snapshot-all with a Figma file URL, or says "snapshot all frames", "bulk snapshot", "baseline the whole file", or "snapshot everything in this Figma file".