skills/sync/SKILL.md
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".
npx skillsauth add tokyo-megacorp/figma-differ syncInstall 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.
If a URL is provided: extract fileKey and sync only that file.
If no URL: read ~/.figma-differ/tracked.json and sync all tracked files. If no tracked files exist, tell the user to run /figma-differ:track <url> first.
For each file, create tasks and dispatch haiku subagents per phase. The main conversation shows only task progress and a final summary. Raw output stays in forked agents.
TaskCreate("Fetch file tree", activeForm: "Fetching <fileName> from Figma API...")
TaskCreate("Index all frames", activeForm: "Cataloging frames and sections...")
TaskCreate("Extract screen flows", activeForm: "Mapping connector lines and transitions...")
TaskCreate("Generate frame docs", activeForm: "Extracting text, colors, buttons, layout...")
TaskCreate("Update search index", activeForm: "Indexing frames for semantic search...")
Execute each phase sequentially — each depends on the previous. Mark tasks in_progress before starting, completed when done.
~/.figma-differ/)Task lifecycle:
TaskUpdate(taskId, status: "in_progress")Agent(model: "haiku") — agent reports only counts, never raw outputTaskUpdate(taskId, status: "completed")Agent(model: "haiku", prompt: "
Fetch the Figma file tree for <fileKey>.
Run: bash $CLAUDE_PLUGIN_ROOT/scripts/figma-api.sh fetch_file_tree <fileKey> > /tmp/figma-tree-<fileKey>.json
Report: file size in bytes
")
Agent(model: "haiku", prompt: "
Walk /tmp/figma-tree-<fileKey>.json and extract FRAME/SECTION/COMPONENT_SET nodes.
Write ~/.figma-differ/<fileKey>/index.json.
Report: total frame count
")
Agent(model: "haiku", prompt: "
Run: node $CLAUDE_PLUGIN_ROOT/scripts/extract-flows.js <fileKey> /tmp/figma-tree-<fileKey>.json
Report: connector count, prototype count, frames with flows
")
Agent(model: "haiku", prompt: "
Run: node $CLAUDE_PLUGIN_ROOT/scripts/generate-frame-md.js <fileKey>
Report: generated count, skipped count
")
Agent(model: "haiku", prompt: "
Run: source $CLAUDE_PLUGIN_ROOT/scripts/lib/qmd.sh && qmd_reindex
Report: new docs indexed, chunks embedded
")
After all phases: clean up temp tree file, update tracked.json with lastSynced timestamp.
After all tasks complete, print a single summary:
Sync complete — <fileName> (<fileKey>)
Frames: F indexed
Flows: C connectors, P prototype
Docs: G generated (S skipped)
Search: N new chunks embedded
Last synced: <timestamp>
/figma-differ:search "query" to find frames
/figma-differ:diff-all <url> to check changes
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".
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".
content-media
Semantic search across all tracked Figma frames using QMD hybrid search. Finds frames by content, component names, text strings, or natural language queries like "the login screen" or "frames with portfolio charts". Use when the user runs /figma-differ:search or says "find the Figma frame for", "which frame has", "search Figma frames", or "find frames with".