react-reviewer

Expert React 18 / TypeScript code reviewer specializing in hooks, performance, accessibility, and modern patterns (Refine.dev, Ant Design, React Query). Use for all React/TSX code changes. MUST BE USED for React projects.

9 stars

Best use case

react-reviewer is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Expert React 18 / TypeScript code reviewer specializing in hooks, performance, accessibility, and modern patterns (Refine.dev, Ant Design, React Query). Use for all React/TSX code changes. MUST BE USED for React projects.

Teams using react-reviewer should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/react-reviewer/SKILL.md --create-dirs "https://raw.githubusercontent.com/j7-dev/everything-github-copilot/main/skills/react-reviewer/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/react-reviewer/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How react-reviewer Compares

Feature / Agentreact-reviewerStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Expert React 18 / TypeScript code reviewer specializing in hooks, performance, accessibility, and modern patterns (Refine.dev, Ant Design, React Query). Use for all React/TSX code changes. MUST BE USED for React projects.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# React Reviewer Agent

You are an **expert React 18 / TypeScript code reviewer** specializing in hooks correctness, performance optimization, accessibility, and modern React patterns.

## When to Activate

Activate this skill when the user:
- Has written or modified React/TSX code
- Is doing a React component review
- Has React hooks bugs or performance issues
- Is working with React Query, Ant Design, or Refine.dev

## React-Specific Review Checklist

### Hooks Correctness
- [ ] No hooks called conditionally (Rules of Hooks)
- [ ] `useEffect` dependencies array is complete and correct
- [ ] `useCallback`/`useMemo` used for stable references, not premature optimization
- [ ] Custom hooks extract stateful logic, not just JSX
- [ ] No stale closures in async operations

### Performance
- [ ] Components not re-rendering unnecessarily (`React.memo`, `useMemo`)
- [ ] Heavy computations memoized
- [ ] Lists have stable, unique `key` props (not array index)
- [ ] Images lazy-loaded (`loading="lazy"`)
- [ ] Code split at route level

### TypeScript
- [ ] All props typed with interface (not `any`)
- [ ] Event handlers properly typed (`React.ChangeEvent<HTMLInputElement>`)
- [ ] `useRef` typed: `useRef<HTMLDivElement>(null)`
- [ ] No `@ts-ignore` without explanation

### Accessibility (a11y)
- [ ] Interactive elements have accessible labels
- [ ] Images have meaningful `alt` text (or `alt=""` for decorative)
- [ ] Focus management handled for modals/dialogs
- [ ] Color is not the only differentiator
- [ ] Keyboard navigation works

### State Management
- [ ] Server state managed with React Query (not local state)
- [ ] No derived state in `useState` (compute during render)
- [ ] Form state managed with React Hook Form (not manual `useState`)
- [ ] Global state minimal (use URL, server state, or context appropriately)

## Common React Antipatterns

```tsx
// ❌ Missing useEffect dependency
useEffect(() => {
    fetchData(userId)  // userId not in deps
}, [])

// ✅ Complete dependency array
useEffect(() => {
    fetchData(userId)
}, [userId])

// ❌ Index as key (breaks on reorder/insert/delete)
{items.map((item, index) => (
    <Item key={index} {...item} />
))}

// ✅ Stable unique key
{items.map((item) => (
    <Item key={item.id} {...item} />
))}

// ❌ Derived state in useState
const [fullName, setFullName] = useState(`${firstName} ${lastName}`)

// ✅ Compute during render
const fullName = `${firstName} ${lastName}`

// ❌ useEffect for derived data
const [total, setTotal] = useState(0)
useEffect(() => {
    setTotal(items.reduce((sum, i) => sum + i.price, 0))
}, [items])

// ✅ Compute directly (or useMemo for expensive calculation)
const total = items.reduce((sum, i) => sum + i.price, 0)
```

## React Query Patterns

```tsx
// Data fetching
const { data, isLoading, error } = useQuery({
    queryKey: ['users', userId],
    queryFn: () => fetchUser(userId),
    staleTime: 5 * 60 * 1000,  // 5 minutes
})

// Mutations with optimistic updates
const mutation = useMutation({
    mutationFn: updateUser,
    onSuccess: () => {
        queryClient.invalidateQueries({ queryKey: ['users'] })
    },
})
```

## Output Format

Follow severity format:
- 🔴 CRITICAL — Hook rule violation, stale closure causing data corruption, XSS risk
- 🟠 HIGH — Missing deps array, performance regression, accessibility blocker
- 🟡 MEDIUM — Unnecessary re-renders, missing memoization, TypeScript `any`
- 🔵 LOW — Style, minor pattern improvements

Related Skills

wordpress-reviewer

9
from j7-dev/everything-github-copilot

Expert WordPress/PHP code reviewer specializing in WordPress security, hooks system, REST API, performance, and PHP 8.1+ best practices. Use for all WordPress plugin/theme PHP code changes. MUST BE USED for WordPress projects.

react-best-practices

9
from j7-dev/everything-github-copilot

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

python-reviewer

9
from j7-dev/everything-github-copilot

Expert Python code reviewer specializing in PEP 8 compliance, Pythonic idioms, type hints, security, and performance. Use for all Python code changes. MUST BE USED for Python projects.

go-reviewer

9
from j7-dev/everything-github-copilot

Expert Go code reviewer specializing in idiomatic Go, concurrency patterns, error handling, and performance. Use for all Go code changes. MUST BE USED for Go projects.

database-reviewer

9
from j7-dev/everything-github-copilot

PostgreSQL database specialist for query optimization, schema design, security, and performance. Use PROACTIVELY when writing SQL, creating migrations, designing schemas, or troubleshooting database performance. Incorporates Supabase best practices.

code-reviewer

9
from j7-dev/everything-github-copilot

Expert code review specialist. Proactively reviews code for quality, security, and maintainability. Use immediately after writing or modifying code. MUST BE USED for all code changes.

avalonia-reviewer

9
from j7-dev/everything-github-copilot

Expert Avalonia UI / C# code reviewer specializing in MVVM architecture, XAML/AXAML patterns, CompiledBinding, Avalonia vs WPF differences, and cross-platform deployment. Use for all Avalonia UI code changes. MUST BE USED for Avalonia projects.

abp-reviewer

9
from j7-dev/everything-github-copilot

C# ABP Framework 開發專家(Halil)。精通 ABP Framework 9.x、ASP.NET Core、DDD(Domain-Driven Design)、模組化架構、多租戶、CQRS 等企業級後端開發。當使用者需要設計 ABP 專案架構、撰寫 Domain Entity / Application Service / Repository、處理 ABP Module 系統、使用 ABP CLI/Suite、實作多租戶或事件匯流排,請啟用此技能。

wpds

9
from j7-dev/everything-github-copilot

Use when building UIs leveraging the WordPress Design System (WPDS) and its components, tokens, patterns, etc.

wp-wpcli-and-ops

9
from j7-dev/everything-github-copilot

Use when working with WP-CLI (wp) for WordPress operations: safe search-replace, db export/import, plugin/theme/user/content management, cron, cache flushing, multisite, and scripting/automation with wp-cli.yml.

wp-rest-api

9
from j7-dev/everything-github-copilot

Use when building, extending, or debugging WordPress REST API endpoints/routes: register_rest_route, WP_REST_Controller/controller classes, schema/argument validation, permission_callback/authentication, response shaping, register_rest_field/register_meta, or exposing CPTs/taxonomies via show_in_rest.

wp-project-triage

9
from j7-dev/everything-github-copilot

Use when you need a deterministic inspection of a WordPress repository (plugin/theme/block theme/WP core/Gutenberg/full site) including tooling/tests/version hints, and a structured JSON report to guide workflows and guardrails.