design-token-generation
Installation
SKILL.md
Design Token Generation Strategy
Scan an existing design to discover all unique colors, font sizes, spacing values, and radii, then create a structured variable collection and named styles, and finally link nodes to them.
Steps
Phase 1: Discovery
- Call get_styles() to check what styles already exist (avoid duplicating them).
- Call get_variable_defs() to check existing variables.
- Call get_design_context(detail="compact") to scan the full node tree.
- Collect unique values:
- Colors: all unique hex fills and stroke colors across nodes.
- Font sizes: all unique fontSize values on TEXT nodes.
- Spacing: all unique itemSpacing, paddingTop/Right/Bottom/Left values on FRAME nodes.
- Radii: all unique cornerRadius values.