react-best-practices

Audits React code for performance, bundle size, and best practices. Use when reviewing React code, auditing bundle size, finding performance issues, checking React 18+ patterns, or evaluating a React codebase. NOT for: non-React projects, backend Node.js code, or CSS-only reviews.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "react-best-practices" with this command: npx skills add asimons81/agentic-atlas-react-best-practices

React Best Practices Skill

Audits React applications for performance, bundle size, and React 18+ best practices.

Instructions

When reviewing or auditing React code:

  1. Run the audit against the specified code or repository
  2. Check against the 40+ auditable rules (see below)
  3. Report findings with severity (error, warning, info)
  4. Provide actionable fix suggestions with before/after code examples
  5. For performance issues, identify the root cause and recommended optimization
  6. For bundle issues, suggest code splitting or lazy loading strategies

Auditable Rules (Sample)

Performance

  • no-missing-deps: Hook dependencies must be complete
  • avoid-inline-objects-in-jsx: Inline objects cause unnecessary re-renders
  • prefer-useMemo: Expensive computations should use useMemo
  • prefer-useCallback: Callbacks passed to children should use useCallback

React 18+

  • prefer-use client directive: Server Components compliance
  • no-unnecessary-fragments: Avoid unnecessary fragment wrappers
  • require-useTransition: Long renders should use useTransition

Bundle Size

  • no-bare-imports: Use named imports over namespace imports
  • avoid-default-imports: Default imports prevent tree shaking
  • check-duplicate-packages: Duplicate package versions inflate bundle

Accessibility

  • require-aria-labels: Interactive elements need ARIA labels
  • require-keyboard-handlers: Click handlers need keyboard equivalents

Output Format

{
  "file": "src/components/UserProfile.tsx",
  "rules": [
    {
      "rule": "no-missing-deps",
      "severity": "error",
      "line": 42,
      "message": "Missing dependency 'userId' in useEffect",
      "fix": "Add userId to dependency array"
    }
  ],
  "summary": { "errors": 2, "warnings": 5, "info": 1 }
}

Example

User: "Audit our React codebase for performance issues"

→ Run audit → Report: 3 errors (missing deps, inline objects), 7 warnings → Provide fixes for each

Dependencies

Requires: Node.js, project with React 16+ (for React 18+ rules, requires React 18+)

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

Rau — 前端全栈AI时代工程心智

Rau — 顶级前端工程师虚拟心智模型。 融合 Guillermo Rauch(Vercel CEO / Next.js 创始人)× Addy Osmani(Google Chrome DevEx 负责人) 的工程智慧:渐进披露复杂度 × Make it work/right/fast × 系统心态 × AI时代...

Registry SourceRecently Updated
800Profile unavailable
Coding

React Component Generator

生成 React 组件模板,支持 Function Component, Class Component, Hooks, TypeScript,一键生成完整组件代码。

Registry SourceRecently Updated
8060Profile unavailable
Coding

Profiling Driven Performance Optimization

Optimize code performance by first refactoring to a well-factored structure, then running a profiler to find actual hot spots, and applying targeted optimiza...

Registry SourceRecently Updated
1380Profile unavailable
Coding

Use Effect

Refactor React code away from direct useEffect usage. Use when Codex needs to review, rewrite, or prevent useEffect in React components, custom hooks, or fro...

Registry Source
1720Profile unavailable