Przejdź do treści
Biblioteka skilli
Projektowanie i UX · Budowanie i kod

design-token-architecture

/design-token-architecture

Układa tokeny projektowe w warstwy podstawową, semantyczną i komponentową, obsługuje tryb ciemny i wiele marek jako podmianę wartości semantycznych oraz generuje pliki wyjściowe dla platform.

Repozytorium
ravenclaude ↗
Licencja
MIT
Ostatnia zmiana repozytorium
27.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 27.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Układa tokeny projektowe w warstwy podstawową, semantyczną i komponentową, obsługuje tryb ciemny i wiele marek jako podmianę wartości semantycznych oraz generuje pliki wyjściowe dla platform.

Wyzwalacze z opisu

how should our tokens be structured?set up design tokenshow do we do dark mode / multi-brand?primitive vs semantic tokens?
Oryginalny opis (EN)

Structure design tokens across the primitive → semantic → component tiers, with theming/dark-mode and multi-brand solved as a semantic-tier value swap, then emit the platform outputs consumers use. Traverses the token branch of the design-systems decision tree: source of truth → tier structure → naming → theming → platform outputs. Reach for this when the user asks 'how should our tokens be structured?', 'set up design tokens', 'how do we do dark mode / multi-brand?', or 'primitive vs semantic tokens?'. Used by design-systems-architect (structure) and design-tokens-and-component-engineer (pipe

Jak działa

  1. Procedure
  2. Worked example
  3. Guardrails
Sekcje z nagłówków SKILL.md, w oryginale · 74 linii, 720 słów
Podgląd SKILL.md
---
name: design-token-architecture
description: "Structure design tokens across the primitive → semantic → component tiers, with theming/dark-mode and multi-brand solved as a semantic-tier value swap, then emit the platform outputs consumers use. Traverses the token branch of the design-systems decision tree: source of truth → tier structure → naming → theming → platform outputs. Reach for this when the user asks 'how should our tokens be structured?', 'set up design tokens', 'how do we do dark mode / multi-brand?', or 'primitive vs semantic tokens?'. Used by design-systems-architect (structure) and design-tokens-and-component-engineer (pipeline)."
---

# Skill: design-token-architecture

> **Invoked by:** `design-systems-architect` (the tier structure & naming decision) and
> `design-tokens-and-component-engineer` (the pipeline that realizes it).
>
> **When to invoke:** "how should our tokens be structured?"; "set up our design tokens"; "how do
> we do dark mode / multi-brand?"; "primitive vs semantic vs component tokens?"; any "what's the
> token model" question.
>
> **Output:** a token architecture — the tier structure (primitive → semantic → component), naming
> conventions, the theming/multi-brand strategy resolved at the semantic tier, and the platform
> outputs — plus the conditions that would restructure it.

## Procedure

1. **Establish the source of truth.** Decide where tokens *live* authoritatively — a
   framework-agnostic format (the W3C DTCG `$value`/`$type` JSON, or a Figma variables export) —
   not scattered in CSS. One source, transformed to every platform. Everything downstream derives
   from it.
2. **Define the primitive tier — raw, context-free values.** `color.blue.600`, `space.4`,
   `font.size.300`. These are the palette: no meaning, no intent, never consumed directly by a
   product. They exist so the semantic tier has something to point at.
3. **Define the semantic tier — intent, not appearance.** `color.bg.surface`, `color.text.default`,
   `color.border.focus`, `space.inset.md`. Each **references a primitive** and names a *role*.
   This is the tier products and components consume. The rename test: if renaming your company's
   brand color would force edits in product code, your semantic tier is missing or bypassed.
4. **Define the component tier where a component needs its own scoped tokens.** `button.bg.primary`
   → references `color.bg.brand`. Use it when a component's styling should be tunable independently
   of the global semantic value; skip it when the semantic token is enough (don't create ceremony).
5. **Solve theming at the semantic tier — a value swap, never a component fork.** A theme
   (light/dark, brand A/brand B) is a *set of semantic-token values*: `color.bg.surface` resolves
   to different primitives per theme, the component tree is identical. Wire it with CSS custom
   properties scoped by a `[data-theme]` (web) or a theme object (native). Dark mode is just
   another theme; multi-brand is just more themes.
6. **Emit the platform outputs consumers actually use.** Transform the source (e.g. Style
   Dictionary) to: CSS custom properties (+ a typed TS map) for web, and native formats if
   targeted. Types matter — a mistyped token name should fail at build, not render wrong.
7. **State the resize conditions** — the 1–2 facts that restructure the model (e.g. "if we add a
   third brand with a different type scale, the semantic tier needs a typography theme axis"; "if a
   product keeps reaching for primitives, the semantic tier has a gap — add the missing role rather
   than letting it bypass").

## Worked example

> User: "We have a web app and are about to launch a second brand. How should tokens be structured
> so dark mode and the second brand aren't a rewrite?"

- **Source:** author tokens in DTCG JSON, one repo, transformed via Style Dictionary
  *(retrieval-dated 2026-07; verify Style Dictionary config API at use)*.
- **Primitive:** `color.slate.{50..900}`, `color.brandA.{...}`, `color.brandB.{...}`, `space.*`.
- **Semantic:** `color.bg.surface`, `color.text.default`, `color.action.primary`, `space.inset.md`
  — components reference only these.
- **Component:** `button.bg.primary → color.action.primary` (kept because the button may want to
  diverge from the global action color later).
- **Theming:** four themes = {brandA, brandB} × {light, dark}; each is a semantic-value map. CSS
  vars under `[data-brand][data-theme]`. No component knows which brand/theme it's in.
- **Outputs:** CSS custom properties + a typed TS token map; `pnpm build:tokens` runs in CI so a
  bad token name fails the build.
- **Resize condition:** if brand B needs a different type scale, add a typography axis to the
  semantic tier rather than forking components.

## Guardrails

- **Products consume semantic/component tiers, never primitives** — a direct primitive reference is
  a leak that makes rebrands a refactor. Flag it.
- **Theming is a value swap at the semantic tier** — never fork or branch a component per brand/mode.
- **One source of truth, transformed** — tokens duplicated across CSS/JS/native drift; derive them.
- **Type the outputs** — an unknown token name should fail at build time.
- **Don't over-tier** — a component-tier token with no reason to diverge from its semantic parent is
  ceremony; add it only when the component genuinely needs an independent knob.
- **Retrieval-date volatile tooling** (Style Dictionary API, DTCG spec status); durable tiering
  principles don't need a date.

Wersje

RepozytoriumWynikLicencja
Ta strona · mcorbett51090/ravenclaude100MIT
natsummerance/agents100MIT
natsummerance/agents100MIT

Migawka bazy z 28.10.2026 · wersja paczki 1983bcd1f30f (skrót SHA-256 całej paczki)

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100token-architecture
    Projektuje systemy tokenów designu: tokeny globalne, semantyczne i komponentowe, nazewnictwo oraz motywy.
  • 90tone-theme
    Buduje lub naprawia system motywów: tryb ciemny, wiele marek albo podmianę tokenów white-label.
  • 100design-tokens
    Pomaga budować i oceniać systemy motywów: trójwarstwowy model tokenów, nazewnictwo według przeznaczenia, tryb ciemny, zmienne CSS, przełączanie motywów i specyfikację DTCG.
  • 100design-systems
    Opisuje architekturę design systemu i tokenów: specyfikacja W3C, atomic design, dokumentacja komponentów, motywy, tryb jasny i ciemny oraz zmienne CSS.
  • 98design-system
    Buduje systemowy fundament tokenów i komponentów frontendu: trzy warstwy tokenów, pliki DTCG, motywy i tryb ciemny, specyfikacje komponentów oraz rekomendację systemu projektowego.
  • 100design-systems-architecture
    Projektuje architekturę systemu projektowego: tokeny W3C, potoki Style Dictionary, strukturę biblioteki komponentów, motywy, warstwy tokenów wielu marek, governance, wersjonowanie i modele dojrzałości.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.