agentleFS
HarrypatriaHarrypatria/tastemaker/skills/taste-tokens/SKILL.md

taste-tokens

Skill4 starsChanged 16 days agoMITView on GitHub

Builds the design-token system every Tastemaker skill consumes - primitive, semantic and component layers in design-tokens.json, light/dark/high-contrast themes, density modes, and generated tokens.css, Tailwind v4 @theme, Tailwind v3 config and shadcn/ui variables, with automatic reference and WCAG contrast validation. Use for "design system", "tokens", "theme", "dark mode", "brand colors in Tailwind", "component specs", or before any UI build that lacks tokens.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Every color, space, radius, font, shadow, duration and z-index in the product comes from design-tokens.json.

    line 8
  2. Very specific:

    Start from templates/design-tokens.json (valid, contrast-checked).

    line 17
  3. Very specific:

    Every semantic color has a light and dark value.

    line 19
  4. Very specific:

    No Node available (chat platforms): emit tokens.css by hand from the same structure and list the contrast pairs you checked with their …

    line 28

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Taste Tokens: one source of truth

Every color, space, radius, font, shadow, duration and z-index in the product comes from design-tokens.json. Components never see a raw value (V08).

Modes

  • Minimal (default before UI work): copy templates/design-tokens.json, set primary/neutral from taste-direction or brand, build, done.
  • Full (explicit design-system request): all layers, component specs, docs page, governance.

Procedure

  1. Start from templates/design-tokens.json (valid, contrast-checked). Replace primitives with the brand or taste palette; keep the semantic names.
  2. Three layers (references/token-architecture.md): primitive (raw) -> semantic (role, the only layer components use) -> component (targeted overrides). Themes remap semantic only.
  3. Every semantic color has a light and dark value; add contrast pairs for every text/background combination you use.
  4. Build and validate:
    node <skill-dir>/scripts/build-tokens.mjs design-tokens.json --out src/styles
    Writes tokens.css (CSS variables + shadcn aliases, light/dark/reduced-motion), tailwind.v4.css (@theme inline), tailwind.v3.cjs (theme.extend fragment). Fails on unresolved references, missing dark values, component-to-primitive references and contrast failures. Fix and rebuild until clean.
  5. Wire by detected Tailwind major (tastemaker/references/stacks.md): v4 imports tailwind.v4.css after @import "tailwindcss"; v3 spreads tailwind.v3.cjs into theme.extend.
  6. Full mode: write component specs (references/component-spec.md) and a design-system.html showing swatches, type, spacing, radius, elevation and every component state in both themes.

No Node available (chat platforms): emit tokens.css by hand from the same structure and list the contrast pairs you checked with their ratios.

Rules

  • Names: {category}.{role}.{variant}.{state} in JSON, --color-bg-surface in CSS. Lowercase, no brand names in semantic tokens.
  • Dark mode is a remap, not an inversion. Elevation in dark = lighter surface, not shadow.
  • Density via data-density="compact|comfortable" overriding component space/size tokens.
  • Theme switch: class .dark (or data-theme) on <html>, respect prefers-color-scheme on first visit, persist with try/catch storage, set before paint to avoid flash.
  • Versioning: semver. Add = minor, rename/remove = major (keep a deprecated alias for one minor), value tweak = patch.

Quality gate

  • Build script exits 0 (references, dark coverage, layer rules, contrast).
  • shadcn variable set complete (--background ... --ring, --radius, --chart-1..5).
  • No raw values in components (tastemaker scan V08 clean).
  • Specs exist for every shipped component (Full mode).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.