Design skill
Design rules and checks for consistent interfaces.
Installation
npx skills add QinYangWang/paneui --skill paneui-designOr through the shadcn CLI, into .agents/skills:
pnpm dlx shadcn@latest add @paneui/design-skillCheck
Run it before you commit. It exits with an error when a rule breaks; allow-list a deliberate exception in paneui-design.config.json with its reason.
For what only the rendered page shows, open the screen and paste scripts/radius-probe.js (nested corners) or scripts/polish-probe.js (hit areas, image edges, live numbers) into the browser console.
Web and Native
Share semantic colours, spacing and wording. Web uses CSS tokens and browser semantics; Native uses touch dimensions, system text scaling and native accessibility. The platform references in the skill explain where their implementations differ.
Native checks inspect visible styles and primitive props. Prop spreads, imported styles, effective touch bounds and device announcements still need review. Browser probes apply to Web elements; a browser preview does not replace a device run.
Rules
1.Colour with theme tokens
Tokens follow the theme, the accent preset and dark mode; palette classes and hex values don't.
2.Put text on a solid in its foreground token
The neutral accent's solid is near-white in dark mode, so text-white disappears on it.
3.Fill for state, surface for panels
secondary, muted and accent are translucent fills; anything that floats or holds content needs an opaque surface.
4.Elevate with shadow tokens, not borders plus shadows
Each shadow level already carries its own hairline, so a CSS border on top doubles the edge.
5.Keep series on the chart palette
Eight fixed hues read the same under every accent, in both modes, and keep neighbours apart.
6.Keep nested radii concentric
A child corner that doesn't follow its container's curve reads as a mistake at every radius preset.
7.Stay at or under 16px
Past 16px containers turn into blobs and nested parts can't stay concentric.
8.Derive every radius from the base radius
Presets and the radius slider rescale --radius and the tokens built on it, never literal pixel radii.
9.Use the UI type scale
One compact scale keeps dense screens even; arbitrary sizes drift.
10.Semibold titles, medium labels
Two weights carry the hierarchy; heavier text shouts in a dense layout.
11.Keep the font's tracking
The type is spaced for its size; tightening small text makes it harder to read.
12.Use tabular numbers for numbers that change or align
Proportional digits make columns and counters jump.
13.Size controls for desktop density
Desktop screens hold more per view; touch-sized controls waste it.
14.Space related things closer
Spacing groups content before any border does.
15.Start navigation text on one left edge
Indents and guide lines widen the sidebar and break the column the eye follows.
16.Compose the library, don't restyle it
A component's variants and sizes are its design; overriding them per screen forks the style.
17.Keep a menu label inside its group
The label names the group for assistive tech, and the primitive label throws outside one.
18.Chevrons for folders, file icons for files
A folder icon next to a chevron says the same thing twice and pushes names apart.
19.Draw icons from one family per group
Two glyph families in one group look like two different products.
20.Frame title icons, keep nav icons bare
A frame marks an icon as the subject of a card; in a list it is clutter.
21.Use real brand marks for other products
Redrawn or approximated logos look wrong to anyone who knows the brand.
22.Show people and workspaces as avatars
An avatar says "who"; a generic icon in that spot says nothing.
23.Answer a press with a fill
Native controls don't shrink when pressed; scaling every button makes the screen feel springy.
24.Transition named properties, briefly
transition-all animates layout you didn't mean to, and slow hovers feel laggy.
25.Gate movement on reduced motion
Movement, scale and blur can make some readers ill; an opacity fade carries the same change.
26.Show a ring on keyboard focus
Keyboard users need to see where they are; a hover style doesn't help them.
27.Let the preview explain
A live preview already shows the look, layout and states; text that repeats it is noise.
28.Keep descriptions to one plain sentence
A registry description is the page lede, the search text and the meta tag at once.
29.Never write colon lists or stacked adjectives
"X: a, b, c and d" and "powerful, seamless" read as filler.
30.Describe what it does, not where it came from
Copy names the job, not the projects behind it.
31.Name template parts apart from registry items
A part file named like an item (parts/avatar.tsx next to the avatar item) collides on install and in imports.
32.Run the upgrade check after a theme update
The CLI adds and updates theme variables but never deletes one, so removed tokens linger.
33.Give every target 24px to land on
A 16px checkbox or close button is hard to hit with a trackpad and harder with a finger.
34.Trim the icon side of a button
An icon's side bearing adds space, so equal padding pushes the content off centre.
35.Outline images with a neutral hairline
Without an edge a pale photo melts into a white card; a grey border picks up the surface tint.
36.Cross-fade icon swaps
A glyph that cuts from copy to check is easy to miss; one that changes in place reads as a new state.
37.Transition states, keyframe one-offs
A transition retargets when a state flips mid-way; a keyframe restarts and snaps.
38.Leave quieter than you arrive
The eye has moved on to what comes next; a big exit pulls it back.
39.Recolour icons with CSS, keep their stroke and grid
A thicker stroke, an off-grid size or a baked-in fill makes one glyph look like another set.
40.Name every icon-only button
A screen reader announces an unnamed icon button as "button" and nothing else.
41.Match the icon stroke to the text weight
A regular stroke beside semibold type looks faint, as if the icon were disabled.
42.Fill the active glyph where there's no row fill
Colour alone is a weak signal for where you are, especially on a phone in sunlight.
43.Align text to the reading direction
text-left stays left in Arabic and Hebrew, where the text starts on the right.