figma-developer

v2026.09.24

Extracts design data from Figma via the REST API and converts designs to React code. Use when syncing Figma tokens to CSS variables, exporting icons as SVG components, generating code from Figma designs, or automating design-to-code workflows. Use for design token extraction, icon export, component generation, and CI-based Figma sync.

GitHub
Install command
npx skhub add oakoss/figma-developer
Markdown
SKILL.md

Figma Developer

Overview

Automates the Figma-to-code bridge using the Figma REST API. Extracts design tokens (colors, typography, spacing) as CSS variables and JSON, exports icons as SVG React components, generates React components from Figma node structures, and sets up CI pipelines for continuous design sync.

When to use: Syncing design tokens from Figma to code, exporting icon sets as React components, generating component scaffolding from Figma variants, setting up automated design sync in CI.

When NOT to use: Manual one-off design tweaks (just copy values), Figma plugin development (use the Plugin API instead), real-time collaborative editing (use Figma webhooks directly), or projects without a Figma design system.

Quick Reference

PatternAPI / ApproachKey Points
Get file dataGET /v1/files/:keyReturns full document tree with styles and fills
Get specific nodesGET /v1/files/:key/nodes?ids=...Fetch only the nodes you need to reduce payload
Export imagesGET /v1/images/:key?ids=...&format=svgRenders nodes as SVG/PNG/PDF; URLs expire in 14 days
Get stylesGET /v1/files/:key/stylesLists all published color, text, and effect styles
Get componentsGET /v1/files/:key/componentsLists all published components with metadata
Get component setsGET /v1/files/:key/component_setsReturns variant groupings for components
Get variablesGET /v1/files/:key/variables/localExtracts Figma Variables (colors, spacing, etc.)
Publish variablesPOST /v1/variablesPublishes local variables organization-wide
Token extractionParse styles from file response, transform to CSS/JSONNo built-in "extract tokens" endpoint exists
CI syncGitHub Actions cron + peter-evans/create-pull-requestAuto-sync PRs on Figma file changes

Figma File Organization

SectionContents
ColorsAll color styles with / hierarchy (Primary/500)
TypographyText styles (Heading/Large, Body/Regular)
SpacingSpacing guide values
ComponentsVariant groups (Button/Primary, Card/Default)
IconsAll icons in one exportable frame

Common Mistakes

MistakeFix
Using fabricated API methods like extractDesignTokens()Parse styles from GET /v1/files/:key response manually
Hardcoding Figma values instead of using tokensExtract tokens to CSS variables, reference with var()
Not normalizing Figma style namesLowercase + replace special chars with hyphens
Forgetting Figma uses 0-1 RGB not 0-255Multiply by 255 and round before hex conversion
No API response cachingCache with TTL to avoid rate limits
Manual icon exportsAutomate with GET /v1/images/:key + React component generation
No CI sync workflowGitHub Actions cron + create-pull-request action
Using expired image URLsImage export URLs expire in 14 days; re-fetch before use

Libraries

PackagePurpose
figma-apiCommunity Figma REST API client (typed)
@figma/rest-api-specOfficial TypeScript types for Figma API
style-dictionaryTransform design tokens across platforms
svgoOptimize exported SVGs before use
@svgr/coreConvert SVG files to React components

Delegation

  • Design systems: see design-system skill
  • Asset optimization: see asset-manager skill

References

Discovery
Tags

No tags published for this skill.

Version
Latest version metadata

Version

v2026.09.24

Published

Sep 24, 2026

Category

Uncategorized

License

Not specified

Source path

skills/figma-developer

Default branch

main

Latest commit

85e3a39

Tree SHA

a4c9e7b