.cursor/skills/figma-design-tokens/SKILL.md
Imports Figma design token JSON exports and applies them to the Tailwind CSS config and design system. Use when the user provides Figma token files, mentions design tokens from Figma, or asks to implement a token category (radius, spacing, colors, typography, shadows, etc.).
npx skillsauth add KhoaSuperman/Finmori-ReactNativeWeb figma-design-tokensInstall 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.
Workflow for importing Figma variable exports (JSON) into this project's Tailwind-based design system.
Figma exports tokens as Mode 1.tokens.json inside a named folder (e.g. 2. Radius/, 3. Spacing/). Each token entry has:
{
"token-name": {
"$type": "number",
"$value": 8,
"$extensions": { "com.figma.scopes": ["CORNER_RADIUS"] }
}
}
Key fields: $value (the design value), $extensions.com.figma.scopes (usage hint like GAP, CORNER_RADIUS).
- [ ] Step 1: Read the Figma token JSON
- [ ] Step 2: Map tokens to Tailwind config
- [ ] Step 3: Create showcase page
- [ ] Step 4: Add to home navigation
Read all .tokens.json files in the provided directory. Extract token names and $value fields. Ignore $extensions metadata (it's for Figma internal use).
Config file: tailwind.config.js
Determine the Tailwind property from the token name prefix:
| Token prefix | Tailwind property | Placement |
|---|---|---|
| radius-* | borderRadius | Top-level theme (replaces defaults) |
| spacing-* | spacing | theme.extend (adds to defaults) |
| shadow-* | boxShadow | theme.extend |
| font-size-* | fontSize | theme.extend |
| font-weight-* | fontWeight | theme.extend |
Placement rules:
theme.{property} when the Figma scale completely replaces the Tailwind defaults (e.g. borderRadius — Figma values differ from TW defaults at most sizes).theme.extend.{property} when adding semantic aliases alongside Tailwind's numeric defaults (e.g. spacing — Figma values map 1:1 to existing TW numeric keys, so we add named aliases).Naming: Strip the prefix (radius-, spacing-) to get the Tailwind key. Token radius-xl becomes key xl with value from $value as "Npx".
Special keys:
DEFAULT entry for the md value when defining borderRadius (enables bare rounded class).full: "9999px" for radius if present in tokens.Create src/app/showcase/{token-category}.tsx following the established pattern.
Required imports:
import { View } from "react-native"
import { ShowcasePage } from "@/components/showcase-page"
import { Typography } from "@/components/ui-kit/Typography"
Page structure (3 sections minimum):
Conventions:
<Typography> for all text (never raw <Text>).className for styling (never StyleSheet.create).as const on the token data array for type safety.ShowcasePage wrapper with title and description props.In src/app/(tabs)/index.tsx, add an entry to the CORE_COMPONENTS array:
{
title: "Token Category",
description: "Brief description of the token category.",
route: "/showcase/token-category",
},
tailwind.config.jssrc/app/showcase/*.tsxsrc/app/(tabs)/index.tsxsrc/components/showcase-page.tsxsrc/components/ui-kit/Typography.tsxdevelopment
Analyzes and processes Figma primitive color token JSON exports into Tailwind CSS config and showcase pages. Use when the user provides Figma color token files, mentions primitive colors from Figma, or asks to import a color palette. Handles nested color groups, alpha transparency values, and large token sets (300+).
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.
development
Run, watch, debug, and extend OpenClaw QA testing with qa-lab and qa-channel. Use when Codex needs to execute the repo-backed QA suite, inspect live QA artifacts, debug failing scenarios, add new QA scenarios, or explain the OpenClaw QA workflow. Prefer the live OpenAI lane with regular openai/gpt-5.4 in fast mode; do not use gpt-5.4-pro or gpt-5.4-mini unless the user explicitly overrides that policy.