design-system
Skill9 starsChanged 4 months agoMITView on GitHub
Build design system components and UI that are accessible, themeable, and visually polished. Use when building buttons, dialogs, forms, cards, or any reusable UI components. Covers component API design, design tokens, accessibility, theming, visual design rules, and interaction patterns. Triggers on: "build a component", "design system", "create a button", "build a dialog", "add dark mode", "design tokens", "theme", "accessible component", "UI component", "component library".
108 other projects use a version of this.
Adopted by
Most recently taken up by
- nextlevelbuilder/ui-ux-pro-max-skilltheir own version, first seen Nov 18, 2026
- ekajaya740/skillstheir own version, first seen Oct 6, 2026
- BUGLAN/skillstheir own version, first seen Oct 6, 2026
- HunLuanZhiZhu/Game-Studios-Plugintheir own version, first seen Oct 5, 2026
- hmjBill/skillstheir own version, first seen Oct 5, 2026
- Littlpinguin/marketing-cockpit-templatetheir own version, first seen Oct 5, 2026
Used with
Projects with it also use setup-engine, playtest-report and 10 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.
CoralGameSkillsetup-engine
Configure the project's game engine and version. Pins the engine in CLAUDE.md, detects knowledge gaps, and populates engine reference docs via WebSearch when the version is beyond the LLM's training data.
Also in 7 projects that use this
CoralGameSkillplaytest-report
Generates a structured playtest report template or analyzes existing playtest notes into a structured format. Use this to standardize playtest feedback collection and analysis.
Also in 6 projects that use this
cenconq25Skillasset-spec
Generates per-asset visual specifications and AI-generation prompts from PRDs and the design bible. Produces structured spec files and updates a master asset manifest. Use after design bible is approved and a UX spec or PRD identifies assets to produce. Output: design/assets/<asset>.md plus design/assets/manifest.md.
Also in 5 projects that use this
cenconq25Skillcreate-control-manifest
Produces a flat, immediately-actionable rules sheet — do this, never do that, per system and per layer — extracted from accepted ADRs, technical preferences, and framework reference docs. More directly usable than ADRs for day-to-day implementation. Run after /architecture-review passes.
Also in 5 projects that use this
- +3 more from CoralGame
- +5 more from cenconq25
Other versions108 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 108
- nextlevelbuilder/ui-ux-pro-max-skill★ 156ksame name
- getsentry/sentry★ 45ksame name
- anthropics/knowledge-work-plugins★ 26ksame name
- Donchitos/Claude-Code-Game-Studios★ 26ksame name
- microsoft/power-platform-skills★ 961same name
- Archive228/loopkit★ 756same name
- pixel-cellar/Claude-Code-Game-Studios★ 338same name
- loulanyue/awesome-claude-notes★ 272same name
- genkovich/sdd★ 170same name
- cdavid817/vanehub-ai★ 116same name
98 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository25 other files it gives its agents.
- adversarial-reviewSkill
- agent-first-repoSkill
- agents-mdSkill
- architecture-mdSkill
- behavioral-testingSkill
- cleanup-swiftSkill
- cleanup-webSkill
- clear-communicationSkill
- code-commentsSkill
- design-patterns-gofSkill
- distill-to-skillSkill
- git-safe-pr-workflowSkill
- git-worktreeSkill
- karpathy-guidelinesSkill
- lean-ts-patternsSkill
- macos-swift-desktopSkill
- modern-cssSkill
- no-use-effectSkill
- parse-dont-validateSkill
- pr-review-triageSkill
- simplifySkill
- technical-writingSkill
- typescript-refactoringSkill
- typescriptSkill
- update-readmeSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
18 rules. 0 are common, 11 are distinctive, and 7 are very specific to this project.
0
Common
Most of the 98 edited versions we read keep these.
11
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 105
Use a constrained scale for spacing (4px/8px grid), type (modular ratio with clamp()), shadows (5 levels), and border-radius (3-4 sizes).
- Distinctive: line 115
Every interactive component must be fully operable with keyboard alone.
- Very specific: line 119
Use semantic HTML first (<button>, <a>, <label>, <dialog>, <table>).
- Very specific: line 123
Use :focus-visible (not :focus) for keyboard-only focus rings
- Distinctive: line 131
Never rely on color alone — add icons, text, or patterns
- Distinctive: line 132
Test with color blindness emulation (Chrome DevTools)
- Very specific: line 136
Always respect prefers-reduced-motion — disable decorative animations, keep functional ones
- Distinctive: line 147
Use the scale. Never use arbitrary pixel values.
- Distinctive: line 159
Create hierarchy through size, weight, and color — not font-size alone.
- Distinctive: line 177
Skeleton: when you know the layout shape (content loading)
- Distinctive: line 178
Spinner: when you don't know what will appear (action in progress)
- Distinctive: line 180
Always show what's loading: "Saving changes..." not just a spinner
- Distinctive: line 184
Don't render broken UI for empty data.
- Very specific: line 197
Use aria-live="polite" or role="alert" for screen readers
- Distinctive: line 198
Don't move focus to the toast
- Distinctive: line 213
Keep user input on error — never clear the form
- Very specific: line 221
Never use transition: all — list properties explicitly
- Very specific: line 249
No pure black (#000) backgrounds — use dark gray (oklch lightness ~0.1)
“Common” is measured: kept by at least 6 in 10 of the 98 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.
Files
Design Systems
Build UI components that are accessible, themeable, composable, and visually polished. This skill covers architecture and patterns. See companion skills for React performance (vercel-react-best-practices), composition (vercel-composition-patterns), CSS techniques (modern-css), and UI code review (web-design-guidelines).
1. Component Architecture
Headless + Styled Layers
Separate behavior from appearance. Use headless primitives (Radix, Ark UI, Headless UI) for accessibility and interaction, then add your styling layer on top. This gives you accessible-by-default components you can theme however you want.
Compound Components Over Prop-Heavy Monoliths
Complex UI should be composed of named parts, not configured with dozens of props:
// Good — composable, flexible, clear
<Dialog.Root>
<Dialog.Trigger asChild>
<Button>Edit Profile</Button>
</Dialog.Trigger>
<Dialog.Content>
<Dialog.Title>Edit Profile</Dialog.Title>
<Dialog.Description>Update your information below.</Dialog.Description>
{/* form content */}
<Dialog.Close asChild>
<Button variant="ghost">Cancel</Button>
</Dialog.Close>
</Dialog.Content>
</Dialog.Root>
// Bad — prop soup, inflexible, hard to customize
<Dialog
trigger="Edit Profile"
title="Edit Profile"
description="Update your information below."
showClose
cancelText="Cancel"
onConfirm={handleConfirm}
/>API Design Rules
- Props for configuration — variant, size, disabled, loading
- Children for content — what goes inside the component
- Discriminated union props for variants — never boolean soup
// Good — variants as union type
type ButtonProps = {
variant: "primary" | "secondary" | "destructive" | "ghost" | "link"
size: "sm" | "md" | "lg"
children: React.ReactNode
loading?: boolean
disabled?: boolean
}
// Bad — boolean flags for everything
type ButtonProps = {
primary?: boolean
secondary?: boolean
danger?: boolean
small?: boolean
large?: boolean
}- Consistent naming across all components: Root, Trigger, Content, Item, Label, Description
- Open code over black boxes — prefer owning the component source (shadcn/ui model) over fighting an npm package's API
2. Design Tokens
Structure tokens in two layers. Primitive tokens define raw values. Semantic tokens assign meaning. Use semantic tokens directly in components — don't add a third "component token" layer unless you're building a white-label product with per-customer theming.
/* Layer 1: Primitive — raw values, no meaning */
--color-gray-50: oklch(0.985 0 0);
--color-gray-900: oklch(0.145 0 0);
--color-blue-500: oklch(0.55 0.2 250);
--radius-sm: 0.25rem;
--radius-md: 0.5rem;
/* Layer 2: Semantic — assigned meaning, used directly in components */
--color-background: var(--color-gray-50);
--color-foreground: var(--color-gray-900);
--color-primary: var(--color-blue-500);
--radius-default: var(--radius-md);Why OKLCH over HSL: Perceptually uniform (same lightness looks the same across hues), supports P3 wide-gamut displays, produces better gradients without muddy midpoints.
Use a constrained scale for spacing (4px/8px grid), type (modular ratio with clamp()), shadows (5 levels), and border-radius (3-4 sizes). Never use arbitrary values — pick from the scale.
For the full token system implementation, see references/design-tokens.md.
3. Accessibility First
Accessibility is not a feature — it's a baseline. Every interactive component must meet these requirements:
Keyboard
Every interactive component must be fully operable with keyboard alone. Follow WAI-ARIA Authoring Practices Guide (APG) patterns for keyboard navigation — don't invent your own.
ARIA
Use semantic HTML first (<button>, <a>, <label>, <dialog>, <table>). Only add ARIA when HTML semantics aren't sufficient. When you do, follow the APG patterns exactly.
Focus
- Use
:focus-visible(not:focus) for keyboard-only focus rings - Trap focus inside modals and dialogs
- Restore focus to the trigger element when overlays close
- Never use
tabindex > 0
Color
- 4.5:1 contrast for normal text, 3:1 for large text and UI components (WCAG AA)
- Never rely on color alone — add icons, text, or patterns
- Test with color blindness emulation (Chrome DevTools)
Motion
- Always respect
prefers-reduced-motion— disable decorative animations, keep functional ones - Safe durations: fast 150ms, medium 300ms, slow 500ms
For component-specific accessibility patterns, see references/accessibility-patterns.md.
4. Visual Design Rules
Good visual design follows consistent, systematic rules — not ad-hoc decisions.
Spacing
Use the scale. Never use arbitrary pixel values. Components should use the same spacing scale as the rest of the app.
Typography
- Fluid sizing with
clamp():font-size: clamp(1rem, 0.5rem + 2vw, 1.5rem) - Line length: 45-75 characters (
max-width: 65ch) - Line height: 1.5 for body, 1.2-1.3 for headings
font-variant-numeric: tabular-numsfor number columnstext-wrap: balanceon headings to prevent orphans
Visual Hierarchy
Create hierarchy through size, weight, and color — not font-size alone. Three levels of emphasis is usually enough: primary (bold/large), secondary (normal), tertiary (muted/small).
Borders and Separation
Fewer borders. Use spacing, contrasting backgrounds, and subtle shadows to separate elements instead. When you do use borders, keep them light and consistent.
Shadows and Elevation
Define 5 levels: none, sm, md, lg, xl. Use layered shadows (ambient + directional) for realism. In dark mode, use lighter surfaces for higher elevation instead of shadows.
Border Radius
3-4 sizes: sm (0.25rem), md (0.5rem), lg (0.75rem), full (9999px for pills). Keep consistent within a component — don't mix radii.
5. Interaction Patterns
Loading States
- Skeleton when you know the layout shape (content loading)
- Spinner when you don't know what will appear (action in progress)
- Show feedback within 100ms of user action
- Always show what's loading: "Saving changes..." not just a spinner
Empty States
Don't render broken UI for empty data. Show: explanation of what this area is, how to populate it, and a CTA to get started.
Error States
- Plain language, not error codes
- Explain what went wrong AND how to fix it
- Inline errors for forms (next to the field, linked with
aria-describedby) - Focus the first error on form submit
Toasts and Notifications
- Position: consistent throughout app (top-right or bottom-center)
- Duration: 3-5s for success, persistent for errors (with dismiss button)
- Use
aria-live="polite"orrole="alert"for screen readers - Don't move focus to the toast
Modals and Dialogs
- Focus trap inside the dialog
- ESC key closes it
- Dim overlay behind
- Restore focus to trigger on close
- Confirm before destructive actions
Forms
- Labels above inputs (not placeholder-as-label)
- Inline validation on blur (not on every keystroke)
- Single-column layout
- Keep user input on error — never clear the form
- Mark required fields, not optional ones
Animation
- CSS transitions for simple A→B state changes
- JS (Framer Motion, React Spring) for springs and complex sequences
- Animate
transformandopacityonly — neverwidth,height, ortop/left - Never use
transition: all— list properties explicitly
6. Theming
CSS Custom Properties for Runtime Switching
Semantic tokens swap between themes. Don't invert colors — map them intentionally:
:root {
--color-bg: oklch(1 0 0);
--color-surface: oklch(0.97 0 0);
--color-text: oklch(0.145 0 0);
--color-text-muted: oklch(0.45 0 0);
--color-border: oklch(0.87 0 0);
}
.dark {
--color-bg: oklch(0.1 0 0);
--color-surface: oklch(0.15 0 0);
--color-text: oklch(0.93 0 0);
--color-text-muted: oklch(0.6 0 0);
--color-border: oklch(0.25 0 0);
}Dark Mode Rules
- No pure black (
#000) backgrounds — use dark gray (oklch lightness ~0.1) - Reduce saturation slightly on colored elements
- Higher elevation = lighter surface (not darker)
- Shadows don't work on dark backgrounds — use subtle borders or lighter surfaces
- Set
color-scheme: darkon<html>for native form controls and scrollbars - Set
<meta name="theme-color">to match page background
What NOT to Do
- No
<div onClick>— use<button>for actions,<a>for navigation - No
outline: nonewithout a:focus-visiblereplacement - No
tabindex > 0— ever - No
transition: all— list properties explicitly - No animating
width/height— usetransform: scale() - No hardcoded colors/spacing — use tokens from the scale
- No color alone for state — add icons or text
- No blocking paste on inputs (
onPaste+preventDefault) - No disabling zoom (
user-scalable=no,maximum-scale=1) - No placeholder-as-label — always use a real
<label> - No images without dimensions — set
width/heightto prevent CLS
Companion Skills
vercel-react-best-practices— React/Next.js performance (58 rules by priority)vercel-composition-patterns— compound components, state management, React 19 APIsmodern-css— modern CSS techniques (64 old-vs-modern comparisons)web-design-guidelines— UI code review checklist (accessibility, forms, animation, performance)typescript— type patterns for component props (discriminated unions, branded types)
For design token implementation, see references/design-tokens.md. For component recipes, see references/component-recipes.md. For accessibility patterns, see references/accessibility-patterns.md.
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
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.

