code-to-figma
Installation
SKILL.md
Code to Figma
Generate a project-specific Figma export pipeline: a walker that reads compiled HTML and CSS, resolves class → token bindings, and pushes a structured JSON artifact to a GitHub Gist that the tokens-sync-to-figma Figma plugin consumes.
The pipeline is intentionally one-directional and CI-anchored. During setup, assess the project once, generate scripts, and wire CI. After that, every push that touches tokens or templates automatically updates the Gist — no agent, no Figma API key, no per-sync friction.
Commands
| Command | Use when | Outcome |
|---|---|---|
/code-to-figma setup |
First time; no scripts exist yet | Walker + token scripts generated, Gist created, CI wired, config saved |
/code-to-figma sync |
Scripts exist; push current state to Gist | figma-export.json built and patched to Gist |
/code-to-figma update |
Stack or token naming changed significantly | Scripts regenerated, CI and config updated |
/code-to-figma status |
Check pipeline health | Gist age, CI status, script presence, config validity |
Default to /code-to-figma setup when no figma-sync.config.json or walker scripts are found.