Guides UI work in Boring apps: theme tokens, kit-based components, and design-rule checks. Use for new screens, restyling, dark mode, or when `boring-ui-blocks design` reports violations.
Ships in boring-ui-kit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The rule. An app writes theme tokens and its own components, and its components are built from kit primitives and blocks; it never copies or restyles a kit part.
Everything below follows from it. The kit (@hachej/boring-ui-kit, shadcn
components under @boring/ui/shadcn/*, blocks under @boring/ui/blocks/*)
owns how parts look and behave. The app owns its values and its screens.
| File | What goes in it |
|---|---|
web/src/index.css | The imports, in this order, and nothing visual: @import "tailwindcss"; @import "@hachej/boring-ui-kit/app.css"; @import "@hachej/boring-ui-kit/theme.derived.css"; @import "./theme.core.css"; Core comes last, so its roles and its EXCEPTIONS win. |
web/src/theme.core.css | The core roles (below), light in :root, dark in .dark; the app's own tokens; then an === EXCEPTIONS === block for the rare derived token that must differ. |
DESIGN.md (repo root) | The values as the designer states them, an exceptions: list (one reason per pinned token) and at most 5 lines of brand intent: the Do/Don't tokens cannot say ("lime only for the one primary action of a screen"). |
web/src/design.exceptions.json (optional; it lives in the directory the check scans) | The app's frozen check hits. It only shrinks; when empty, delete it. |
An app never keeps its own theme.derived.css or a copy of app.css: the kit
ships both, and a copy drifts.
Colours (set in :root and in .dark): --background (canvas),
--foreground (ink), --card, --primary, --primary-foreground,
--accent (hover wash), --muted (soft band), --border, --ring,
--destructive, --success, --warning, --info, --chart-series-1..5.
Shape and type (set once): --radius, --border-width, --font-sans,
--font-display, --font-mono, --text-body, --text-title, --text-chat (the assistant's reading size, 0.9375rem),
--shadow-xs, --shadow-sm, --shadow-md, --shadow-lg.
Everything else (--popover, --secondary, --muted-foreground,
--input, --link, every --sidebar-*, the status -foreground, -soft
and -soft-foreground, --chart-1..5, the --radius-* steps,
--font-heading) is derived by the kit. Set a role and they follow. To
make one differ, pin it below === EXCEPTIONS ===, preferably as a var()
of another token, and give it a reason under exceptions: in DESIGN.md.
An app token (a name the kit does not define, such as --cta) is fine.
Register it in @theme inline in theme.core.css so classes can use it. It
may be the same in both modes.
Fonts: Geist and Geist Mono by default. Mono is for code, ids and pasted
raw data only (use Textarea variant="code" for a paste box), never for
labels or numbers in prose; tabular numbers use tabular-nums. Icons are
Phosphor (@phosphor-icons/react), never Lucide.
| Need | Knob | Feature id |
|---|---|---|
| Sidebar width | --sidebar-width (and -icon, -mobile) in the theme | shell-sidebar-width |
| Blur behind dialogs, sheets and drawers | Off by default; AppShell overlayBlur turns it on, --overlay-blur retunes it | shell-overlay-blur (D-1799) |
| Overlay height | height="auto" | "tall" | "full" on DialogContent, SheetContent, DrawerContent; retune with --overlay-height-tall / --overlay-height-full | shell-overlay-height (D-1800) |
| Toasts above the chat composer | Automatic (pi-chat sets it); --toast-offset-bottom in the theme overrides | toast-offset (D-1801) |
| Screen margin | Automatic: --screen-gutter (1rem, 0.75rem compact) is the one left edge the header title and ScreenBody share. Never pad a screen root yourself (p-4, px-3) | shell-screen-gutter (D-2030) |
| Control height | Automatic: --control-h is 44px on touch, 36px with a fine pointer. Never set a height on a control | control-height (D-1741), touch-floor (D-1770) |
| A link-style action in a row | Button size="inline" (text height, 44px touch area; inside a table cell it underlines only on hover and focus) | pattern-button-inline (D-1767, D-1814), pattern-button-inline-reach (a row of them that wraps declares --inline-gap-x and --inline-gap-y) |
| Underline tabs | TabsList variant="line" | shadcn stock |
| Pasted code or raw data | Textarea variant="code" | pkg-ui-textarea-code (D-1782) |
A knob the kit lacks is a kit request (ask boring-ui-master), never app CSS. Once the same need shows up in 3 apps, it becomes a token, a prop or a block.
Build screens from these before writing anything by hand.
| The need | Use |
|---|---|
| A button, input, select, textarea, label, table, collapsible | @boring/ui/shadcn/* (button, input, select or native-select, textarea, label or field, table, collapsible or accordion), never the raw element |
| A toolbar row (search, filters, actions) | Every boxed control (Input, SelectTrigger, Button default/outline/secondary/destructive) at the default size, so all have the input's height (36 fine, 44 touch); a boxed icon button is size="icon"; only ghost or link text buttons may be sm (pattern-toolbar-row, D-1862) |
| A one-line cell in a table | <TableCell truncate title=…> (the bound is --table-cell-truncate-max, 16rem), never max-w-* truncate on the cell |
| Pick or drop one or more files | FilePick (@boring/ui/blocks/file-pick/file-pick): a button or a drop strip; refusals come back to onRefused as { file, reason: "type" | "size" | "count" } and the app writes the words |
| A list of files with upload | The file-tree block (FileTreeView) |
| A left pane the person can resize | <AppShell resizable> (or { min, max } in rem, default 12 to 28): the rail is the drag handle, the width is remembered, the theme's --sidebar-width is the default; never a hand-made drag edge that calls setProperty("--sidebar-width" |
| A screen's body | <ScreenBody> (@boring/ui/blocks/app-shell/index); for a list, table or ListDetail whose rows run edge to edge, <ScreenBody bleed>: the first cell's text still lands on the gutter. Drop the rows' own start padding |
| A sheet, drawer or bottom panel | AppSheet (@boring/ui/blocks/app-shell/index) |
| A chat with the agent | pi-chat through the shell's agent layer (AppShell agent={spec}; placements in the app-layout-and-agent skill) |
| Voice | pi-chat-voice, or useDictation from app-shell |
| Camera or attachments in the chat | pi-chat-attachments (CameraSheet) |
| Page layout, navigation, list and detail | AppShell (see the app-layout-and-agent skill) |
Named and coming (don't hand-build them; ask): settings page (flat
FieldLabel rows), form page, section layout, detail page with an
inspector (D-1793).
npx boring-ui-blocks design web/src # every rule is an error
npx boring-ui-blocks design web/src --baseline # print the current hits as a frozen list
After each UI file you edit, run the fast form, on what git reports changed:
npx boring-ui-blocks design web/src --changed --jsonl # or: npm run design -- --changed --jsonl
One {file,line,rule,level,fix} line per hit, nothing when clean, exit 1 on an error. Fix every line before you say done. The kit's own DESIGN.md lists the tokens and the ten rules.
The verifier runs the full command. A hit not in design.exceptions.json fails. A hit you
fix must leave the file (design-exceptions-shrink fires on a stale count).
Fix the code, never the list.
The check does not read what the kit installed: an unedited block copy, a shadcn
file recorded in SHADCN-GENERATED.json and the generated blocks CSS file are
skipped. Never edit one to pass the check: it is one kit-part-edited hit for
the file. Put the change in a prop or a theme token, or restore the file with
boring-ui-blocks update.
| Rule | Fix |
|---|---|
raw-element | Use the kit component it names |
kit-block | Use the block it names (table above) |
line-length, component-length, file-length | Split (200 chars, 150-line component, 400-line file) |
design-color | No hex, rgb, hsl, oklch or palette class (bg-red-500) outside the theme files: use a semantic class |
design-tokens-only | No arbitrary value (text-[13px], max-h-[85dvh]): a scale step, a knob, or a new token |
design-literal-value | No literal radius, shadow, font size or letter spacing: the theme utility (rounded-md, shadow-md, text-sm) |
(browser audit, test:design) radius | A button takes a theme radius (--radius, --radius-*). The one exception is the composer's own action buttons (attach, commands, +, send, stop, queue, dictate: found by their kit test ids, so the composer's markup is unchanged), which may be circles with the kit's --pm-radius-round. A circle set by hand on any other button, or any other radius on a composer action, still fails |
design-font-tokens | No font-family literal or @font-face outside theme.core.css: font-sans / var(--font-sans) |
design-border-width | No literal border width: the border utility (the theme sets --border-width); a heavier mark is an app token or an SVG |
design-dark-variant, design-no-dark-overrides | No dark: colour: set the dark value in .dark |
design-card-flat | A Card's className carries no border, shadow or ring |
design-no-nested-card | No Card inside a Card: a section or a separator |
design-icons-phosphor | @phosphor-icons/react, never lucide-react |
design-touch-target | A control sized under 44px: drop the small height, pick a size |
design-hand-touch-size | A control carrying its own 44px (min-h-11, size-11): remove it, the kit floor already does it |
design-button-raw-height | No h-* on a Button: the kit sets it, size picks it |
design-link-token | A link is text-link underline underline-offset-4 (the --link role), never text-primary |
design-mono-for-code | Mono only in code, kbd, pre, samp or data-mono-id; numbers get tabular-nums; a paste box is Textarea variant="code" |
design-z-index | No z-10, z-[45], zIndex: 5 or z-index: 40: a named layer (z-behind, z-raised, z-lifted, z-dropdown, z-composer, z-fullscreen, z-sheet, z-overlay, z-toast, z-tools, z-feedback) or z-[var(--z-*)] |
design-type-scale | No text-base or larger unless your theme.core.css declares that --text-<step>: the app's scale is text-xs (--text-body), text-sm (--text-title) and what it declares |
design-gap-not-space | No space-x-* / space-y-*: flex flex-col gap-2 |
design-screen-padding | No p-* / px-* on ScreenBody, its direct child or a screen root: ScreenBody draws the gutter once |
design-has-design-md | An app root has a DESIGN.md (tokens by role, the declared scale, how to run the check) |
design-no-x-scroll | No horizontal scroll in a file with a table: cells truncate and the table stacks below its width |
design-no-kit-restyle | No CSS aimed at a kit part ([data-slot=...], [data-boring...], kit class names): a token or a knob |
design-no-important | No !important: fix the selector or set a token |
design-no-script-tokens | No setProperty("--sidebar-width" in script: the theme sets the width, AppShell resizable lets the person change it (a regex literal that spells the call is reported too: rephrase it) |
design-overlay-has-title | Every Dialog, AlertDialog, Sheet and Drawer content has its Title (sr-only to hide it) |
design-theme-core-only | Set only core roles above === EXCEPTIONS ===; every pin has a reason in DESIGN.md |
design-theme-roles-both-modes | Every kit colour role set in :root is also set in .dark, and the reverse |
design-theme-local-derived | Delete the app's theme.derived.css; import the kit's |
design-exceptions-shrink | A frozen hit was fixed, or the file is a kit part now skipped: remove the entries it names from design.exceptions.json |
kit-part-edited | A copy of a kit block, a shadcn file or the blocks CSS file was changed by hand: undo it; the change goes through a prop or a theme token, or boring-ui-blocks update restores it |
Before a PR: the main screen at 390 and at 1280, light and dark. Check that the brand survived, contrast holds in both modes, and nothing is under the 44px floor on the phone. The PR carries those shots and says which roles changed and why.
Coach Max is a phone-first consumer app with a loud look: paper #F4F5F9,
indigo --primary #3A2DFF, ink borders, a lime call to action, 2px lines,
4px radii, hard offset shadows. It reaches all of that from
theme.core.css:
--background, --foreground, --primary, --muted, --border
(ink, so lines are structural), --ring: var(--primary), the status
colours, --radius: 0.25rem, --border-width: 2px, the three font roles,
and the shadow scale as hard offsets (4px 4px 0 0 var(--foreground),
zero blur). Dark values in .dark.--cta lime and --highlight
papaya (registered in @theme inline, so bg-cta works), --overlay
for the scrim, the same in both modes on purpose.DESIGN.md intent: "lime only for the single primary action of a
screen", "no soft shadows".bg-primary, bg-cta, rounded-lg, shadow-md,
font-display. No kit part is restyled; where the brand needed one (the
sheet, the sidebar), that became a token or a knob request.Compta is the opposite test: near-stock, desktop-first, business. It sets a few roles and builds every screen from kit parts. Both pass the same check.
For a Boring app, this skill wins. frontend-design, design-impeccable,
redesign-existing-projects, minimalist-ui: express their distinctive look
through tokens and DESIGN.md, never through new fonts, palettes or CSS in
components. pick-ui-library: the kit first; another library only for what
the kit lacks (motion, drag and drop, virtualisation), with token colours.
emil-design-eng, make-interfaces-feel-better, interaction-design,
animate, mobile-native: their craft holds, but every value (radius,
shadow, easing, duration, font) comes from a token. No MUI, Chakra, Mantine
or Ant; no hand-made dialog, dropdown, toast, spinner or bubble.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
design-system, theme-tokens, ui-kit, shadcn-ui, tailwind-css
/boring-ui-kit:boring-design-systemfrom boring-ui-kit
boring-ui-kit@boring-stack is listed by hachej/boring-stack — review the source before installing
npx claudepluginhub hachej/boring-stack --plugin boring-ui-kit6 skills in this plugin
/add-blocksFind, install, update, check and theme Boring UI registry blocks (shadcn items such as pi-chat, app-shell, pi-workspace, pi-app, app-shell, viewers, file-tree, documents, feedback, windows) with the boring-ui-blocks command. Use when asked to "add a chat/agent block", "install pi-app", "upgrade/update the Boring blocks", "boring-ui-blocks check fails", "blocks edited", "restyle/rebrand the agent UI", "change the chat labels/icons/actions", "dark mode for the chat", or when tempted to edit a file under src/components/pi-*./agent-capabilitiesGive a Boring UI in-app agent capabilities and gate them safely - custom tools, workspace file access (file guard, present), Approve/Deny approvals, ask_user questions, sub-agents (delegate), schedules, sandboxes and self-evolving tools. Use when asked to "add a tool to the agent", "let the agent edit files", "require approval before X", "ask the user a question", "add a sub-agent/delegate", "schedule a follow-up/reminder", "dry-run/sandbox the agent", "let the agent write its own tools", or when choosing which tools to gate with requireApproval or createApprovalExtension./app-layout-and-agentLay out a Boring UI app and place its agent. Use for AppShell (layouts screen, workspace, chat), nav items, ListDetail, screen headers, the phone tab bar or sheet, the collapsed left pane, where the agent lives (shell layer, full page, embedded screen, ambient bar, placed), and for customising the chat from the app side (AgentSpec, chatProps, labels, conversations, mentions beyond files, tool cards, natural presentation). Pick this before writing any layout code or any PiChat prop.Other plugins' skills for the same job