agentleFS
chatquillchatquill/claude-code-websites/.claude/skills/design-tokens/SKILL.md

design-tokens

Skill1 starsChanged 25 days agoMITView on GitHub

Generates docs/design/tokens.json in W3C design-tokens format (colour light/dark, typography, spacing, radius, shadow, motion) from the brand guide, checks contrast, and optionally wires tokens into CSS variables and the Tailwind theme. Use after the brand guide, or when theming or dark mode is needed.

38 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use brief-to-tasks, design-flow and 8 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • julianoczkowskiSkill

    brief-to-tasks

    Break a design brief into an ordered checklist of independently buildable tasks using vertical slices. Saves as a markdown checklist. Use when user wants to break down work, create tasks from a brief, plan implementation order, or mentions "tasks" or "breakdown".

    Also in 8 projects that use this

  • julianoczkowskiSkill

    design-flow

    Run the full design-to-build workflow as a guided sequence. Orchestrates all designer skills in order, from grilling through review. Use when user wants to go through the complete design process, start a project from scratch, run the full flow, or mentions "design flow" or "full workflow".

    Also in 7 projects that use this

  • nandanosqlSkill

    design-brief

    Create a design brief that clearly communicates the product context, user needs, constraints, and success criteria to the design team — bridging PM requirements and design execution.

    Also in 9 projects that use this

  • solinkzSkill

    micro-interactions

    Expert micro-interaction architect for mobile apps, web applications, and responsive websites. Use this skill when the user asks to add, build, fix, audit, or consult on micro-interactions, animations, transitions, motion design, gesture feedback, haptics, loading states, skeleton screens, pull-to-refresh, swipe actions, scroll animations, button states, form validation feedback, toast notifications, modals, dropdowns, toggles, progress indicators, shared element transitions, spring physics, easing curves, motion tokens, or any interaction that provides visual/haptic/auditory feedback to user actions. Triggers on: "micro-interaction", "animation", "transition", "motion", "easing", "spring", "gesture", "haptic", "feedback", "loading state", "skeleton", "shimmer", "pull to refresh", "swipe", "drag", "hover effect", "press state", "focus ring", "scroll animation", "parallax", "stagger", "orchestration", "reduced motion", "View Transitions", "layout animation", "shared element", "hero animation", "morphing", "Framer Motion", "GSAP", "Lottie", "Rive", "React Spring", "anime.js", or any request to make an interface "feel better", "feel alive", "feel snappy", "feel responsive", or "feel polished".

    Also in 3 projects that use this

  • jpoindexterSkill

    design-system-audit

    Audit code for design system violations - grid spacing, tokens, existing components

    Also in 3 projects that use this

  • GitHubSkill

    accessibility-audit

    Audits actual components and routes against applicable WCAG 2.2 A/AA criteria using consumer-owned design-system evidence and repository tools. Use when asked for an accessibility audit, a11y check, keyboard or focus review, contrast check, or screen-reader verification.

    Also in 4 projects that use this

  • +1 more from julianoczkowski

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 35 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the brand guide's colour, typography, motion and imagery sections.

    line 28
  2. Distinctive:

    Ask the user how to fill gaps, offering a recommendation.

    line 30
  3. Very specific:

    If the theme-factory skill is installed, use it to generate coherent ramps and dark variants from the brand colours.

    line 32
  4. Very specific:

    Use the W3C Design Tokens format ($value, $type, $description) with three layers:

    line 38

“Common” is measured: kept by at least 6 in 10 of the 35 edited versions of this file we could read. “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

Design Tokens

Turns the brand guide into machine-readable tokens: the single source for colours, type, spacing, radii, shadows and motion. With wire, it hands the tokens to tailwind-shadcn-specialist (or lead-frontend) to implement as CSS variables. It never invents colours that contradict the brand guide.

Inputs

  • docs/design/brand-guide.md (required; if missing, suggest /brand-identity and stop)
  • Existing docs/design/tokens.json (update in place, preserving names)
  • project.yaml: stack.styling, stack.frontend, a11y.standard
  • .claude/docs/templates/design-tokens.json (structure)

Phases

Phase 1: Extract

Read the brand guide's colour, typography, motion and imagery sections. List what is specified and what is missing (e.g. no neutral ramp, no dark palette). Ask the user how to fill gaps, offering a recommendation.

If the theme-factory skill is installed, use it to generate coherent ramps and dark variants from the brand colours; otherwise say so and derive ramps with perceptual (OKLCH) steps.

Phase 2: Build the token set

Use the W3C Design Tokens format ($value, $type, $description) with three layers:

  1. Primitive: colour ramps (color.brand.50…950, color.neutral.*), font families, sizes, weights, line heights, spacing scale (4 px base), radii, shadows, durations and easings.
  2. Semantic: roles referencing primitives, with light and dark values: color.bg, color.fg, color.muted, color.border, color.primary, color.primary-fg, color.accent, color.success|warning|danger|info, color.ring; font.body, font.heading; type.scale.* (a deliberate ratio); motion.fast|base|slow.
  3. Component (only where needed): e.g. button.radius, input.height.

Map semantic names to shadcn/ui variable names (--background, --foreground, --primary, --ring, …) when stack.styling is tailwind-shadcn.

Phase 3: Check

  • Contrast for every fg/bg semantic pair in light and dark: ≥ 4.5:1 text, ≥ 3:1 large text, UI components and focus rings. Print a table; fix failures.
  • Type scale yields readable body (≥ 16 px) and line lengths under ~80 characters.
  • Motion tokens include a reduced-motion value (0 ms or opacity-only).

Phase 4: Approve and write

Show the token summary and the contrast table. Ask "May I write this to docs/design/tokens.json?"

Phase 5 (with wire): Implement

Spawn tailwind-shadcn-specialist (or lead-frontend for other styling) with the token file and the instruction to: generate CSS variables for light and dark themes, map them into the Tailwind theme (confirm v3 config vs v4 @theme from the installed version), and list every file it will change. It asks the user before writing.

Output

docs/design/tokens.json (from .claude/docs/templates/design-tokens.json); with wire, CSS/theme files in the code root after separate approval.

Next step

/design-system, or /design-tokens wire once the system is agreed.

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.