Turn your design system into lint rules
systomic is an Oxlint plugin that turns your design system into fixed rules: components used the way they're built, motion that feels right, styles from the scale, focus rings only for keyboards.
Design systems rarely break in one place. They drift one call site at a time: a hardcoded padding here, a dialog without a title there, a dropdown that scales in from its center. Each one looks harmless in review.
systomic catches them where they're written. Components declare their contract with a comment, and every call site is checked against it, across Tailwind, inline styles, StyleX and stylesheets.
pnpm add -D systomic oxlintSet up systomic in this project. systomic is an Oxlint plugin (with a Stylelint companion) that checks UI code against the design system. Docs for agents: https://systomic.dev/llms.txt (every page is also available as Markdown at its URL + ".md"). Read https://systomic.dev/installation.md and https://systomic.dev/configuration.md before you change anything.
The settings matter: with the wrong alias, packages or stylesheets, rules silently miss components and classes. Don't guess them, and don't just copy the defaults.
1. Look at the project first, without changing anything:
- package manager, monorepo layout, existing Oxlint / ESLint / Stylelint config and lint scripts
- import aliases (tsconfig "paths"), where the design-system components live (app folder, workspace package or published package)
- how styles are written: Tailwind, CSS modules, global stylesheets, StyleX, inline styles; class helpers (cn, clsx, cva, tv)
- UI and overlay libraries (Radix, Base UI, …), the icon library, the animation library, date libraries (date-fns, dayjs, moment, Luxon)
2. Ask me about the settings before you write them. If you have a tool for asking questions with options (question cards, e.g. AskUserQuestion in Claude Code, request_user_input in Codex), use it; otherwise ask in chat, a few questions at a time. Put your recommendation first, based on what you found, and say why. Ask about:
- presets: recommended.json only, or also suggestions.json (good practice, warnings only)
- Stylelint for .css/.scss files: yes or no (only if the project has stylesheets)
- settings.systomic.alias: confirm the mapping you found (default { "@/": "src/" })
- settings.systomic.packages: which packages to follow for annotations (recommended: only the design-system packages, so large libraries like icon sets aren't parsed)
- settings.systomic.stylesheets: global stylesheets whose classes are used by name
- severity during rollout: keep the preset severities, or start with everything on "warn" so CI doesn't break
- rules to switch off or tune, where the project clearly differs from the defaults: prefer-temporal / prefer-temporal-over-libraries (is moving to Temporal wanted? which date libraries to allow for now), animation-duration (limits; components that should count as modal/dropdown/toast), no-hardcoded-values (ignore the design-system folder itself; ignore globs are relative to the nearest package.json, so in a monorepo scope them to one package with Oxlint overrides), required-parts (parts of composable components), class helpers beyond cn/clsx/cva/tv (the attributes / callees rule options: not a setting, they go on each rule that reads classes, see https://systomic.dev/configuration.md)
3. Then set it up:
- install with the project's package manager: systomic and oxlint (and stylelint if chosen) as dev dependencies
- extend the chosen presets in .oxlintrc.json and add the settings under "settings": { "systomic": { … } }, plus rule options next to the rules
- if chosen, stylelint.config.mjs with extends: ["systomic/configs/stylelint.mjs"]
- lint scripts in package.json if there are none
4. Offer annotations, don't add them unasked: @systomic-allow / @systomic-disallow (what call sites may or may not pass), @systomic-parts (required parts) and @systomic-overlay on the main design-system components (see https://systomic.dev/annotations.md). Show me the list first.
5. Run the linters and give me a short summary: findings per rule, and which ones look like real issues vs. settings that need tuning. Don't fix findings in bulk; ask first.How it works
Wherever styles are written
- Tailwind
- cva and tv
- Inline styles
- StyleX
- CSS modules
- Stylesheets
22 rules, so you know what to fix
All rulesComponents
- Component overridesProps, classes and styles a component doesn't allow.
- Required partsComposable components rendered without a part they need.
- No conditional overlayDialogs and sheets rendered conditionally instead of opened through
open. - Enforce skeletonLoading content that renders nothing instead of a skeleton.
Motion
- Animation durationAnimations longer than their element allows.
- Origin-aware scalePopovers and menus that scale in from their center instead of their trigger.
- Animated icon swapTwo icons swapped by a ternary without animation.
- Animated text swapSuggestionLabels that swap text without animation, so the button jumps in width.
- Prefer transitionSuggestionKeyframe animations on drawers, sheets and accordions, which jump when interrupted.
Styling
- Focus visible
focus:and:focusinstead offocus-visible. - Hit slopSmall buttons and controls without a larger hit area.
- Interactive cursorClickable elements with a cursor that doesn't match the rest of the product.
- Interactive select noneClickable elements whose label a double click selects.
- Concentric radiusNested rounded corners that don't share a center.
- Dropdown scroll paddingScrolling selects and menus with padding but no
scroll-padding-block. - No hardcoded valuesHardcoded lengths and colors, fixed to the scale.
- Tabular numbersElements that only show a number, without tabular figures.
- Input font sizeText fields below 16px on phones, which iOS Safari zooms into.
- Max blurSuggestionBlur and backdrop blur over 20px, which get expensive to paint.
- Prefer dvhSuggestion
dvhinstead ofh-screen/100vh.
The fine print
What is systomic?
An Oxlint plugin with a Stylelint companion. It checks UI code against the design system: components used the way they're built, motion within its limits, styles from the scale, focus rings only for keyboards.
What's the difference between rules and suggestions?
Rules (recommended.json) are violations of the design-system contract and report as error or warn. Suggestions (suggestions.json) are good practice outside the contract. They always warn and never fail CI.
Which styling approaches does it check?
Tailwind classes, inline styles, StyleX and stylesheets: CSS modules, imported CSS and @apply. Class strings are followed through variables, cva / tv and imports. Rules with a Stylelint counterpart also cover .css and .scss files. See Styling.
How does systomic know what a component allows?
From annotations on the component itself. @systomic-allow lists the props, classes and styles a call site may pass, @systomic-parts the parts it must render, and @systomic-overlay marks overlays. See Annotations.
Will it break CI on day one?
Only if you let it. Every rule can be set to warn during rollout, and suggestions never fail. The setup prompt asks your agent to check the project and confirm settings with you before it writes anything.
Where did the rules come from?
Most of them grew out of the design engineering notes @n___vc posts on X. Rules that build on someone else's work credit it on their own page.