Review UI code for alignment with the emcn design system — components, tokens, patterns, and conventions
78%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./.agents/skills/emcn-design-review/SKILL.mdArguments:
User arguments: $ARGUMENTS
This codebase uses emcn, a custom component library built on Radix UI primitives with CVA variants and CSS variable design tokens. All UI must use emcn components and tokens.
packages/emcn/src/index.ts (re-exports components, Calendar, Table*, and icons) to know what's available; for the full icon set read packages/emcn/src/icons/index.tsapps/sim/app/_styles/globals.css for CSS variable tokenscn, and tokens from the @sim/emcn barrel, never component subpaths@sim/emcn/iconsUse CSS variable pattern (text-[var(--text-body)]), never Tailwind semantics (text-muted-foreground) or hardcoded colors (text-gray-500, #333).
Text: --text-primary, --text-secondary, --text-tertiary, --text-muted, --text-body (canonical value text), --text-icon, --text-placeholder, --text-subtle, --text-inverse, --text-error
Surfaces: --bg, --surface-1 through --surface-7, --surface-hover, --surface-active
Borders: --border (--border-1/--border-muted are legacy aliases resolving to it — flag new uses)
Brand/accent: --brand-secondary, --brand-accent
Z-Index: --z-dropdown (100), --z-toast (150), --z-modal (200), --z-popover (300), --z-tooltip (400), --z-takeover (500), --z-shell-gate (600)
Shadows: shadow-subtle, shadow-medium, shadow-overlay, shadow-card
Badges: --badge-* semantic families (success/error/gray/blue/purple/orange/amber/teal/cyan/pink, each with -bg/-text)
Header/action chrome is Chip/ChipLink (variants primary, destructive, outline, border, border-shadow; omit variant for the bare chip, and filled is reserved for chip fields and triggers). Selection and toggles use the active prop, never a variant. A single-resource Delete is a plain chip behind ChipConfirmModal; destructive is only for at-scale actions (.claude/rules/sim-settings-pages.md "Deleting a resource"). Button is only for icon-only toolbar controls (ghost/quiet, size='icon').
Use ChipConfirmModal (title "Delete/Remove {ItemType}", confirm={{ label, onClick }}, which defaults to destructive). Keep its fail-safe defaultAction='dismiss' per .claude/rules/emcn-components.md "Modal keyboard defaults". Put irreversible-consequence copy in text.
toast.success(), toast.error(), toast() from @sim/emcn. Never custom notification UI.
red=error/failed, gray-secondary=metadata/roles, type=type annotations, green=success/active, gray=neutral, amber=processing, orange=paused, blue=info. Use dot prop for status indicators.
Default: size-[14px]. Color: text-[var(--text-icon)]. Scale: 14px > 16px > 12px > 20px. Use the size-* shorthand — flag h-[Npx] w-[Npx] and h-N w-N pairs as refactor targets.
Check at 320px and 390px with touch, then desktop and fullscreen. Use Chip/ChipLink's mobileIconOnly for familiar mobile toolbar actions, preserving accessible names; keep labels for ambiguous choices. Keep navigation, primary actions, and dismissal reachable without hover or dragging; aim for 44px touch targets with compact visible icons/button faces and 16px editable text. Match behavior to the actual container or viewport breakpoint. Contain horizontal scrolling to intentional tables/code, fit overlays to the dynamic viewport, and keep the composer/actions reachable with the keyboard open. Reuse EMCN tokens and brief motion with reduced-motion support; preserve desktop geometry.
<button>/<input>, or legacy Input/Textarea/Modal, instead of the canonical chip components (ChipInput/ChipTextarea/ChipModal)ChipModalBody instead of ChipModalFieldtext-gray-*, #hex, rgb())text-muted-foreground) instead of CSS variablescn()simstudioai/sim
edf5f0a
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.