From frontend-skills
Sets up registry hooks for shadcn component libraries, provides atomic design taxonomy for component classification, and analyzes drift between consumer repos and registry source.
How this skill is triggered — by the user, by Claude, or both
Slash command
/frontend-skills:setup-registry-workflowThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- **PostToolUse** (`ui-registry-warn.sh`): warn once/session when edit UI component dirs | prompt upstream PR
ui-registry-warn.sh): warn once/session when edit UI component dirs | prompt upstream PRregistry-check.sh): block if redpanda-ui modified without update registry.json + add changesetClassify every registry component one level. Drive test depth.
| Level | useState | Registry imports | Custom kbd handlers | Portal | Test count |
|---|---|---|---|---|---|
| Atom | 0-1 | 0 | 0 | No | 3-4 |
| Molecule | 2 | 1-2 | 1-10 lines | Maybe | 5-8 |
| Organism | 3+ | 3+ | 10+ lines | Often | 8-15 |
Tiebreaker: highest-scoring signal win. Radix-provided kbd nav no count.
Atom: Single-responsibility primitives | one semantic HTML element/Radix primitive | zero or one controlled/uncontrolled toggle. Examples: Button, Badge, Input, Label, Separator, Spinner, Skeleton, Checkbox, Switch
Molecule: Combine 2-3 atoms | limited local state (open/closed, selected index) | simple portals. Examples: CopyButton, InputGroup, ButtonGroup, Field, Accordion, Breadcrumb, Card, Tabs
Organism: Multiple molecules+atoms | significant state (3+ vars or useReducer) | custom kbd nav | portal rendering. Examples: Combobox, MultiSelect, DataTable, Dialog, DropdownMenu, Sheet, Sidebar, AutoForm
Component evolve between levels -> verify heuristics | expand tests new minimum | review FP compliance.
Compare consumer repo components against registry source. Run on upstream sync.
packages/registry/src/components/ | match against consumer dirsgit diff --no-index --ignore-all-space per component | skip empty diffs| Rule | Detect | Action |
|---|---|---|
| Import noise | Only @/->../ path changes, 'use client' directives, biome comments | Skip-Import-Only |
| Staleness | Registry changelog newer than consumer file | Skip-Outdated -- consumer sync FROM registry |
| Business logic | String equality (=== 'admin'), feature flags, API endpoints, route logic, analytics, env checks | Skip-Business-Logic -- never upstream app-specific code |
| Pattern | Example |
|---|---|
| String equality checks | title === 'Users' |
| Hard-coded business data | tier === 'enterprise' |
| Feature flags | featureFlagEnabled |
| API endpoints | fetch('/api/console/users') |
| Route-specific logic | pathname.includes('/dashboard') |
| Analytics/tracking | analytics.track(...) |
Safe: prop-based logic (variant === 'destructive', size === 'lg').
| Status | Meaning |
|---|---|
| Upstream | Real functional diff, safe merge into registry |
| Skip-Import-Only | Only import path/directive noise |
| Skip-Outdated | Registry newer -- consumer pull, not push |
| Skip-Business-Logic | App-specific logic -- re-implement cleanly if needed |
scripts/ui-registry-warn.sh + scripts/registry-check.sh -> .claude/hooks/ | chmod +x.claude/settings.json:
ui-registry-warn.shregistry-check.shcomponents/ui/ or redpanda-ui/ trigger warningredpanda-ui/ without registry.json update -> Stop blockredpanda-ui/ with registry.json but no changeset -> Stop blocknpx claudepluginhub redpanda-data/ui-harness --plugin frontend-skillsConfigure shadcn/ui registries, components.json, and CLI commands. Covers default Radix registry, Base UI registry, and custom registries.
Detects hardcoded values where design tokens exist and raw HTML primitives where registered components should be used. Reports findings without modifying source.
Audits design system component libraries for usage signals, complexity, duplication, and coverage gaps, producing tiered findings, inventory, and prioritized recommendations.