Claude-skill-registry heroui-recommender
Recommend appropriate HeroUI components for new features and ensure proper usage. Use when implementing new UI features or migrating from shadcn/ui to HeroUI.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/heroui-recommender" ~/.claude/skills/majiayu000-claude-skill-registry-heroui-recommender && rm -rf "$T"
manifest:
skills/data/heroui-recommender/SKILL.mdsource content
HeroUI Component Recommender Skill
This Skill helps developers select and implement the right HeroUI components for features, ensuring consistent UI/UX across the application.
When to Activate
- Starting implementation of new UI features
- Migrating components from shadcn/ui to HeroUI
- Uncertain which HeroUI component fits requirements
- Need usage examples with TypeScript types
- Want to verify proper HeroUI patterns
Available HeroUI Components
The project uses these HeroUI components (from package.json):
Interactive Components
- Button (
) - Actions, CTAs, form submissions@heroui/button - Tabs (
) - Section navigation, category switching@heroui/tabs - Pagination (
) - List navigation, data tables@heroui/pagination - Input (
) - Form fields, search boxes@heroui/input - Popover (
) - Contextual information, tooltips@heroui/popover - Tooltip (
) - Hover hints, icon explanations@heroui/tooltip
Display Components
- Card (
) - Content containers, dashboard widgets@heroui/card - Table (
) - Data grids, listings@heroui/table - Chip (
) - Tags, badges, status indicators@heroui/chip - Alert (
) - Notifications, warnings, info messages@heroui/alert - Toast (
) - Temporary notifications, success messages@heroui/toast
Layout Components
- Spacer (
) - Flexible spacing between elements@heroui/spacer - Spinner (
) - Loading states, async operations@heroui/spinner
Complete Suite
- @heroui/react - Full HeroUI component library
Actions Performed
- Analyze Requirements: Understand the feature/UI needs
- Recommend Components: Suggest appropriate HeroUI components
- Provide Examples: Show TypeScript usage with proper types
- Fetch Latest Docs: Use Context7 MCP to get up-to-date HeroUI documentation
- Check Patterns: Ensure semantic colors and accessibility best practices
- Migration Guide: If replacing shadcn/ui, provide migration steps
Example Recommendations
Feature: Data Table with Pagination
Recommended Components:
fromTable
- Main data display@heroui/table
fromPagination
- Navigation controls@heroui/pagination
fromChip
- Status badges@heroui/chip
fromSpinner
- Loading state@heroui/spinner
Usage Example:
import { Table, TableHeader, TableColumn, TableBody, TableRow, TableCell } from "@heroui/table"; import { Pagination } from "@heroui/pagination"; import { Chip } from "@heroui/chip"; export function DataTable() { return ( <div className="flex flex-col gap-4"> <Table aria-label="Car registrations"> <TableHeader> <TableColumn>Make</TableColumn> <TableColumn>Model</TableColumn> <TableColumn>Status</TableColumn> </TableHeader> <TableBody> <TableRow key="1"> <TableCell>Toyota</TableCell> <TableCell>Camry</TableCell> <TableCell> <Chip color="success" variant="flat">Active</Chip> </TableCell> </TableRow> </TableBody> </Table> <Pagination total={10} initialPage={1} /> </div> ); }
Feature: Form with Validation
Recommended Components:
fromInput
- Form fields@heroui/input
fromButton
- Submit action@heroui/button
fromAlert
- Error messages@heroui/alert
Feature: Dashboard Cards
Recommended Components:
fromCard
- Container@heroui/card
fromChip
- Metrics, trends@heroui/chip
fromSpinner
- Loading state@heroui/spinner
Semantic Color System
All HeroUI components support semantic colors:
Text Colors:
- Primary text (auto-adjusts for light/dark mode)text-foreground
- Strong emphasistext-default-900
- Secondary texttext-default-600
- Metadata, captionstext-muted-foreground
Component Colors:
- Neutral, standard UIcolor="default"
- Main actions, CTAscolor="primary"
- Supporting actionscolor="secondary"
- Positive states, confirmationscolor="success"
- Caution, important noticescolor="warning"
- Errors, destructive actionscolor="danger"
Accessibility Guidelines
Ensure all HeroUI components include:
attributes for screen readersaria-label- Keyboard navigation support
- Focus indicators
- Semantic HTML structure
- Proper heading hierarchy
Migration from shadcn/ui
Common Mappings:
- shadcn
→Button@heroui/button - shadcn
→Card@heroui/card - shadcn
→Badge@heroui/chip - shadcn
→Table@heroui/table - shadcn
→Tabs@heroui/tabs - shadcn
→Tooltip@heroui/tooltip
Note: Do NOT modify files in
src/components/ui/ (shadcn/ui). Create new HeroUI components in appropriate directories.
Tools Used
- Context7 MCP: Fetch latest HeroUI documentation
- Find HeroUI library IDmcp__context7__resolve-library-id
- Get component documentationmcp__context7__get-library-docs
- Read: Examine existing component implementations
- Grep: Find similar patterns in codebase
Documentation Resources
When fetching HeroUI docs via Context7:
- Library ID:
or component-specific packages/heroui/react - Focus on: TypeScript types, props, variants, colors, accessibility
Project-Specific Guidelines
From
apps/web/CLAUDE.md:
- New Features: Use HeroUI components with TypeScript-first approach
- Component Selection: Leverage HeroUI's professional design system
- Data Visualisation: Use HeroUI's table and chart components for market data
- Customisation: Apply HeroUI theming to match Singapore car market branding
- Performance: Take advantage of tree-shakeable, optimized components
- Legacy Code: Gradually migrate shadcn/ui to HeroUI equivalents