Agent skill
ui-components
Enforces project UI component conventions when creating or modifying React components, forms, dialogs, and other UI elements. This skill ensures consistent patterns for Radix UI integration, form handling with TanStack Form, test IDs, accessibility, and component composition.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/ui-components
SKILL.md
UI Components Skill
Purpose
This skill enforces the project UI component conventions automatically during UI development. It ensures consistent patterns for Radix UI integration, form handling with TanStack Form, test ID generation, accessibility, and component composition.
Activation
This skill activates when:
- Creating new components in
src/components/ - Working with Radix UI primitives
- Implementing forms with TanStack Form
- Building dialogs, dropdowns, or other interactive UI
- Working with UI component variants using CVA
Workflow
- Detect UI component work (file path contains
components/or imports from Radix/form libraries) - Load
references/UI-Components-Conventions.md - Also apply
react-coding-conventionsskill - Generate/modify code following all conventions
- Scan for violations of UI patterns
- Auto-fix all violations (no permission needed)
- Report fixes applied
Key Patterns
- Use arrow function components with named exports (
export const Button = () => {}) - Use
ComponentProps<'element'>withComponentTestIdPropsfor type definitions - Include
data-slotattribute on every component element - Include
data-testidusinggenerateTestId()from@/lib/test-ids - Use
isprefix for boolean props (isLoading,isDisabled,isCondition) - Use Radix UI primitives for accessible components
- Use TanStack Form hooks (
useFieldContext,useFormContext) for form handling - Use CVA for component variants
- Use
$pathfrom next-typesafe-url for links - Use
cnfrom@/utils/tailwind-utilsfor class merging - Use
Conditionalcomponent withisConditionprop for conditional rendering
References
references/UI-Components-Conventions.md- Complete UI component conventions
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
riot-games
Manage Riot Games account, track stats across League, Valorant, and more
parcel
Provides comprehensive guidance for Parcel bundler including zero-configuration setup, asset handling, hot module replacement, and production builds. Use when the user asks about Parcel, needs to set up a build tool quickly, or work with Parcel's automatic configuration.
bbs
Manage issues with The Fold's CAS-native BBS (Bulletin Board System). Use for creating, updating, searching, and tracking issues. Invoke when the user wants to create tickets, find work, check issue status, or manage dependencies.
jito-bundles-and-priority-fees
Master Jito bundles for MEV protection and priority fee optimization on Solana - bundle submission, tip strategies, and transaction landing. Use for trading bots, high-priority transactions, and MEV-aware applications.
observability-monitoring-monitor-setup
You are a monitoring and observability expert specializing in implementing comprehensive monitoring solutions. Set up metrics collection, distributed tracing, log aggregation, and create insightful da
makefile-review
Didn't find tool you were looking for?