
React Component Architecture Review & Refactoring
Audit and refactor React components for reusability, performance, and maintainability
What You Can Do
This skill analyzes your React component codebase to identify structural issues, redundancy, and performance bottlenecks. Claude evaluates your components against React best practices, generates a prioritized refactoring roadmap, and provides actionable code improvements for extracting reusable patterns, optimizing props drilling, fixing memory leaks, and improving type safety. You'll receive detailed refactoring recommendations with before/after code examples and implementation guidance.
Features
Audits props drilling, composition patterns, and separation of concerns
Identifies duplicated logic and opportunities for custom hooks and shared components
Detects unnecessary re-renders, missing memoization, and render bottlenecks
Reviews TypeScript usage and suggests prop type improvements across components
Scans for cleanup issues in effects and event listeners that could cause problems
Provides concrete refactoring implementations with explanations for each fix
Suggests unit test improvements for better component isolation and coverage
Creates a phased refactoring plan based on impact, effort, and dependencies
Example Output
Component Analysis Report
Issue #1: Props Drilling (High Priority)
Current Pattern:
- UserProfile passes 8 props through 3 nested components
- Impact: Harder to maintain and refactor, creates tight coupling
Recommended Fix: Create a UserContext to provide user data directly to deeply nested components, eliminating intermediate prop passing.
Issue #2: Missing Memoization (Medium Priority)
- ProductList re-renders on every parent update despite unchanged product data
- Solution: Wrap with React.memo() and optimize child callbacks with useCallback()
Quick Wins (Low Effort, High Impact)
- Extract 3 duplicated button components into a unified ButtonVariants component
- Add useCallback to 5 event handlers causing unnecessary child re-renders
- Convert 2 large useEffect blocks into a custom useFetchData hook
What's Included
- SKILL.md: Complete architecture review and refactoring framework
- React audit checklist: Component evaluation criteria and anti-patterns
- Refactoring templates: Before/after patterns for common React issues
- Type safety guide: TypeScript best practices for prop types and generics
- Performance optimization patterns: memoization strategies, lazy loading, and code splitting
- Custom hook extraction guide: Identify and extract reusable logic
Who It's For
- Frontend engineers optimizing component architecture in React applications
- Tech leads reviewing codebases for maintainability and technical debt
- React developers learning modern patterns and best practices
- Teams transitioning to scalable component structures
- Startup developers building reusable component libraries from scratch
Best For
- Auditing component structure in existing React applications
- Identifying technical debt and prioritizing refactoring work
- Improving component reusability and testability across projects
- Optimizing render performance and reducing bundle size
- Enforcing type safety and reducing runtime errors in React codebases
- Extracting custom hooks from duplicated logic
- Planning large-scale refactoring initiatives







