Apply a restrained, Swiss/Japanese/Scandinavian/German-influenced product design system when building or refining UI in React, Next.js, TypeScript, and shadcn/ui — the stack-specific binding of the ui-principles core, with concrete numbers. Use when the user asks to build, refine, critique, redesign, or review a page, screen, component, form, table, dashboard, layout, or other frontend interface in a React, Next.js, TypeScript, or shadcn/ui project. For stacks without React/shadcn (plain HTML/CSS, Vue, Svelte, emails, server-rendered templates), use ui-principles instead. Do not use for marketing sites, landing pages, non-UI work, or requests for bold, playful, maximalist, or otherwise expressive aesthetics.
Ships in front. 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.
Read when SKILL.md points to them.
This skill is an opinionated constraint system for product UI in React, Next.js, TypeScript, and shadcn/ui. It is not generic guidance. Most rules are prompts to apply when reviewing a screen. A handful — type scale ceilings, radius, shadow, spacing tokens, CSS variable usage — are hard limits. Follow those literally.
ui-principles is the framework-agnostic core of this aesthetic — rules, not numbers. calm-ui is its React/Next.js/shadcn binding with the numbers filled in. On stacks without React/shadcn, use ui-principles; the two never disagree.calm-ui owns visual/interface constraints: spacing, hierarchy, component refinement, tokens, density, responsive rhythm, and shadcn adaptation.product-design owns the product critique for existing screens, flows, forms, dashboards, and workflows. If the question is whether the experience solves the right user problem, use product-design first.craft-ds owns generating or maintaining components/ds.tsx layout primitives and prose typography. Do not use calm-ui to create that artifact from scratch.design-loop skill, these rules (especially the hard limits) can seed /design.md — the contract the loop enforces surface by surface.bg-background, text-foreground, bg-muted, etc.)bg-gray-*, bg-white) — this breaks dark modeLucide React (shadcn's default). One set only. Consistent sizing: h-4 w-4 inline with text, h-5 w-5 when stand-alone. Icons support a label, they rarely replace one.
Do not produce any of the following:
shadcn/ui is the component and color baseline. The job is to refine it into the restrained language — not replace it, not ignore it, and not ship it looking stock.
shadcn's theming runs through CSS variables in globals.css. This is the color system — and it's what makes dark mode work automatically. Always use the semantic color classes:
✅ bg-background text-foreground border-border
✅ bg-muted text-muted-foreground bg-primary text-primary-foreground
✅ bg-card bg-popover bg-accent bg-destructive
❌ bg-gray-100 text-gray-500 border-gray-200 bg-white text-black
Hardcoded Tailwind color classes (like bg-gray-* or bg-white) break dark mode and bypass the design system. If you need a color, it should come from a CSS variable. The only exception is opacity modifiers on semantic colors when needed (e.g., border-border/50).
The first lever for making shadcn not look like default shadcn is adjusting the CSS variables in globals.css:
--radius: Reduce for a more restrained feel. 0.375rem or 0.5rem — not 0.75rem. shadcn components read from this variable; tune the variable, don't override with rounded-xl at the component level.--border: Slightly lower contrast than default. Borders should be felt, not seen.--primary: Keep it understated. It's an accent, not a shout.--muted: The workhorse for subtle backgrounds. Make sure it's actually subtle.For each component type, the refined version is what to produce. The default is shown only so you can recognize it in existing code.
Default shadcn wraps everything in <Card> with <CardHeader> and <CardContent>. Often the card is unnecessary — spacing and typography create the grouping on their own:
// Default — card doing nothing structural
<Card>
<CardHeader>
<CardTitle>Team Members</CardTitle>
<CardDescription>Manage your team and roles.</CardDescription>
</CardHeader>
<CardContent>...</CardContent>
</Card>
// Refined — open composition, card removed
<div className="space-y-4">
<div>
<h2 className="text-sm font-medium">Team Members</h2>
<p className="text-sm text-muted-foreground">Manage your team and roles.</p>
</div>
<div className="space-y-2">...</div>
</div>
Use <Card> only when you need explicit containment — a clickable surface, a draggable item, a visually distinct group inside a larger layout.
// Default — every action looks equally important
<div className="flex gap-2">
<Button>Save changes</Button>
<Button>Cancel</Button>
<Button>Archive</Button>
</div>
// Refined — one primary, secondaries quiet
<div className="flex items-center gap-2">
<Button size="sm">Save changes</Button>
<Button size="sm" variant="ghost">Cancel</Button>
<Button size="sm" variant="ghost">Archive</Button>
</div>
size="sm" (h-9 px-3) for most product buttons. default is for hero/CTA contexts only.variant="default" per screen. Secondary actions use ghost or outline.// Default — heavy header, uniform emphasis, loud hover
<Table>
<TableHeader>
<TableRow>
<TableHead>Name</TableHead>
<TableHead>Role</TableHead>
<TableHead>Status</TableHead>
</TableRow>
</TableHeader>
<TableBody>
<TableRow>
<TableCell>Ava Chen</TableCell>
<TableCell>Engineer</TableCell>
<TableCell>Active</TableCell>
</TableRow>
</TableBody>
</Table>
// Refined — quiet header, muted secondary columns, subtle hover
<Table>
<TableHeader>
<TableRow className="hover:bg-transparent">
<TableHead className="h-9 font-normal text-muted-foreground">Name</TableHead>
<TableHead className="h-9 font-normal text-muted-foreground">Role</TableHead>
<TableHead className="h-9 font-normal text-muted-foreground">Status</TableHead>
</TableRow>
</TableHeader>
<TableBody>
<TableRow className="hover:bg-muted/50">
<TableCell className="py-2">Ava Chen</TableCell>
<TableCell className="py-2 text-muted-foreground">Engineer</TableCell>
<TableCell className="py-2 text-muted-foreground">Active</TableCell>
</TableRow>
</TableBody>
</Table>
h-9 row height. Don't bold headers. No header background fill.text-muted-foreground.hover:bg-muted/50 — felt, not announced.// Default — heavy labels, loose rhythm, tall inputs
<div className="space-y-6">
<div>
<Label className="text-base font-semibold">Display name</Label>
<Input className="mt-2" />
</div>
<div>
<Label className="text-base font-semibold">Email</Label>
<Input className="mt-2" />
</div>
</div>
// Refined — understated labels, tight rhythm
<div className="space-y-4">
<div className="space-y-1.5">
<Label className="text-sm font-medium">Display name</Label>
<Input className="h-9" />
</div>
<div className="space-y-1.5">
<Label className="text-sm font-medium">Email</Label>
<Input className="h-9" />
</div>
</div>
space-y-4 between fields; space-y-1.5 label-to-input.text-sm font-medium — readable but quiet.text-xs text-muted-foreground, one line max.Starting points for the restrained feel. Rows marked (hard) are enforced; others are defaults you can deviate from with reason.
| Property | Guidance |
|---|---|
| Type scale | (hard) text-xs through text-lg in product UI. text-xl for page titles only. No text-2xl+. |
| Font weights | 2–3 weights max per screen (e.g. font-normal, font-medium). Avoid font-bold and heavier. |
| Section spacing | space-y-6 or gap-6 between major sections |
| Group spacing | space-y-2 or gap-2 within related items |
| Page padding | p-4 on mobile, p-6 or px-6 py-8 on desktop |
| Border radius | (hard) Set --radius to 0.375rem–0.5rem in globals.css and let shadcn components inherit. Don't override with rounded-xl or rounded-full on containers. |
| Shadows | (hard) shadow-sm sparingly, or none. Never shadow-lg+. No tinted/colored shadows. |
| Border weight | Default border (1px). Use border-border or border-border/50 for subtler lines. |
| Button height | size="sm" (h-9) in product UI; default for hero/CTA only. |
| Color | (hard) Only shadcn CSS-variable classes. No bg-gray-*, bg-white, text-black. |
shadcn's CSS variables handle dark mode automatically. The refinement is in how restrained the dark palette stays — dark mode is where calm aesthetics most easily fall apart.
border-border/50 more often than border-border.bg-card or bg-muted is the signal of "raised." Keep shadows at shadow-sm or remove.Calm at desktop often becomes cramped at mobile. Preserve rhythm, not grid.
p-4 md:p-6 on containers. Keep space-y-6 between sections; don't collapse to space-y-3 just to fit.h-9 is the floor. Below that, taps become imprecise. Button size="sm" meets this; smaller is a mistake.When building or refining UI, do these in order.
Do not jump ahead. If you are about to write JSX without a clear answer to steps 1 and 2, stop and go back.
Answer yes to each before finishing. If any is no, revise.
bg-gray-*, no bg-white)?Task-specific copy-paste prompts (build, refinement passes, critiques, one-liners):
→ references/prompt-library.md
Condensed portable version of the rules for pasting into a CLAUDE.md in other projects:
→ references/system-prompt.md
What SKILL.md sets; muted values are Claude Code's defaults
11 skills in this plugin
/component-refactoringRefactor high-complexity React components in Dify frontend. Use when `pnpm analyze-component --json` shows complexity > 50 or lineCount > 300, when the user asks for code splitting, hook extraction, or complexity reduction, or when `pnpm analyze-component` warns to refactor before testing; avoid for simple/well-structured components, third-party wrappers, or when the user explicitly wants testing without refactoring./reactBuilds token-driven React components with TypeScript and modern patterns. Use when creating React component libraries, integrating CSS custom properties, or building Next.js design system components with forwardRef and composition./frontend-code-reviewOther plugins' skills for the same job
/front:calm-uifrom front
npx claudepluginhub nmhjklnm/frontend-skills --plugin front