react-code-review
Skill0 starsChanged 3 months agoApache-2.0View on GitHub
Perform comprehensive code reviews for React single-page applications (SPAs) built with modern tech stacks. Use this skill when the user asks to review React/TypeScript code, requests feedback on component design, needs help identifying React anti-patterns or performance issues, wants to improve code quality and maintainability, or submits code for review from projects using React, Vite, Vitest, Testing Library, Tanstack Query, MUI, axios, i18next, Storybook, or React Router. Also use when the user mentions "code review", "review my code", "check my React component", "feedback on my implementation", or similar phrases related to code quality assessment.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- Tenraining/Claude-Skillstheir own version, first seen Oct 25, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- Tenraining/Claude-Skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository4 other files it gives its agents.
- adr-writerSkill
- csharp-codegenSkill
- spring-boot-api-reviewerSkill
- translateSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
28 rules. About 0 are common, 27 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈27
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
Context-aware: Consider team practices and project constraints
- Distinctive: line 20
Understand context: Ask about requirements, constraints, or specific concerns if unclear
- Distinctive: line 21
Identify patterns: Look for repeated issues across the codebase
- Very specific: line 22
Prioritize feedback: Start with critical issues, then high/medium/low priority
- Distinctive: line 54
Check proper usage of project libraries.
- Distinctive: line 66
Important: Only read reference files for libraries that are actually used in the code being reviewed.
- Distinctive: line 76
No memory leaks (cleanup in useEffect)
- Distinctive: line 105
No sensitive data in client code
- Distinctive: line 113
Ask clarifying questions if context is unclear:
- Distinctive: line 233
Always provide code examples for fixes, especially for complex issues
- Distinctive: line 242
Don't overwhelm with minor issues.
- Distinctive: line 248
Use "we" language when appropriate
- Distinctive: line 272
Check component structure and responsibility
- Distinctive: line 274
Check state management approach
- Distinctive: line 275
Verify error and loading states
- Distinctive: line 276
Check for performance issues
- Distinctive: line 284
Check data flow and state management
- Distinctive: line 285
Verify error handling across the feature
- Distinctive: line 287
Check for patterns to improve
- Distinctive: line 293
Check if refactoring improves maintainability
- Distinctive: line 294
Ensure no performance regressions
- Distinctive: line 295
Verify tests still pass/updated
- Distinctive: line 296
Look for further improvement opportunities
- Distinctive: line 301
Verify bug is actually fixed
- Distinctive: line 302
Check if root cause addressed (not just symptom)
- Distinctive: line 303
Look for similar issues elsewhere
- Distinctive: line 304
Verify tests added to prevent regression
- Distinctive: line 305
Check for edge cases
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
React Code Review
Conduct thorough, constructive code reviews for React SPA applications with focus on correctness, performance, maintainability, and team collaboration.
Review Approach
Review Philosophy
- Constructive: Focus on helping improve code quality, not criticizing
- Educational: Explain the "why" behind suggestions
- Prioritized: Distinguish between critical issues and nice-to-haves
- Actionable: Provide specific, implementable suggestions with examples
- Context-aware: Consider team practices and project constraints
Review Structure
- Understand context: Ask about requirements, constraints, or specific concerns if unclear
- Identify patterns: Look for repeated issues across the codebase
- Prioritize feedback: Start with critical issues, then high/medium/low priority
- Provide examples: Show better implementations with code snippets
- Reinforce good practices: Acknowledge what's done well
Core Review Areas
1. Functionality & Correctness
- Does the code work as intended?
- Are edge cases handled properly?
- Is error handling comprehensive?
- Are loading and error states shown to users?
2. React Best Practices
Review against established React patterns:
- Hook usage (dependencies, cleanup, conditional calling)
- Component design (single responsibility, composition)
- State management (local vs global, derived state)
- Performance (memoization, re-renders)
Reference: See references/react-best-practices.md for comprehensive React patterns
3. Anti-Patterns & Pitfalls
Identify common React mistakes:
- Memory leaks (unmounted updates, uncleaned effects)
- Stale closures in effects
- Infinite effect loops
- Unnecessary re-renders
- State management issues
Reference: See references/anti-patterns.md for detailed anti-pattern catalog
4. Technology Stack Usage
Check proper usage of project libraries. Only load references for libraries actually used in the project:
- Vite: Configuration, build optimization, HMR → See
references/vite.md - Vitest: Testing setup, mocking patterns → See
references/vitest.md - Testing Library: Query methods, user interactions → See
references/testing-library.md - Tanstack Query: Query keys, cache management, mutations → See
references/tanstack-query.md - MUI: Theme usage, styling patterns, accessibility → See
references/mui.md - axios: Error handling, interceptors, cancellation → See
references/axios.md - i18next: Translation keys, interpolation, namespacing → See
references/i18next.md - React Router: Navigation, data loading, URL state → See
references/react-router.md - Storybook: Story format, play functions, decorators → See
references/storybook.md
Important: Only read reference files for libraries that are actually used in the code being reviewed. This avoids loading unnecessary context.
5. Type Safety
- TypeScript types are explicit and correct
- No
anywithout justification - Props and return values properly typed
- External data validated with type guards
- Event handlers use proper React types
6. Performance
- No memory leaks (cleanup in useEffect)
- Expensive calculations use useMemo appropriately
- Callbacks memoized when needed for memoized children
- Large lists consider virtualization
- Code splitting for routes and heavy components
7. Testing Quality
- Tests cover critical user paths
- Tests use Testing Library best practices (accessibility queries)
- Async updates properly handled
- Tests are maintainable (not testing implementation details)
- Mock data is realistic
8. Accessibility
- Semantic HTML elements used
- Proper ARIA labels where needed
- Keyboard navigation functional
- Form labels and error messages clear
- Color contrast and text alternatives provided
9. Code Organization & Maintainability
- Single responsibility per component
- Descriptive naming conventions
- Code is self-documenting
- Related code colocated
- DRY principle followed appropriately
- No circular dependencies
10. Security
- No sensitive data in client code
- User input validated
- No XSS vulnerabilities
- API authentication proper
Review Workflow
Step 1: Initial Assessment
- Ask clarifying questions if context is unclear:
- What is this component/feature supposed to do?
- Are there specific concerns or areas to focus on?
- Are there team conventions I should be aware of?
- Review the overall structure and approach
- Identify major patterns or issues
Step 2: Deep Dive Review
- Load relevant reference documents:
react-best-practices.mdfor React patternsanti-patterns.mdfor common mistakes- Library-specific files (only for libraries used in the code):
vite.mdfor Vite-specific issuesvitest.mdfor testing configurationtesting-library.mdfor test patternstanstack-query.mdfor React Query usagemui.mdfor Material-UI patternsaxios.mdfor HTTP client usagei18next.mdfor internationalizationreact-router.mdfor routing patternsstorybook.mdfor component stories
review-checklist.mdfor comprehensive checklist
- Systematically review each area
- Note issues by severity level
Step 3: Provide Structured Feedback
Organize feedback by priority:
CRITICAL (Must fix immediately):
- Security vulnerabilities
- Bugs or broken functionality
- Memory leaks
- Type safety holes that could cause runtime errors
HIGH (Should fix before merge):
- React anti-patterns
- Performance issues
- Missing error handling
- Accessibility violations
- Test coverage gaps
MEDIUM (Nice to have):
- Code quality improvements
- Optimization opportunities
- Better naming or structure
- Additional test cases
LOW (Consider for future):
- Refactoring opportunities
- Documentation improvements
- Stylistic preferences
POSITIVE (Reinforcement):
- Good practices to acknowledge
- Well-designed solutions
- Effective patterns
Step 4: Provide Examples
For each significant issue:
- Show the problematic code
- Explain why it's an issue
- Provide corrected example
- Reference documentation when helpful
Example format:
**ISSUE**: Memory leak - state update after unmount
**CODE**:
```typescript
useEffect(() => {
fetchData().then(data => setState(data));
}, []);PROBLEM: If component unmounts before fetch completes, setState will be called on unmounted component.
FIX:
useEffect(() => {
let mounted = true;
fetchData().then(data => {
if (mounted) setState(data);
});
return () => { mounted = false; };
}, []);WHY: This prevents React warning and potential memory leaks. Better yet, use Tanstack Query which handles this automatically.
## Output Format
Structure reviews as:
1. **Summary**: Brief overview of code quality (2-3 sentences)
2. **Critical Issues** (if any): Must-fix items with examples
3. **High Priority Issues** (if any): Should-fix items with examples
4. **Medium Priority Suggestions** (if applicable): Nice-to-have improvements
5. **Low Priority Considerations** (if applicable): Future improvements
6. **Positive Observations**: What's done well (always include)
7. **Overall Recommendations**: Next steps or focus areas
## Tips for Effective Reviews
### Be Specific
❌ "This component has performance issues"
✅ "This component recreates the `style` object on every render. Move it outside the component or use `useMemo`"
### Explain Why
❌ "Use useCallback here"
✅ "Use useCallback here because this handler is passed to a memoized child component. Without it, the child will re-render unnecessarily"
### Show, Don't Just Tell
Always provide code examples for fixes, especially for complex issues
### Consider Context
- Team size and experience level
- Project timeline and constraints
- Existing codebase patterns
- Performance requirements
### Balance Thoroughness with Practicality
Don't overwhelm with minor issues. Focus on what matters most for code quality and team learning.
### Maintain Professional Tone
- Be respectful and collaborative
- Frame as suggestions, not commands
- Acknowledge good work
- Use "we" language when appropriate
## Quick Reference
For specific issues, consult:
- **React patterns**: `references/react-best-practices.md`
- **Common mistakes**: `references/anti-patterns.md`
- **Complete checklist**: `references/review-checklist.md`
Library-specific references (load only as needed):
- **Vite**: `references/vite.md`
- **Vitest**: `references/vitest.md`
- **Testing Library**: `references/testing-library.md`
- **Tanstack Query**: `references/tanstack-query.md`
- **MUI**: `references/mui.md`
- **axios**: `references/axios.md`
- **i18next**: `references/i18next.md`
- **React Router**: `references/react-router.md`
- **Storybook**: `references/storybook.md`
## Example Review Scenarios
### Scenario 1: Component Review
User submits a React component for review.
1. Check component structure and responsibility
2. Review hooks (dependencies, cleanup, order)
3. Check state management approach
4. Verify error and loading states
5. Check for performance issues
6. Review prop types and naming
7. Provide prioritized feedback
### Scenario 2: Feature Implementation Review
User submits multiple files for a feature.
1. Understand feature requirements
2. Review overall architecture
3. Check data flow and state management
4. Verify error handling across the feature
5. Review tests for feature coverage
6. Check for patterns to improve
7. Provide architectural and detailed feedback
### Scenario 3: Refactoring Review
User refactored existing code.
1. Verify functionality preserved
2. Check if refactoring improves maintainability
3. Ensure no performance regressions
4. Verify tests still pass/updated
5. Look for further improvement opportunities
6. Acknowledge successful improvements
### Scenario 4: Bug Fix Review
User fixed a bug.
1. Verify bug is actually fixed
2. Check if root cause addressed (not just symptom)
3. Look for similar issues elsewhere
4. Verify tests added to prevent regression
5. Check for edge cases
6. Suggest preventive patterns
## Remember
- **Be helpful, not harsh**: Code reviews are learning opportunities
- **Prioritize impact**: Critical issues first, style last
- **Provide context**: Explain why something matters
- **Show examples**: Make suggestions actionable
- **Acknowledge quality**: Positive reinforcement matters
- **Stay consistent**: Apply same standards across reviews
- **Consider the team**: Reviews should improve collective code qualityDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

