design-system
Skill0 starsChanged 2 months agoMITView on GitHub
How to build and extend the UI in this repo — the brand file, the token layers, the motion vocabulary, and the rules every new component must follow. Use before writing or editing any JSX or CSS.
192 other projects use a version of this.
Adopted by
Most recently taken up by
- Rojios/everything-claude-codetheir own version, first seen Nov 8, 2026
- caidanw/skillstheir own version, first seen Nov 8, 2026
- Adelie-Squad/solosquadtheir own version, first seen Nov 8, 2026
- darkweb19/skillstheir own version, first seen Nov 8, 2026
- dmoreq/agent-grimoiretheir own version, first seen Nov 8, 2026
- ahmadvahidi/skill-atlastheir own version, first seen Nov 8, 2026
Used with
Projects with it also use setup-engine, team-level 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 13 projects that use this
CoralGameSkillteam-level
Orchestrate level design team: level-designer + narrative-director + world-builder + art-director + systems-designer + qa-tester for complete area/level creation.
Also in 12 projects that use this
lilangMaxSkillcreate-stories
Break a single epic into implementable story files. Reads the epic, its GDD, governing ADRs, and control manifest. Each story embeds its GDD requirement TR-ID, ADR guidance, acceptance criteria, story type, and test evidence path. Run after /create-epics for each epic.
Also in 11 projects that use this
lilangMaxSkillstory-done
End-of-story completion review. Reads the story file, verifies each acceptance criterion against the implementation, checks for GDD/ADR deviations, prompts code review, updates story status to Complete, and surfaces the next ready story from the sprint.
Also in 11 projects that use this
- +2 more from CoralGame
- +6 more from lilangMax
Other versions192 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 192
- nextlevelbuilder/ui-ux-pro-max-skill★ 147ksame name
- getsentry/sentry★ 46ksame name
- anthropics/knowledge-work-plugins★ 35ksame name
- Donchitos/Claude-Code-Game-Studios★ 27ksame name
- ethereum/ethereum-org-website★ 6ksame name
- langwatch/langwatch★ 5ksame name
- joye61/pic-smaller★ 2.9ksame name
- daveebbelaar/bama★ 1.7ksame name
- reatom/reatom★ 1.4ksame name
- microsoft/power-platform-skills★ 1.1ksame name
182 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 repository5 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- add-routeSkill
- react-patternsSkill
- testingSkill
- ui-designSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 2 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 175 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 78
Check ui/ first — most new things are a composition of what exists.
- Distinctive: line 79
Check Base UI for a primitive, and read its real API before writing.
- Very specific: line 82
Import motion from ./_motion.
- Distinctive: line 88
Every rule below exists because breaking it produces a component that looks correct today and silently stops responding when the brand …
- Very specific: line 112
All movement composes from ui/_motion.ts, so it stays consistent and so the brand's motion knobs actually reach everything.
“Common” is measured: kept by at least 6 in 10 of the 175 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
The design system
This repo has no third-party component library. Every component is source
in src/design-system/, built on Base UI headless
primitives. You own all of it — read it, change it, delete it.
Decide what you are doing
| I want to… | Edit | Never touch |
| Change colours, radius, fonts, density, motion | design-system/brand.css | anything else |
| Adopt a ready-made look | copy a file from design-system/presets/ over brand.css's :root | — |
| Change what a token means (cards use a different surface) | design-system/theme.css | tokens.css |
| Add a new semantic token | theme.css, then expose it in styles/index.css | components |
| Add or edit a component | design-system/ui/<name>.tsx | the token files |
| Build a screen | src/routes/*, importing from @/design-system | ui/* directly |
tokens.css is derived output. Putting a literal value there defeats the
whole system — if you need a new knob, add it to brand.css and consume it in
tokens.css.
Layers
brand.css layer 0: ~17 knobs. THE file a project edits.
tokens.css layer 1: scales computed from the knobs
theme.css layer 2: semantic meaning (--ds-surface, --ds-accent)
styles/index.css layer 3: semantic tokens → Tailwind utilities
ui/*.tsx components, which only ever use layer 3Each layer references only the one above it. That discipline is what lets one number reshape the whole app.
The brand file
brand.css holds brand hue and chroma, neutral tint, status hues, radius,
border width, fonts, base text size, type ratio, heading weight and tracking,
density, shadow strength, motion speed and easing.
How far some of them reach is not obvious:
- Colour is generated in OKLCH from a hue plus a chroma — two numbers produce eleven perceptually even stops. Do not hand-pick hex ramps.
- Density scales control heights and Tailwind's entire spacing scale,
because
--spacingis fed from it.p-4changes when density changes. - Motion
0makes every transition in the app instant.prefers-reduced-motionoverrides any brand value — that is deliberate and must not be "fixed". - Border width works because
styles/index.cssredefines Tailwind's border utilities from the token; Tailwind hardcodes1pxand exposes no variable.
Try values live at /brand. It runs a WCAG contrast audit against the
resolved tokens and can export a complete brand.css. If the audit shows a
failure, the brand is not shippable — fix it there rather than overriding a
colour at a call site.
Two constraints the audit exists to catch:
- The accent used for solid fills must be dark enough for its foreground.
--ds-accentdeliberately uses--accent-700(OKLCH L 0.52), because white text on an L 0.60 fill measures 3.6–4.2:1 for every hue — below AA. - A borderless brand (
--brand-border-width: 0) leaves a field's fill as its only boundary, which cannot reach 3:1 while staying subtle. Set--brand-field-border-width: 1pxto keep inputs bounded while everything else stays borderless.
Adding a component
Read src/design-system/ADDING-A-COMPONENT.md — the full recipe, with a
template, the Base UI primitive list, and the motion table. Short version:
- Check
ui/first — most new things are a composition of what exists. - Check Base UI for a primitive, and read its real API before writing.
- Copy the shape of a neighbouring component:
cvafor variants,cn(..., className)withclassNamelast,...propsspread. - Import motion from
./_motion. Never write a literal duration. - Export from
index.ts, add it toroutes/components.tsx. pnpm check.
The rules, and why
Every rule below exists because breaking it produces a component that looks correct today and silently stops responding when the brand changes.
- No hex codes, no
rgb(), no Tailwind palette classes (bg-slate-800,text-red-500). Use semantic utilities:bg-surface,bg-bg-subtle,text-fg,text-fg-muted,text-fg-subtle,border-border,border-border-strong,bg-accent,text-on-accent, and the status sets (bg-danger-subtle,text-danger-fg,border-danger-border, …). - No arbitrary pixel values (
p-[13px],text-[15px]). Use the scale, or density and the type ratio stop reaching your component. - No literal durations (
duration-150). Import fromui/_motion. - Interactive controls use
h-control-sm|md|lgso they align on a row. - Use
focus-ring, and never remove a focus outline without replacing it with something at least as visible. - Tailwind v4 variables use parentheses:
duration-(--duration-fast), notduration-[--duration-fast]. The bracket form is v3 syntax; in v4 it emits invalid CSS that the browser drops, so the style silently does nothing.
These are enforced mechanically by pnpm check:tokens, which runs as part of
pnpm check. If it flags your code, reach for a token — do not add an
exception.
Motion
All movement composes from ui/_motion.ts, so it stays consistent and so the
brand's motion knobs actually reach everything.
| Need | Use |
| hover/focus colour change | transitionColors |
| a thumb, chevron or indicator moving | transitionTransform |
| multi-property change | transitionAll |
| fade only | transitionOpacity |
| press feedback | pressable |
| floating surface appearing | popSurface |
| modal appearing | modalSurface |
| backdrop | scrim |
| tick or dot popping in | indicator |
| expanding panel | collapsePanel('--x-panel-height') |
Base UI drives enter/exit with data-starting-style and data-ending-style;
the surface helpers already handle both, which is what lets an exit animation
finish before the element unmounts.
Base UI specifics
- Triggers use
render, notasChild:<DialogTrigger render={<Button>Open</Button>} /> - State arrives as data attributes:
data-[checked],data-[highlighted],data-[disabled],data-[panel-open],data-[starting-style],data-[ending-style]. - To style a child from a parent's state, put
groupon the parent and usegroup-data-[…]on the child. Forgettinggroupfails silently. - Base UI's Checkbox, Switch and Radio render buttons, not inputs, so
wrapping them in a bare
<label>associates nothing. Use<Field>+<FieldLabel>, which wiresidandaria-describedbyfor you.
Forms
Input and Textarea keep the native, event-first onChange. That is
deliberate: a value-first callback breaks register() from React Hook Form and
every other uncontrolled form library. Do not change it.
<Input {...register('email')} aria-invalid={Boolean(errors.email)} />See src/routes/form-demo.tsx for the full pattern.
The app's name
Comes from the name field in package.json, injected at build time (see
vite.config.ts) and read via APP_NAME from @/lib/app. Rename the package
and the sidebar, header and browser title all follow. Never hardcode it.
Verify
pnpm check # types, lint, design tokens, unit tests
pnpm e2e # anything visualThen check your work against the brand: open /brand, set radius to 0, motion
to 0 and density to 1.3. Everything you built should follow all three. If it
does not, something is hardcoded.
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.

