eq-design-system

Scaffolds and audits a four-layer CSS design token system for Tailwind v4 projects.

Updated Aug 3, 2026
One-click install
npx skills add https://github.com/everquint/frontend-skills --skill eq-design-system-everquint
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: eq-design-system
Source: https://github.com/everquint/frontend-skills/tree/main/skills/engineering/eq-design-system
Command: npx skills add https://github.com/everquint/frontend-skills --skill eq-design-system-everquint

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Hardcoded colours, radii and shadows scattered across components make rebrands, dark mode and accessibility fixes expensive and error-prone. This Skill provides a canonical four-layer token architecture (brand primitives, semantic tokens, theme overrides, framework mapping) plus an audit script that mechanically enforces it. ## Core Features & Use Cases - Token scaffolding: Copy the starter index.css with OKLCH brand ramps, shadcn/ui-compatible semantic names, dark-theme overrides and Tailwind v4 @theme aliases, then edit only layer 1 to rebrand. - Dark theme procedure: Class-based .dark toggling, color-scheme handling, first-paint flash prevention, and per-token exception guidance for status hues, shadows and images. - Automated audit: check-tokens.mjs runs seven checks — colour literals, var() fallbacks, dark-only tokens, derived literals, broken aliases, arbitrary values, and derived WCAG contrast pairs in both themes. - Use Case: Adopting the system into a legacy repo: run the audit for a census, land the token file first, convert by token rather than by file, and ratchet the finding count to zero. ## Quick Start Ask the agent to scaffold the design token system into src/index.css for your brand and run the token audit script to verify it passes clean.

Frequently Asked Questions about eq-design-system

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add dark mode to a Tailwind v4 project with design tokens?

Use a `.dark` class on the root element with `@custom-variant dark (&:is(.dark *))`, not a media query, so an in-app toggle can override the OS setting. Declare every themed token in both `:root` and `.dark`, set `color-scheme` in both blocks, and apply the class via a blocking inline script before first paint.

How do I migrate a repo with hardcoded hex colours to design tokens?

Run the audit script first for a census, then land a complete token file before converting anything. Convert by token rather than by file — sweep every literal that shares one meaning in a single commit — and ratchet the finding count with a baseline so it can only decrease.

Why does my Tailwind utility class like bg-surface-hover render nothing?

In Tailwind v4 a custom property in `:root` generates no utility class by itself. The token needs a `--color-*` alias inside `@theme inline`; without it the class lands in the DOM but emits no CSS rule and fails silently.

Does this token system work with shadcn/ui components?

Yes, the semantic token names are the shadcn/ui names verbatim, so generated components render correctly unedited. Renaming a token breaks every generated primitive silently, since the class and rule remain but the variable resolves to nothing.

Should I use the W3C DTCG JSON token format instead of CSS variables?

For a web-only product, CSS custom properties as the single source avoid a build step with no second consumer. Adopt DTCG when a second consumer appears — a native app, Figma variable round-tripping, or a published component library; the four-layer shape maps onto it additively.

Why does the contrast check fail after a rebrand?

Swapping the brand ramp changes surfaces while foregrounds stay fixed, so pairs like `--primary-foreground` on `--primary` can drop below the 4.5:1 WCAG floor. The audit derives every `-foreground` pair and checks it in both themes, failing on any ratio under its floor.