Skip to content
Skills Library
Design & UX · Building & coding

design-system

/design-system

Build a new design system (tokens, variants, theming). Use when "create a design system" or "component library from scratch". Drifted existing system → housekeep-design. Plan-only unification → plan-uiux-unification.

Licence
MIT
Last repository change
19.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
3
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 19.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Build a new design system (tokens, variants, theming). Use when "create a design system" or "component library from scratch". Drifted existing system → housekeep-design. Plan-only unification → plan-uiux-unification.

Triggers from the description

create a design systemcomponent library from scratch
Original author description

Build a new design system (tokens, variants, theming). Use when "create a design system" or "component library from scratch". Drifted existing system → housekeep-design. Plan-only unification → plan-uiux-unification.

How it works

  1. This skill vs neighbors
  2. How to reason
  3. Worked example
  4. Self-critique before reporting
  5. Check existing first [LOW freedom — run exactly]
  6. Design Tokens [HIGH freedom]
  7. Component Variants with CVA [HIGH freedom]
  8. Compound Components Pattern [HIGH freedom]
  9. Accessible Components with Radix [HIGH freedom]
  10. Component Documentation Pattern [HIGH freedom]
Original SKILL.md headings · 147 lines, 768 words
SKILL.md preview
---
name: design-system
description: >
  Build a new design system (tokens, variants, theming). Use when
  "create a design system" or "component library from scratch". Drifted
  existing system → housekeep-design. Plan-only unification →
  plan-uiux-unification.
license: MIT
---

# Design System Skill

**Degree of freedom: MIXED.** Token taxonomy and variants `[HIGH freedom]`;
existing `ui/` / token inventory `[LOW freedom — run exactly]`.

Build scalable, maintainable design systems with consistent tokens, variants, and documentation.

## This skill vs neighbors

| Skill | Owns |
|---|---|
| **design-system** (this) | New design system from scratch: tokens, variants, theming |
| `housekeep-design` | Consolidating a drifted design system into one token and component source |
| `plan-uiux-unification` | Plan-only UI/UX and design-system audit emitting a unification burndown |

## How to reason

1. **Inventory** — `components/ui`, tokens, `cva`, shadcn/Radix
2. **Tokenize** — semantic tokens, not raw hex in components
3. **Variant** — `cva` covers real states (default/destructive/disabled)
4. **Document** — JSDoc, keyboard/focus, dark mode

## Worked example

> **Inventory:** shadcn `Button` exists; colors are raw `#3B82F6` in three pages; no `--primary`.
> **Tokenize:** `--primary` / `--primary-foreground` in `globals.css`; Tailwind maps `hsl(var(--primary))`.
> **Variant:** extend existing `buttonVariants` — do not add `components/Button2.tsx`.
> **Document:** JSDoc lists variants/sizes; focus ring + dark `.dark` overrides.

## Self-critique before reporting

- **Did not fork** — existing primitives were extended, not recreated
- **Semantic tokens** — components reference tokens, not primitives or hex
- **A11y + dark** — focus, disabled, and dark variants exist
- **Right owner** — drifted existing system → `housekeep-design`; plan-only unification → `plan-uiux-unification`

## Check existing first  [LOW freedom — run exactly]

**Before creating ANY design system components, verify:**

1. **Check for existing design system:**
```bash
ls -la src/components/ui/
cat package.json | grep -i "shadcn\|radix\|headless"
cat components.json 2>/dev/null # shadcn config
```

2. **Check for existing tokens:**
```bash
cat tailwind.config.* | head -100
cat src/styles/globals.css | head -50
rg "var\(--" --type css | head -20
```

3. **Check for existing patterns:**
```bash
rg "cva\(|variants:" --type ts --type tsx | head -10
rg "cn\(|clsx\(|twMerge" --type tsx | head -5
```

**Why:** Don't recreate existing primitives. Extend and enhance what exists.

## Design Tokens  [HIGH freedom]

Face and ground are choices, not defaults: Inter/Roboto/Arial, a cream/off-white page, and a purple-gradient primary are the fallbacks to name and avoid. Add `--font-sans` / `--font-display` tokens for the faces you pick.

### CSS Custom Properties
- Semantic HSL triplets on `:root` (`--background`, `--foreground`, `--primary`, `--muted`, `--destructive`, `--border`, `--ring`, …); `.dark` overrides the same names
- Spacing (`--spacing-xs…xl`), radius (`--radius` ± 4px), shadows (`--shadow-sm…lg`), durations and easings as tokens too
```css
:root {
 --background: 0 0% 100%;
 --foreground: 222.2 84% 4.9%;
 --primary: 221.2 83.2% 53.3%;
 --primary-foreground: 210 40% 98%;
 --radius: 0.5rem;
}
.dark {
 --background: 222.2 84% 4.9%;
 --foreground: 210 40% 98%;
}
```
Full token set: [references/tokens.md](references/tokens.md) §CSS Custom Properties.

### Tailwind Config Integration
- `darkMode: 'class'`; every color is `hsl(var(--token))` with a `DEFAULT` / `foreground` pair
- `borderRadius`, `boxShadow`, `transitionDuration` read the CSS variables, never literals

Full config: [references/tokens.md](references/tokens.md) §Tailwind Config Integration.

## Component Variants with CVA  [HIGH freedom]

- `cva()` base string carries focus-visible ring and `disabled:` styles; `variants.variant` (default/destructive/outline/secondary/ghost/link) and `variants.size` (default/sm/lg/icon) with `defaultVariants`
- Props extend the native element attributes plus `VariantProps<typeof buttonVariants>`; `forwardRef` and `asChild` via `Slot`
- Export both the component and its `*Variants` so consumers can reuse the classes

```tsx
// lib/utils.ts
import { type ClassValue, clsx } from 'clsx'
import { twMerge } from 'tailwind-merge'

export function cn(...inputs: ClassValue[]) {
 return twMerge(clsx(inputs))
}
```

Full `button.tsx`: [references/components.md](references/components.md) §Button with CVA.

## Compound Components Pattern  [HIGH freedom]

- One file exports `Card`, `CardHeader`, `CardTitle`, `CardDescription`, `CardContent`, `CardFooter`
- Each is a `forwardRef` wrapper over the native element with `cn(defaults, className)` and a `displayName`
- Tokens only: `bg-card text-card-foreground`, `text-muted-foreground`

Full `card.tsx`: [references/components.md](references/components.md) §Compound Card.

## Accessible Components with Radix  [HIGH freedom]

- Re-export `Root`, `Trigger`, `Portal`, `Close` from `@radix-ui/react-dialog`; style `Overlay` and `Content` with `forwardRef`
- `data-[state=open]` / `data-[state=closed]` drive enter/exit animation classes
- A visible close button inside `Content` with an `sr-only` label

Full `dialog.tsx`: [references/components.md](references/components.md) §Accessible Dialog with Radix.

## Component Documentation Pattern  [HIGH freedom]

JSDoc block per component: one-line purpose, `@example` usage, then `## Variants`, `## Sizes` (with pixel heights), and `## Accessibility` (native element, `disabled`, focus ring, `asChild`).
Template: [references/components.md](references/components.md) §Component Documentation Pattern.

## File Structure

`src/components/ui/*.tsx` with an `index.ts` barrel, `src/lib/utils.ts` for `cn()`, `src/styles/globals.css` for tokens, `tailwind.config.ts` for the theme.
Tree: [references/components.md](references/components.md) §File Structure.

## Validation  [LOW freedom — do not skip]

After creating design system components:

1. **Consistency** → All components use same tokens
2. **Variants** → Cover all needed use cases
3. **Accessibility** → Keyboard nav, ARIA, focus states
4. **Dark mode** → All components work in dark mode
5. **Responsive** → Mobile-friendly by default
6. **Documentation** → JSDoc comments, usage examples
7. **Type safety** → Full TypeScript support with VariantProps
Files in this package (3)
  • SKILL.md 6 KB
  • references/components.md 7 KB
  • references/tokens.md 3 KB

Versions

RepositoryScoreLicence
This page · kensaurus/cursor-kenji100MIT
frontic/ui100MIT
akillness/jeo-skills100MIT
langwatch/langwatch100Apache-2.0
borghei/Claude-Skills100MIT
alirezarezvani/claude-skills100MIT
sallaumen/elixir-agent-kit100MIT
davidelarocca/swift-harness100MIT
nextlevelbuilder/ui-ux-pro-max-skill100MIT

Database snapshot: 13.11.2026 · package version ccd4fba4f266 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 3 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100plan-uiux-unification
    Plan-only UI/UX and design-system audit that emits a unification burndown; no code until a phase is approved. Use when "audit UI without fixing", "UI burndown", or "IA audit before redesign". Apply now → housekeep-design.
  • 100audit-uiux-design-system
    Audit visual-system coherence: tokens, component variants, color, type, spacing, dark mode. Use for "design drift", inconsistent UI, or duplicate primitives. Per-page usability → audit-ux. Plan-only unification → plan-uiux-unification.
  • 100design-systems
    Use when building or maintaining a component library and design tokens. Covers token architecture, component API design, variants and states, documentation, and governing adoption across a codebase. Trigger on "build a component library", "we have six different button…
  • 100stage-ui-design-system
    Stagewise UI theming, design tokens, derived utilities, and component library reference. Use when creating, editing, or reviewing UI in apps/browser, implementing new screens or components, or styling with Tailwind in the stagewise codebase.
  • 100design-systems
    Builds and maintains design systems and shared component libraries, covering design tokens, theming and dark mode, component API design, loading, empty, error and disabled states, built-in accessibility, documentation, visual regression tests and semver releases with…
  • 100design-system-implementation
    Implement or refine reusable design tokens and interface components that follow an existing product direction. Use when establishing tokens, component APIs, variants, states, or cross-screen consistency.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.