This skill provides structured, comprehensive code review for React applications. It evaluates code against React 19 best practices, component architecture patterns, hook usage, accessibility standards, and production-readiness criteria. The review produces actionable findings categorized by severity (Critical, Warning, Suggestion) with concrete code examples for improvements.
Confirm successful installation by checking the skill directory location:
.cursor/skills/react-code-review
Restart Cursor to activate react-code-review. Access via /react-code-review in your agent's command palette.
โ
Security Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
This skill provides structured, comprehensive code review for React applications. It evaluates code against React 19 best practices, component architecture patterns, hook usage, accessibility standards, and production-readiness criteria. The review produces actionable findings categorized by severity (Critical, Warning, Suggestion) with concrete code examples for improvements.
This skill delegates to the react-software-architect-review agent for deep architectural analysis when invoked through the agent system.
When to Use
Reviewing React components, hooks, and pages before merging
Validating component composition and reusability patterns
Validating TypeScript typing for props, state, and events
Checking Tailwind CSS and styling patterns
After implementing new React features or refactoring component architecture
Instructions
Identify Scope: Determine which React components and hooks are under review. Use glob to discover .tsx/.jsx files and grep to identify component definitions, hook usage, and context providers.
Analyze Component Architecture: Verify proper component composition โ check for single responsibility, appropriate size, and reusability. Look for components that are too large (>200 lines), have too many props (>7), or mix concerns.
Review Hook Usage: Validate proper hook usage โ check dependency arrays in useEffect/useMemo/useCallback, verify cleanup functions in useEffect, and identify unnecessary re-renders caused by missing or incorrect memoization.
Evaluate State Management: Assess where state lives โ check for proper colocation, unnecessary lifting, and appropriate use of Context vs external stores. Verify that server state uses TanStack Query, SWR, or similar libraries rather than manual useEffect + useState patterns.
Check Accessibility: Review semantic HTML usage, ARIA attributes, keyboard navigation, focus management, and screen reader compatibility. Verify that interactive elements are accessible and form inputs have proper labels.
Assess Performance: Look for unnecessary re-renders, missing React.memo on expensive components, improper use of useCallback/useMemo, missing code splitting, and large bundle imports.
Review TypeScript Integration: Check prop type definitions, event handler typing, generic component patterns, and proper use of utility types. Verify that any is not used where specific types are possible.
Produce Review Report: Generate a structured report with severity-classified findings (Critical, Warning, Suggestion), positive observations, and prioritized recommendations with code examples.
Examples
Example 1: Hook Dependency Issues
// โ Bad: Missing dependency causes stale closurefunctionUserProfile({ userId }:{ userId:string}){const[user, setUser]=useState<User |null>(null);useEffect(()=>{fetchUser(userId).then(setUser);},[]);// Missing userId in dependency arrayreturn<div>{user?.name}</div>;}// โ Good: Proper dependencies with cleanupfunctionUserProfile({ userId }:{ userId:string}){const[user, setUser]=useState<User |null>(null);useEffect(()=>{let cancelled =false;fetchUser(userId).then((data)=>{if(!cancelled)setUser(data);});return()=>{ cancelled =true;};},[userId]);return<div>{user?.name}</div>;}// โ Better: Use TanStack Query for server statefunctionUserProfile({ userId }:{ userId:string}){const{ data: user, isLoading }=useQuery({ queryKey:['user', userId],queryFn:()=>fetchUser(userId),});if(isLoading)return<Skeleton/>;return<div>{user?.name}</div>;}
Example 2: Component Composition
// โ Bad: Monolithic component mixing data fetching, filtering, and renderingfunctionDashboard(){const[users, setUsers]=useState([]);const[filter, setFilter]=useState('');useEffect(()=>{/* fetch + filter + sort all in one */},[filter]);return<div>{/* 200+ lines of mixed concerns */}</div>;}// โ Good: Composed from focused components with custom hooksfunctionDashboard(){return(<div><UserFilters/><Suspensefallback={<TableSkeleton/>}><UserTable/></Suspense><UserPagination/></div>);}
โบClaude Desktop or compatible AI client with skill support
โบClear understanding of task or problem to solve
โบWillingness to iterate and refine outputs
Time Estimate
15-45 minutes depending on use case complexity
Steps
1Install skill using provided installation command
2Test with simple use case relevant to your work
3Evaluate output quality and relevance
4Iterate on prompts to improve results
5Integrate into regular workflow if valuable
Common Pitfalls
โ Expecting perfect results without iteration
โ Not providing enough context in prompts
โ Using skill for tasks outside its intended scope
โ Accepting outputs without review and validation
Best Practices
โ Do
+Start with clear, specific prompts
+Provide relevant context and constraints
+Review and refine all outputs before using
+Iterate to improve output quality
+Document successful prompt patterns
โ Don't
โDon't use without understanding skill limitations
โDon't skip validation of outputs
โDon't share sensitive information in prompts
โDon't expect skill to replace human judgment
๐ก Pro Tips
โ Be specific about desired format and style
โ Ask for multiple options to choose from
โ Request explanations to understand reasoning
โ Combine AI efficiency with human expertise
When to Use This
โ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
โ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
Learning Path
1Familiarize yourself with skill capabilities and limitations
2Start with low-risk, non-critical tasks
3Progress to more complex and valuable use cases
4Build expertise through regular use and experimentation