figma-token-sync

Synchronizes CSS design tokens with JavaScript theme objects for React Native.

23|5|Updated Apr 3, 2025
One-click install
npx skills add https://github.com/LedgerHQ/lumen --skill figma-token-sync-ledgerhq
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: figma-token-sync
Source: https://github.com/LedgerHQ/lumen/tree/main/.claude/skills/figma-token-sync
Command: npx skills add https://github.com/LedgerHQ/lumen --skill figma-token-sync-ledgerhq

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? After a Figma token sync, the automated pipeline updates CSS tokens but leaves the JavaScript theme files for React Native out of date, causing per-brand inconsistencies and missing tokens that must be reconciled manually. ## Core Features & Use Cases - Brand Discovery: Enumerates all brand themes from the filesystem instead of hardcoding brand lists, and warns when CSS and JS brand sets disagree. - Gap Analysis: Compares CSS token coverage against JS theme keys per brand and category, listing tokens present in CSS but missing from JS. - Guided Updates & Validation: Enforces kebab-case to camelCase conversion, primitive references instead of hardcoded hex values, and typecheck/lint/build verification. - Use Case: After a Figma variables export updates the design-core CSS tokens, run the discovery and comparison scripts to find every JS theme file needing updates, then sync all brands consistently. ## Quick Start Ask the assistant to sync the design tokens after the latest Figma update and check for any CSS tokens missing from the JS theme files.

Frequently Asked Questions about figma-token-sync

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I sync Figma design tokens with React Native theme files?▼

Run the discover-themes.sh script to list all brands and JS theme files, then use compare-tokens.sh per brand and category to find CSS tokens missing from JS. Update every listed theme.dark.ts and theme.light.ts file, referencing primitives rather than hardcoded values.

How to find design tokens present in CSS but missing from JavaScript themes?▼

Use compare-tokens.sh with a brand and category, for example compare-tokens.sh ledger-live background. It extracts CSS token names, converts them from kebab-case to camelCase, and lists candidates not found in the corresponding JS theme section.

Why do token counts differ between CSS and JS theme files?▼

Counts differ when new tokens were added to CSS by the automated Figma pipeline but not yet synced to JS, or when a brand exists on only one side. Rerun compare-tokens.sh to see the exact CSS-only token names and discover-themes.sh to detect brand mismatches.

Can I update only one brand's theme file when syncing tokens?▼

No, partial updates create per-brand inconsistencies. The discovery script lists every JS theme file that must be updated together, and all of them should be modified in the same sync pass before running typecheck, lint, and build validation.

What naming convention applies when converting CSS tokens to JavaScript?▼

CSS token names are kebab-case and must be converted to camelCase in JS, for example --color-border-base-inverted becomes baseInverted. Values must reference primitive color tokens for the correct light or dark set, never hardcoded hex strings.