Claude-skill-registry figma-desktop
Extract design data from Figma files using REST API scripts. Includes frame extraction, metadata retrieval, screenshots, design token extraction, annotations, and FigJam content for design-to-code workflows.
git clone https://github.com/majiayu000/claude-skill-registry
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/figma-desktop" ~/.claude/skills/majiayu000-claude-skill-registry-figma-desktop && rm -rf "$T"
skills/data/figma-desktop/SKILL.mdFigma Desktop Skill
Extract and process Figma design data for design-to-code implementation in the IRIS project.
Capabilities
REST API Scripts
Node.js scripts that extract Figma data (requires
FIGMA_TOKEN):
- extract-frames.js - Extract all frames from a Figma page
- get-metadata.js - Get node structure and hierarchy
- get-screenshot.js - Capture node screenshots
- get-variable-defs.js - Extract design tokens (colors, text styles, variables)
- get-annotations.js - Get dev mode annotations and handoff notes
- get-code-connect-map.js - Get Figma component metadata for code mapping
- get-figjam.js - Extract FigJam board content (sticky notes, shapes, text)
- compare-frames.js - Compare current vs documented frames
Setup
Figma Token
Generate your token at https://www.figma.com/settings → Personal Access Tokens
The scripts look for the token in this order:
- CLI argument (passed directly to script)
environment variableFIGMA_TOKEN
environment variableFIGMA_KEY- Claude user settings (
)~/.claude/settings.json
Recommended: Claude Settings (persists across sessions)
Add to
~/.claude/settings.json:
{ "env": { "FIGMA_KEY": "your-figma-token" } }
Alternative: Environment Variable
# Windows (PowerShell) $env:FIGMA_TOKEN="your-token" # Windows (CMD) set FIGMA_TOKEN=your-token # Mac/Linux export FIGMA_TOKEN="your-token"
IRIS Project File Key
xFC8eCJcSwB9EyicTmDJ7w
Usage
Extract Frames
node .claude/skills/figma-desktop/scripts/extract-frames.js xFC8eCJcSwB9EyicTmDJ7w 2501:2715
Get Metadata
node .claude/skills/figma-desktop/scripts/get-metadata.js xFC8eCJcSwB9EyicTmDJ7w 6804:13742
Get Screenshot
node .claude/skills/figma-desktop/scripts/get-screenshot.js xFC8eCJcSwB9EyicTmDJ7w 6804:13742
Get Design Tokens
node .claude/skills/figma-desktop/scripts/get-variable-defs.js xFC8eCJcSwB9EyicTmDJ7w
Get Annotations
node .claude/skills/figma-desktop/scripts/get-annotations.js xFC8eCJcSwB9EyicTmDJ7w 6804:13742
Get Code Connect Mapping
node .claude/skills/figma-desktop/scripts/get-code-connect-map.js xFC8eCJcSwB9EyicTmDJ7w
Get FigJam Content
node .claude/skills/figma-desktop/scripts/get-figjam.js xFC8eCJcSwB9EyicTmDJ7w 123:456
Compare Frames
# First extract current frames node .claude/skills/figma-desktop/scripts/extract-frames.js xFC8eCJcSwB9EyicTmDJ7w 2501:2715 # Then compare with documented frames node .claude/skills/figma-desktop/scripts/compare-frames.js
Output Files
Scripts create temporary files in project root:
- Frame listtemp-frames-list.json
- Node metadatatemp-metadata-*.json
- Design tokenstemp-design-tokens-*.json
- Annotations datatemp-annotations-*.json
- Component mappingstemp-code-connect-*.json
- FigJam contenttemp-figjam-*.json
- Frame comparisontemp-comparison-report.json
- Screenshotsscreenshot-*.png
Clean up with:
rm temp-*.json screenshot-*.png
Integration
This skill integrates with IRIS documentation:
- Frame mapping:
docs/figma/frame-node-mapping.json - Screenshots:
docs/figma/screenshots/ - Design tokens:
docs/figma/design-system-mapping.json
When to Use This Skill
Use this skill when:
- Implementing UI components from Figma designs
- Extracting design tokens for the design system
- Updating frame mappings after Figma changes
- Generating screenshots for documentation
- Extracting FigJam brainstorming content
- Getting dev handoff notes and annotations
- Automating batch operations on Figma data
- Running in CI/CD pipelines
Node ID Format
Node IDs can be in either format:
- Colon format:
(API format)2501:2715 - Dash format:
(URL format)2501-2715
Scripts automatically convert between formats as needed.
File Keys
Find the file key in any Figma URL:
https://figma.com/design/<FILE_KEY>/...
Token Resolution
Scripts automatically resolve the Figma token from:
- CLI argument
env varFIGMA_TOKEN
env varFIGMA_KEY
→~/.claude/settings.jsonenv.FIGMA_KEY