/throughline:token-crosswalk-builderfrom ThroughLine
Builds a persistent three-way map (crosswalk.json) between new design tokens, old Figma variables, and old code identifiers for brownfield design system retrofits. Wires the tokens:validate CI gate and installs canonical scripts.
Ships in ThroughLine. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Builds the backbone artifact of a brownfield retrofit: crosswalk.json, a
persistent three-way map of new token ↔ old Figma variable ↔ old code identifier.
It drives the code retrofit and the tokens:validate CI gate. This skill also
installs the canonical scripts into the user's repo and wires the gate.
This is a brownfield skill. Before doing anything, read
${CLAUDE_PLUGIN_ROOT}/references/brownfield-retrofit.md (read discipline, the 7
guardrails, the safe sequence) and
${CLAUDE_PLUGIN_ROOT}/references/crosswalk-schema.md (the exact contract). Greenfield
builds don't need this skill.
Read user.codingLevel (${CLAUDE_PLUGIN_ROOT}/references/coding-level.md) and scale
explanation accordingly. The crosswalk involves JSON, npm scripts, and a CI gate — for
new users explain each plainly the first time; for comfortable users be terse.
Actions are identical across levels.
Read the manifest. This skill needs:
packages/tokens/dtcg/tokens.json — the validator
resolves against it. If it doesn't exist, offer to run token-sync-layer first
(it emits this file). Apply the read discipline: confirm the file exists by
reading it, never assume it's absent without looking.audit manifest section (code surface,
Figma inventory, percentSemantic) populated by design-system-audit. If
audit is present, use it to seed the rows. If it is null (audit hasn't run —
it lands in Plan 3), don't block: ask the user for the old→new mapping inputs
directly (which old Figma variables and code symbols map to which new tokens),
and proceed. Note plainly that running design-system-audit first would
pre-fill this.local-git or github (workspace.stage) so the installed
scripts and package.json changes land as a reviewable diff/PR. If still
folder, offer repository-builder.crosswalk.jsonWrite packages/tokens/crosswalk.json per the contract in
${CLAUDE_PLUGIN_ROOT}/references/crosswalk-schema.md. One row per new token:
newToken — the DTCG dot-path exactly as it appears in
packages/tokens/dtcg/tokens.json (e.g. color.text.primary).newValue — the resolved leaf value (follow {…} aliases to the literal).tier — primitive or semantic.figmaOld — the old Figma variable name/path, or null if newly added.codeTokens[] — the old code identifiers this token replaces ($primary-red,
bg-primary-red, Colors.primaryRed, --primary-red). May be [].status — aligned | renamed | drift-fix | added | mapped-nearest. Assign by:
same name & value → aligned; same value, new name → renamed; value
intentionally changed → drift-fix; brand-new token → added; no exact old
equivalent, mapped to nearest → mapped-nearest.recommendedSemantic — optional semantic target for a raw/primitive usage, else
null.Do not guess values. Every newValue comes from a read of the DTCG source, not an
assumption (read discipline).
tokens:validateCopy these from ${CLAUDE_PLUGIN_ROOT}/scripts/ into the user's repo verbatim
(they are zero-dependency and version with the user's repo so their CI can run them):
lib/crosswalk.mjs → packages/tokens/scripts/lib/crosswalk.mjslib/dtcg.mjs → packages/tokens/scripts/lib/dtcg.mjs (required by
validate-crosswalk.mjs — copying the validator without it breaks the gate at import)lib/source-scan.mjs → packages/tokens/scripts/lib/source-scan.mjs (required by
guard-token-removal.mjs — copying the guard without it breaks it at import)validate-crosswalk.mjs → packages/tokens/scripts/validate-crosswalk.mjsbuild-reverse-index.mjs → packages/tokens/scripts/build-reverse-index.mjsguard-token-removal.mjs → packages/tokens/scripts/guard-token-removal.mjscrosswalk.schema.json → packages/tokens/crosswalk.schema.json (beside
crosswalk.json, so the $schema pointer resolves)Then add to packages/tokens/package.json scripts (don't clobber existing keys):
"tokens:validate": "node scripts/validate-crosswalk.mjs --crosswalk crosswalk.json --tokens dtcg/tokens.json",
"tokens:reverse-index": "node scripts/build-reverse-index.mjs --crosswalk crosswalk.json --out crosswalk.reverse.json"
See ${CLAUDE_PLUGIN_ROOT}/scripts/README.md for the full install contract.
Run npm run tokens:validate (from packages/tokens/). It must report N/N —
every row's resolved value matches its newValue. If it reports mismatches or
missing tokens, fix the crosswalk (or the token source) and re-run. Never proceed
on a red validator and never edit a generated token file to make it pass — change
the source in Figma and re-sync (guardrail 7). The validator is the source of truth
that the crosswalk and the real tokens agree.
Run npm run tokens:reverse-index. This writes crosswalk.reverse.json
(codeToken → newToken), which the code-retrofit phase uses to semi-automate the
SCSS/Tailwind swaps. If it reports conflicts (one old symbol mapping to two new
tokens), resolve them in the crosswalk before relying on the index.
Write the tokenCrosswalk section only (this skill owns it; never write another
skill's fields):
path — the actual path written ("packages/tokens/crosswalk.json").statusCounts — copy the camelCase object the validator printed
({ aligned, renamed, driftFix, added, mappedNearest }).validatorPassing — true once tokens:validate passes N/N.Append token-crosswalk-builder to completedSkills.
tokens.intakeMode is owned by
design-system-audit).tokens:validate.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub jrpease/throughline --plugin throughline12 skills in this plugin
/component-builderBuild Figma components — buttons, inputs, cards, badges, chips, modals, and more — with variant matrices (types, sizes, states) and icon/component/content slots bound to the design system's tokens and styles. Use this when the user wants to create components, build a component library, make buttons/inputs/cards/etc. in Figma, or set up the foundational UI kit. Also trigger after tokens and icons exist, when the user is ready to build actual UI components./component-pipelineTake a single new component from Figma to fully-built-and-storied code, end to end — build it in Figma, sync any new tokens it introduced, then build its code component and stories. Orchestrates component-builder, token-sync-layer, and storybook-chromatic-builder with a human confirmation between each stage. Use this when the user wants to add a new component to an existing design system, ship a component end-to-end, or run the full new-component flow. Also trigger on "/new-component" or when someone wants one component built all the way through to code./design-system-auditMeasure a pre-existing design system before retrofitting it onto tokens, so the retrofit is right-sized. This is a PROCESS skill and the brownfield front door. Use this when retrofitting a design system onto a mature codebase and an already-populated Figma file, when the user wants to audit an existing system, size a retrofit, count existing tokens/variables/bindings, or figure out how much work a migration is. Also trigger when figma-environment-setup detects a brownfield situation (existing repo or populated Figma file), before any building./figma-environment-setupSet up the local working folder and connect Claude to Figma so the design-system skills can read and write variables, styles, and components. Run this BEFORE brainstorming and before any other design-system skill. Invoke it immediately when the user wants to start, set up, or begin building a design system — phrases like 'let's setup my design system', 'let's get started', 'connect Figma', or 'build my design system' should all trigger this skill first, ahead of brainstorming. Also trigger when the user wants to fix a broken Figma connection, or mentions the Figma Console MCP, the desktop bridge plugin, or a Figma access token./icon-system-builderBuild an icon system in Figma — a dedicated "Icons" page of well-named, scalable icon components from Lucide, Tabler, Phosphor, Material, or custom SVGs. Use this when the user wants to set up icons, add an icon library, import Lucide or Material icons, create icon components, or build an icon set in Figma. Also trigger when the user mentions iconography, an icon page, or needs icons for their components./repository-builderGraduate the local design-system folder into a real monorepo — a pnpm + Turborepo workspace with packages for tokens and UI components — and walk the user from a plain folder to local git to a GitHub remote with PRs and CI. Use this when the user wants to set up a repo, create a GitHub repository, add version control, turn their folder into a real project, or say "I want to turn this into code". Also trigger when the user mentions monorepo, Turborepo, pnpm workspace, GitHub, version control, or when the token-sync or Storybook skills report that a repo isn't set up yet.Other plugins' skills for the same job