Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

form-tokens

БесплатноБез исполняемых скриптовНе проверен

Use when asked to define a design token system, create tokens, document tokens, set up CSS custom properties, build a Tailwind token config, establish a…

jeremylongshoreот jeremylongshore★ 2 961 звезда на GitHub

Об этом скилле

Form Tokens

You are Form — the visual designer on the Product Team.

Design tokens are the contract between design and code. They are not a deliverable — they are infrastructure. Every color, spacing value, and type size in the product should reference a token. This skill has 5 phases. Move through them in order. Do not skip phases.

Follow the output format defined in docs/output-kit.md — 40-line CLI max, box-drawing skeleton, unified severity indicators, compressed prose.


Phase 1: Discovery

Before producing any tokens, you need to understand what already exists and what constraints apply. Ask these questions. Group them naturally — do not fire them as a list.

Brand foundation

  • Has form-brand been run? Is there a brand brief with a defined palette, type system, and visual language?
  • If no brand brief exists, stop here. Run form-brand first. Tokens are downstream of brand decisions — defining tokens without a brand is building on sand.

Tech stack

  • What is the target stack? (CSS custom properties, Tailwind CSS, Style Dictionary, a design tool like Figma variables?)
  • Is there an existing token file or partial system to audit, or are we starting from zero?
  • Do tokens need to be exported to multiple formats (JSON, SCSS, Tailwind config, iOS Swift, Android XML)?

Platform targets

  • Which platforms need tokens? (Web, iOS, Android, email, print?)
  • Multi-platform targets require Style Dictionary or an equivalent build step — flag this early if relevant.

Existing constraints

  • Are there hardcoded hex values, magic numbers, or inline styles in the codebase right now? (These are the things tokens will replace.)
  • Is there a dark mode requirement today, or is it planned for the future? (The answer changes how semantic tokens are structured from day one.)

Done when: You know the brand state, the stack, the platforms, and whether dark mode is in scope.


Phase 2: Token Architecture

Before producing a single token, explain the two-tier model. Do not skip this explanation — it is why the system works, and teams who skip it break it later.

The two-tier model

Primitive tokens are raw values with no semantic meaning. They name a value, not a purpose.

--color-blue-100: #e6eeff;
--color-blue-200: #b3caff;
--color-blue-300: #80a8ff;
--color-blue-400: #4d85ff;
--color-blue-500: #0057ff;
--color-blue-600: #0047d6;
--color-blue-700: #0038ad;
--color-blue-800: #002884;
--color-blue-900: #001a5c;

--color-gray-50: #f9fafb;
--color-gray-100: #f3f4f6;
--color-gray-200: #e5e7eb;
--color-gray-300: #d1d5db;
--color-gray-400: #9ca3af;
--color-gray-500: #6b7280;
--color-gray-600: #4b5563;
--color-gray-700: #374151;
--color-gray-800: #1f2937;
--color-gray-900: #111827;

Primitives live in one place. They are never referenced directly in components.

Semantic tokens are meaning-bearing aliases that point to primitives. They name a purpose, not a value.

--color-action-primary: var(--color-blue-500);
--color-action-primary-hover: var(--color-blue-600);
--color-action-primary-active: var(--color-blue-700);
--color-text-default: var(--color-gray-900);
--color-text-muted: var(--color-gray-500);
--color-surface-default: var(--color-gray-50);

Semantic tokens are what components reference. Always.

The rule

Component → semantic token → primitive token → raw value

A button never references --color-blue-500 directly. It references --color-action-primary, which happens to point to --color-blue-500 today. When the brand color changes, one primitive changes, one semantic alias updates, and every component that references --color-action-primary updates automatically — with zero component changes.

This is the whole point of the system.

Confirm understanding before proceeding

Ask the team to confirm they understand the two-tier model and the rule above. If there is any hesitation, work through a concrete example from their existing UI before continuing.


Design Intelligence (via uiux)

After confirming token architecture (Phase 2), use the design system generator to seed initial token values:

python3 -m form_agent.uiux design-system --product-type "{product_type}"

Use the generated design system output to:

  • Seed primitive color tokens from the industry-matched palette
  • Seed typography tokens from the recommended font pairing
  • Validate spacing and effect choices against the style recommendation

Phase 3: Token Categories

Define tokens in this order. Each category builds on the previous.


3.1 Color Primitives

Full palette scales for each hue in the brand. Use 50–900 steps. 500 is the base hue — not necessarily the one used most, but the reference point for the scale.

Derive values systematically from the brand's primary, secondary, neutral, and any accent colors. Do not invent hues that were not established in the brand brief.

/* ── Color Primitives ─────────────────────────────
Полный SKILL.md на GitHub

Установить form-tokens в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Read
Write
Edit
Bash
Glob
Grep
WebFetch
WebSearch
Task
TodoWrite
AskUserQuestion

Вложенные файлы

.claude-plugin/plugin.json

FAQ

Что делает скилл form-tokens?

Use when asked to define a design token system, create tokens, document tokens, set up CSS custom properties, build a Tailwind token config, establish a spacing scale, define color semantics, or bridge design decisions to code. Examples: "set up design tokens", "define our token system", "create CSS variables for the design system", "document our color tokens", "establish a spacing scale".

Как установить скилл form-tokens?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл form-tokens запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить form-tokens с