Use Design System

Uses shared UI package primitives instead of hand-rolled markup, greps the source to verify class and component names, and sets page metadata on every page. Use when authoring UI in a repo with a shared UI package (e.g. @synthaembed/ui-fleet), when adding pages or components, or when unsure of a design token or class name.

jcdavis131 Updated

File contents

Use Design System

A shared UI package encodes the design system. Primitives give cross-site consistency; hand-rolled markup drifts.

The move

  1. Find the shared packagepackages/ui-*, @repo/ui, @*/ui-fleet. Read exports.
  2. Use primitives, not raw markup — PageHeader, Card, Button from the package; raw <div> only when no primitive fits.
  3. Verify names in source — grep before trusting memory:
    grep -n "bh-btn\|bh-card" packages/ui-fleet/src/components.css | head -6
    
  4. Set page metadata — every page exports metadata (title for SEO/share cards).

When a primitive doesn't fit

Closest primitive + constraints; add to shared package if 2+ sites need it (lane-discipline); one-off hand-roll with a comment explaining why.

Extended patterns

Shared-vs-local decision, build order, SDK domain imports, barrel exports: reference.md

Anti-patterns

Hand-rolling for speed; trusting memory for class names; bypassing shared package "just once"; site-local instead of shared when reusable.

Pair with

  • match-conventions · validate-gate · lane-discipline

jcdavis131/cursor-agent-skills/tree/main/skills/use-design-system commit 665a6f1156

Frequently asked questions

npx skillmds@latest add jcdavis131/use-design-system