aiskillstore/marketplace/react-component
Claude Code and agent skill by aiskillstore/marketplace
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Author "aiskillstore" has blocked skill(s)
Use when creating UI components in React - functional components, hooks, custom hooks, or component composition patterns. NOT when backend logic, API routes, or non-React frameworks are involved. Triggers: "create component", "build widget", "KPI card", "form", "modal", "custom hook", "useContext", "useState", "useEffect".
Install
npx vskill@latest install aiskillstore/marketplace/react-componentSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as aiskillstore/marketplace/react-component.
React Component Skill
Overview
Expert guidance for building React functional components, hooks, and composition patterns. Focuses on TypeScript, performance, accessibility, and modern React best practices.
When This Skill Applies
This skill triggers when users request:
- UI Components: "Create a student KPI card", "Build a modal", "Form component"
- Hooks: "Custom attendance hook", "useContext for theme", "useState for data"
- Patterns: "Component composition", "HOC", "render props"
- ERP Widgets: KPI cards, forms, data tables, dashboards
Core Rules
1. Functional Components Always
Requirements:
- Always use functional components (no class components)
- Type all props interfaces explicitly
- Use
React.memofor components receiving same props frequently - Use
React.forwardRefwhen ref forwarding is needed
2. Hooks Usage
Requirements:
useState: For local component state onlyuseEffect: For side-effects with proper cleanup functionsuseContext: For global state (theme, auth, language)- Always include all dependencies in dependency array
- Use
useCallback/useMemofor expensive operations in lists
3. Custom Hooks
Requirements:
- All custom hooks must start with
useprefix - Extract reusable logic into hooks
- Return typed interfaces for hook results
- Include loading, error states, and retry mechanisms
- Keep hooks focused on single responsibility
4. Component Composition
Requirements:
- Prefer composition over inheritance
- Use
childrenprop for flexible content - Use render props when component needs to share data
- Use HOCs sparingly and with proper TypeScript types
- Keep components small and focused (single responsibility)
Output Requirements
Code Files
- Component file (
ComponentName.tsx):
- Functional component with typed props
- Hooks applied correctly
- Exported as named export
- Default export when appropriate
- Test file (
ComponentName.test.tsx):
- Jest/Vitest + React Testing Library
- Test component renders with props
- Test user interactions
- Test loading/error states
- Accessibility tests
- Storybook file (
ComponentName.stories.tsx):
- Default story
- Variant stories (loading, error, different states)
- Props table for documentation
Integration Requirements
- shadcn/ui: Use existing shadcn components when available
- Accessibility: Follow WCAG 2.1 AA guidelines (use @ui-ux-designer for a11y audit)
- Styling: Tailwind CSS with design system tokens
- i18n: Prepare components for internationalization (no hardcoded text)
Documentation
- PHR: Create Prompt History Record for each component development
- ADR: Document hook pattern decisions for complex custom hooks
- Comments: Add comments only for non-obvious logic
Workflow
- Understand Requirements
- Clarify component purpose, props, and interactions
- Identify state needs (local vs global)
- Determine reusability potential
- Design Props Interface
- Define TypeScript interface for all props
- Mark optional props with
? - Use discriminated unions for variant types
- Implement Component
- Write functional component
- Apply hooks with proper dependencies
- Handle loading/error states
- Ensure accessibility (ARIA attributes)
- Test Component
- Write unit tests for all code paths
- Test user interactions
- Verify accessibility
- Create Stories
- Document component with Storybook
- Show all variants and states
- Add controls for interactive exploration
Quality Checklist
Before completing any component:
- [ ] React 19+ Hooks Rules: No dependency issues, proper cleanup in useEffect
- [ ] TypeScript Props: Exhaustive type definitions, no
anytypes - [ ] Custom Hooks: All prefixed with 'use', single responsibility
- [ ] Composition: Used over inheritance, flexible via children/render props
- [ ] Performance:
useCallback/useMemofor expensive operations in lists - [ ] Accessibility: Proper ARIA labels, keyboard navigation support
- [ ] Error Handling: Graceful error states, no console errors
- [ ] Loading States: Clear loading indicators for async operations
- [ ] Tests: Unit tests cover all branches and interactions
- [ ] Stories: Storybook stories document component usage
Common Patterns
Data Fetching Component
Form Component with Validation
References
- React Documentation: https://react.dev
- TypeScript React Cheatsheet: https://react-typescript-cheatsheet.netlify.app
- React Testing Library: https://testing-library.com/docs/react-testing-library/intro
- shadcn/ui: https://ui.shadcn.com
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/awais68/react-component/SKILL.md
Popularity
- Repository stars
- 429
- Repository forks
- 45
- 7-day trend score
- 30
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 27 Oct 2026, a month ago.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/aiskillstore/marketplace/react-component)