A skill that enforces Intent UI component library conventions when writing or reviewing React/TSX code.
The intentui skill ensures your code follows Intent UI patterns:
- Uses components from
src/components/ui/instead of raw HTML elements - Uses semantic color tokens (
text-muted-fg,bg-primary) instead of raw Tailwind colors (text-blue-500,bg-red-600) - Uses proper form structure —
Fieldset,Legend,FieldError,Description - Installs missing components from the registry via the shadcn CLI
intentui/
├── SKILL.md # Main skill definition
└── rules/
├── styling.md # Semantic colors, cx/twMerge/twJoin, size-* shorthand, intent prop
├── forms.md # Fieldset, Legend, TextField, Select, Checkbox, Radio, FieldError patterns
├── components.md # HTML → Intent UI component mapping, Text/TextLink/Strong/Code
├── overlays.md # Modal, Sheet, Drawer, Popover, Menu, and Tooltip composition
├── collections.md # Table, ListBox, GridList, Tree, TagGroup: items + render fn, selection props
└── cli.md # Search & install missing components from the registry
- Never use raw Tailwind colors (e.g.
text-blue-500) — use semantic tokens (text-primary) - Use
size-*instead ofw-* h-*when width and height are equal - Use
cxfor react-aria components,twMerge/twJoinfor regular HTML elements - Use
intentprop for variants, notvariantorcolor - Use
tvfromtailwind-variantsfor component variant styles
- Use
Fieldset+Legendto group fields, not<div>+<h1> - Use
Textfor descriptions, not<p> - When
isRequiredis set, always include<FieldError /> - Add
data-slot="control"to custom divs inside Fieldset for proper spacing Checkbox,Radio, andSwitchhold only the label — all props go onCheckboxField/RadioField/SwitchField- Use
value/onChangefor controlled Select/ComboBox —selectedKey/onSelectionChangeare deprecated - Never use
<Input type="number">or<Input type="date">— useNumberFieldandDatePicker
- Use Intent UI components instead of raw HTML (
Buttonnot<button>,Linknot<a>) - Use
TextLinkfor links insideText,Strongfor bold,Codefor inline code
- Compose
Modal/Sheet/Drawer/Popover/Menu/Tooltipwith their matching subcomponents — never raw<div>or<dialog> - Trigger state is managed by the root wrapper — do not wire up your own
isOpen TooltipTrigger/MenuTrigger/DrawerTriggerare the button — style withbuttonStyles(...), never nest a<Button>inside- Set
role="alertdialog"onModalContentfor destructive confirmations
- Never
.map()inside a collection — useitems={...}+ a render function(item) => <Item id={item.id} /> - Collections use
selectedKeys/onSelectionChange(aSet) — not thevalue/onChangeofSelect/ComboBox - Selection checkboxes render automatically in
selectionMode="multiple"— do not add your own - Every item needs an
id;Table,ListBox,GridList, andTreerequirearia-labelor a visible label
- If a component doesn't exist in
src/components/ui/, install it from the registry - Detects package runner from lockfile (
bun.lock→bunx --bun, etc.) - Reads registry name from
components.json, defaults to@intentuiif not configured - Never modifies
components.json