token-builder

Creates two-tier primitive and semantic design token systems as Figma variables with modes and styles.

77|11|Updated Jun 2, 2026
One-click install
npx skills add https://github.com/jrpease/throughline --skill token-builder-jrpease
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: token-builder
Source: https://github.com/jrpease/throughline/tree/main/skills/token-builder
Command: npx skills add https://github.com/jrpease/throughline --skill token-builder-jrpease

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Building a design token system in Figma by hand means creating hundreds of variables across collections, wiring semantic aliases to primitives, configuring light/dark modes, and composing text and effect styles — a slow, error-prone process where one wrong structure breaks modes and aliases downstream. ## Core Features & Use Cases - Two-tier token architecture: Builds primitive collections (color ramps, spacing, type scale, radius, border) and semantic collections that alias onto primitives, with one collection per category per tier so modes stay isolated. - Mode and theme support: Configures Light/Dark modes on semantic color collections and Brand modes on primitive color collections, keeping each collection under Figma's mode limits. - Contrast gating and styles: Asserts WCAG 4.5:1 contrast on semantic color pairs per mode before proceeding, then generates bound text styles and mode-aware elevation effect styles. - Brownfield retrofit: Renames and realigns existing Figma variables in place to preserve IDs and bindings, with before/after binding audits. - Use Case: Ask the agent to build a token system from your brand color and font; it brainstorms the structure with you, builds primitives, checkpoints, then builds semantic aliases and styles ready for sync to code. ## Quick Start Ask the agent to build a two-tier design token system in Figma with light and dark modes starting from your brand color.

Frequently Asked Questions about token-builder

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

FAQPage Schema
How do I create design tokens in Figma with light and dark modes?

This skill builds primitive collections for raw values and semantic collections that alias onto them, with Light and Dark modes on the semantic color collection. Toggling the mode on a frame re-resolves every alias, so backgrounds and text recolor automatically.

How do I build a color ramp and type scale as Figma variables?

The skill brainstorms seeds with you, then generates full tonal ramps (e.g. gray/50–900), a 4px-based spacing scale, and a modular type scale via scripted figma_execute loops. Each category gets its own primitive and semantic collection so modes never leak across categories.

Can I convert existing Figma variables into a two-tier token system?

Yes, the brownfield retrofit path renames and realigns existing variables in place to preserve their Figma IDs and bindings. It snapshots binding counts before and after each change and never deletes and recreates variables, which would sever every binding.

Why should semantic tokens alias primitives instead of using literal values?

Aliases let you change a primitive once and have every semantic token, style, and synced code value update automatically. Flattening semantics into literals breaks runtime theming and makes light/dark mode switching impossible downstream.

Does this skill check color contrast for accessibility?

Yes, it asserts WCAG 4.5:1 contrast on semantic foreground/background pairs in every mode using a shipped contrast module before completing the tier. A failing pair stops the build unless the user explicitly accepts it, which is recorded for the downstream sync gate.

What are the limitations of Figma variable modes per collection?

Modes belong to a collection, so every variable in a collection shares the same mode axis, and Figma Professional caps collections at 4 modes. The skill splits collections by category and keeps Brand on primitives and Theme on semantics so no collection exceeds two modes.