Review React code for component design, hooks correctness, state management, rendering performance, and accessibility. Framework-only atomic skill; output is a findings list.
Review React code for framework conventions only. Do not define scope (diff vs codebase) or perform security/architecture analysis; those are handled by the scope and cognitive skills. Emit a findings list in the standard format for aggregation. Focus on function component design, hooks correctness, state management (local and external), rendering performance, side effects and data fetching, routing and code splitting, and accessibility.
Core Objective
Primary goal: produce a React framework findings list covering component design, hooks correctness, state management, rendering performance, side effects, routing/code splitting, and accessibility for the given code scope.
Success criteria (all must hold):
✅ React framework scope only: reviews React framework conventions only; performs no scope selection, security, or architecture analysis
✅ All seven React dimensions covered: component design, hooks correctness, state management, rendering performance, side effects/data fetching, routing/code splitting, and accessibility are assessed where relevant
✅ Findings format compliant: each finding carries location, category (framework-react), severity, title, description, and an optional suggestion
✅ Component/file references: every finding cites a specific file:line or component name
✅ Non-React code excluded: non-React files are not analyzed against React-specific rules unless they are explicitly in scope
Acceptance test: does the output contain a React-centered findings list with component/file references covering all relevant framework dimensions, without performing security, architecture, or scope analysis?
Scope Boundaries
This skill owns:
Function component design (single responsibility, composition patterns, prop types/defaults, children patterns)
Hooks correctness (dependency arrays, stale closures, custom hook extraction, the rules of hooks, cleanup in useEffect)
State management (local vs global state, Context usage, reducer patterns, external stores such as Zustand/Redux, server state via TanStack Query/SWR)
Rendering performance (memo/useMemo/useCallback usage, key stability in lists, avoiding unnecessary re-renders, virtualization for large lists)
Side effects and data fetching (useEffect patterns, race conditions, abort controllers, loading/error states, data fetching libraries)
Scope selection — the scope is supplied by the caller
Security analysis (XSS, injection risk) — use review-security
Architecture analysis — use review-architecture
Language/runtime (JavaScript/TypeScript) conventions - use review-typescript or general JS/TS analysis
Full orchestrated review — use orchestrate-code-review
Handoff point: once all React findings are emitted, hand them to orchestrate-code-review for aggregation. For XSS risk (dangerouslySetInnerHTML misuse, unsanitized content), note it and point at review-security.
Use Cases
Orchestrated review: serves as the framework step when orchestrate-code-review runs scope → language → framework → library → cognitive on a React project.
React-only review: when the user wants nothing but React/frontend framework conventions checked.
Pre-PR React checklist: confirm hook usage, component design, and state management patterns are correct.
When to use: when the code under review is React and the task includes framework quality. Scope is set by the caller or the user.
Behavior
What this skill covers
Analyse: React framework conventions inside the given code scope (files or a diff supplied by the caller). Does not decide scope; takes the code scope as input.
Do not: perform scope selection, security review, or architecture review; do not check React rules against non-React files unless they are in scope (a mixed repository, for example).
Review checklist (React framework only)
Component design: prefer function components; one responsibility per component; composition over deep nesting; explicit prop types with sensible defaults (TypeScript interfaces or PropTypes); appropriate use of children and render props.
Hooks correctness: correct dependency arrays in useEffect/useMemo/useCallback; avoid stale closures; extract reusable logic into custom hooks; follow the rules of hooks (top level only, React functions only); cleanup functions in useEffect for subscriptions and timers.
State management: choose local state (useState) vs global state appropriately; use Context for cross-cutting concerns without overusing it; prefer useReducer for complex state transitions; integrate external stores correctly (Zustand, Redux Toolkit); keep server state (TanStack Query, SWR) separate from client state.
Rendering performance: apply React.memo, useMemo, useCallback where the benefit is demonstrable; stable keys in lists (no index as key for dynamic lists); avoid creating objects/functions inline in JSX when that causes re-renders; virtualize large lists (react-window, react-virtuoso).
Side effects and data fetching: correct useEffect patterns (single-purpose effects, proper cleanup); handle race conditions with abort controllers or flags; represent loading/error/success states explicitly; prefer a data fetching library (TanStack Query, SWR) over a bare useEffect + fetch.
Routing and code splitting: route-based code splitting with React.lazy and Suspense; error boundaries defined around lazily loaded routes; route definitions kept declarative; avoid eagerly loading whole modules where lazy loading fits.
Accessibility: use semantic HTML elements; apply ARIA attributes correctly (roles, labels, live regions); ensure keyboard navigation and focus management; support screen readers; test interactive components for accessibility compliance.
Tone and references
Professional and technical: cite the exact location (file:line or component name). Emit findings carrying location, category, severity, title, description, and suggestion.
Input & Output
Input
Code scope: files or directories (or a diff) containing React code (.tsx, .jsx, .ts, .js that use React APIs). Supplied by the user or by a scope skill.
Output
Emit zero or more findings in the format defined in specs/findings-list.md, with Categoryframework-react.
The category for this skill is framework-react.
Restrictions
Hard Boundaries
Do not perform scope selection, security, or architecture review. Stay inside React framework conventions.
Do not state a finding without a concrete location or an actionable suggestion.
Do not review non-React code against React-specific rules unless it is explicitly in scope.
Skill Boundaries
Do not do these (other skills handle them):
Do not select or define the code scope - it is set by the caller or by orchestrate-code-review
Do not perform security analysis (XSS, injection) — use review-security
Do not perform architecture analysis — use review-architecture
When to stop and hand off:
Once all React findings are emitted, hand them to orchestrate-code-review for aggregation
When XSS risk turns up (unsafe dangerouslySetInnerHTML usage, for example), note it and point at review-security
When the user wants a full review (scope + language + cognitive), redirect to orchestrate-code-review
Self-Check
Core success criteria
React framework scope only: reviews React framework conventions only; performs no scope selection, security, or architecture analysis
All seven React dimensions covered: component design, hooks correctness, state management, rendering performance, side effects/data fetching, routing/code splitting, and accessibility are assessed where relevant
Findings format compliant: each finding carries location, category (framework-react), severity, title, description, and an optional suggestion
Component/file references: every finding cites a specific file:line or component name
Non-React code excluded: non-React files are not analyzed against React-specific rules unless they are explicitly in scope
Process quality checks
Were only React framework dimensions reviewed (no scope/security/architecture)?
Were component design, hooks, state, performance, side effects, routing, and accessibility covered where relevant?
Does every finding carry location, category = framework-react, severity, title, description, and an optional suggestion?
Is each issue tied to a file:line or a component?
Acceptance test
Does the output contain a React-centered findings list with component/file references covering all relevant framework dimensions, without performing security, architecture, or scope analysis?
Examples
Example 1: missing cleanup in useEffect
Input: a component that opens a WebSocket connection in useEffect with no cleanup.
Expected: a finding for the missing cleanup (major); the suggestion is to return a cleanup function that closes the connection. Category = framework-react.
Example 2: index as key in a dynamic list
Input: a component rendering a sortable/filterable list with the array index as the key.
Expected: a finding for key instability and the state bugs it can cause; the suggestion is to use a stable unique identifier as the key. Category = framework-react.
Edge case: class components in a modern codebase
Input: legacy class components in a codebase that otherwise uses function components and hooks.
Expected: raise the suggestion of migrating to function components with hooks where that is practical; check the class components for lifecycle correctness (componentDidMount, componentWillUnmount cleanup). Note that for stable, well-tested components migration is recommended but not always required.
1---2name: review-react3description: Review React code for component design, hooks correctness, state management, rendering performance, and accessibility. Framework-only atomic skill; output is a findings list.4license: MIT5---67# Skill: Review React89## Purpose1011Review **React** code for **framework conventions** only. Do not define scope (diff vs codebase) or perform security/architecture analysis; those are handled by the scope and cognitive skills. Emit a **findings list** in the standard format for aggregation. Focus on function component design, hooks correctness, state management (local and external), rendering performance, side effects and data fetching, routing and code splitting, and accessibility.1213---1415## Core Objective1617**Primary goal**: produce a React framework findings list covering component design, hooks correctness, state management, rendering performance, side effects, routing/code splitting, and accessibility for the given code scope.1819**Success criteria** (all must hold):20211. ✅ **React framework scope only**: reviews React framework conventions only; performs no scope selection, security, or architecture analysis222. ✅ **All seven React dimensions covered**: component design, hooks correctness, state management, rendering performance, side effects/data fetching, routing/code splitting, and accessibility are assessed where relevant233. ✅ **Findings format compliant**: each finding carries location, category (`framework-react`), severity, title, description, and an optional suggestion244. ✅ **Component/file references**: every finding cites a specific file:line or component name255. ✅ **Non-React code excluded**: non-React files are not analyzed against React-specific rules unless they are explicitly in scope2627**Acceptance test**: does the output contain a React-centered findings list with component/file references covering all relevant framework dimensions, without performing security, architecture, or scope analysis?2829---3031## Scope Boundaries3233**This skill owns**:3435- Function component design (single responsibility, composition patterns, prop types/defaults, children patterns)36- Hooks correctness (dependency arrays, stale closures, custom hook extraction, the rules of hooks, cleanup in useEffect)37- State management (local vs global state, Context usage, reducer patterns, external stores such as Zustand/Redux, server state via TanStack Query/SWR)38- Rendering performance (memo/useMemo/useCallback usage, key stability in lists, avoiding unnecessary re-renders, virtualization for large lists)39- Side effects and data fetching (useEffect patterns, race conditions, abort controllers, loading/error states, data fetching libraries)40- Routing and code splitting (React.lazy, Suspense boundaries, route-based splitting, error boundaries)41- Accessibility (ARIA attributes, semantic HTML, keyboard navigation, focus management, screen reader support)4243**This skill does not own**:4445- Scope selection — the scope is supplied by the caller46- Security analysis (XSS, injection risk) — use `review-security`47- Architecture analysis — use `review-architecture`48- Language/runtime (JavaScript/TypeScript) conventions - use `review-typescript` or general JS/TS analysis49- Full orchestrated review — use `orchestrate-code-review`5051**Handoff point**: once all React findings are emitted, hand them to `orchestrate-code-review` for aggregation. For XSS risk (dangerouslySetInnerHTML misuse, unsanitized content), note it and point at `review-security`.5253---5455## Use Cases5657- **Orchestrated review**: serves as the framework step when [orchestrate-code-review](../orchestrate-code-review/SKILL.md) runs scope → language → framework → library → cognitive on a React project.58- **React-only review**: when the user wants nothing but React/frontend framework conventions checked.59- **Pre-PR React checklist**: confirm hook usage, component design, and state management patterns are correct.6061**When to use**: when the code under review is React and the task includes framework quality. Scope is set by the caller or the user.6263---6465## Behavior6667### What this skill covers6869- **Analyse**: React framework conventions inside the **given code scope** (files or a diff supplied by the caller). Does not decide scope; takes the code scope as input.70- **Do not**: perform scope selection, security review, or architecture review; do not check React rules against non-React files unless they are in scope (a mixed repository, for example).7172### Review checklist (React framework only)73741. **Component design**: prefer function components; one responsibility per component; composition over deep nesting; explicit prop types with sensible defaults (TypeScript interfaces or PropTypes); appropriate use of children and render props.752. **Hooks correctness**: correct dependency arrays in useEffect/useMemo/useCallback; avoid stale closures; extract reusable logic into custom hooks; follow the rules of hooks (top level only, React functions only); cleanup functions in useEffect for subscriptions and timers.763. **State management**: choose local state (useState) vs global state appropriately; use Context for cross-cutting concerns without overusing it; prefer useReducer for complex state transitions; integrate external stores correctly (Zustand, Redux Toolkit); keep server state (TanStack Query, SWR) separate from client state.774. **Rendering performance**: apply React.memo, useMemo, useCallback where the benefit is demonstrable; stable keys in lists (no index as key for dynamic lists); avoid creating objects/functions inline in JSX when that causes re-renders; virtualize large lists (react-window, react-virtuoso).785. **Side effects and data fetching**: correct useEffect patterns (single-purpose effects, proper cleanup); handle race conditions with abort controllers or flags; represent loading/error/success states explicitly; prefer a data fetching library (TanStack Query, SWR) over a bare useEffect + fetch.796. **Routing and code splitting**: route-based code splitting with React.lazy and Suspense; error boundaries defined around lazily loaded routes; route definitions kept declarative; avoid eagerly loading whole modules where lazy loading fits.807. **Accessibility**: use semantic HTML elements; apply ARIA attributes correctly (roles, labels, live regions); ensure keyboard navigation and focus management; support screen readers; test interactive components for accessibility compliance.8182### Tone and references8384- **Professional and technical**: cite the exact location (file:line or component name). Emit findings carrying location, category, severity, title, description, and suggestion.8586---8788## Input & Output8990### Input9192- **Code scope**: files or directories (or a diff) containing React code (.tsx, .jsx, .ts, .js that use React APIs). Supplied by the user or by a scope skill.9394### Output9596- Emit zero or more **findings** in the format defined in [specs/findings-list.md](../../specs/findings-list.md), with **Category** `framework-react`.97- The category for this skill is **framework-react**.9899---100101## Restrictions102103### Hard Boundaries104105- **Do not** perform scope selection, security, or architecture review. Stay inside React framework conventions.106- **Do not** state a finding without a concrete location or an actionable suggestion.107- **Do not** review non-React code against React-specific rules unless it is explicitly in scope.108109### Skill Boundaries110111**Do not do these** (other skills handle them):112113- Do not select or define the code scope - it is set by the caller or by `orchestrate-code-review`114- Do not perform security analysis (XSS, injection) — use `review-security`115- Do not perform architecture analysis — use `review-architecture`116117**When to stop and hand off**:118119- Once all React findings are emitted, hand them to `orchestrate-code-review` for aggregation120- When XSS risk turns up (unsafe `dangerouslySetInnerHTML` usage, for example), note it and point at `review-security`121- When the user wants a full review (scope + language + cognitive), redirect to `orchestrate-code-review`122123---124125## Self-Check126127### Core success criteria128129- [ ] **React framework scope only**: reviews React framework conventions only; performs no scope selection, security, or architecture analysis130- [ ] **All seven React dimensions covered**: component design, hooks correctness, state management, rendering performance, side effects/data fetching, routing/code splitting, and accessibility are assessed where relevant131- [ ] **Findings format compliant**: each finding carries location, category (`framework-react`), severity, title, description, and an optional suggestion132- [ ] **Component/file references**: every finding cites a specific file:line or component name133- [ ] **Non-React code excluded**: non-React files are not analyzed against React-specific rules unless they are explicitly in scope134135### Process quality checks136137- [ ] Were only React framework dimensions reviewed (no scope/security/architecture)?138- [ ] Were component design, hooks, state, performance, side effects, routing, and accessibility covered where relevant?139- [ ] Does every finding carry location, category = framework-react, severity, title, description, and an optional suggestion?140- [ ] Is each issue tied to a file:line or a component?141142### Acceptance test143144Does the output contain a React-centered findings list with component/file references covering all relevant framework dimensions, without performing security, architecture, or scope analysis?145146---147148## Examples149150### Example 1: missing cleanup in useEffect151152- **Input**: a component that opens a WebSocket connection in useEffect with no cleanup.153- **Expected**: a finding for the missing cleanup (major); the suggestion is to return a cleanup function that closes the connection. Category = framework-react.154155### Example 2: index as key in a dynamic list156157- **Input**: a component rendering a sortable/filterable list with the array index as the key.158- **Expected**: a finding for key instability and the state bugs it can cause; the suggestion is to use a stable unique identifier as the key. Category = framework-react.159160### Edge case: class components in a modern codebase161162- **Input**: legacy class components in a codebase that otherwise uses function components and hooks.163- **Expected**: raise the suggestion of migrating to function components with hooks where that is practical; check the class components for lifecycle correctness (componentDidMount, componentWillUnmount cleanup). Note that for stable, well-tested components migration is recommended but not always required.
Run npx skillmds@latest add nesnilnehc/review-react in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Review React code for component design, hooks correctness, state management, rendering performance, and accessibility. Framework-only atomic skill; output is a findings list. It is listed under Web & Frontend on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free. This skill is licensed under MIT.
nesnilnehc (@nesnilnehc) published this skill. Their other Agent Skills are listed on their SkillMD profile.