
A comprehensive React optimization guide that teaches Claude to spot the anti-patterns that actually cause production bugs. The skill covers 25+ patterns from critical issues like components defined inside components (which lose focus on every keystroke) to SSR hydration mismatches and unnecessary re-renders. It's built for progressive disclosure so Claude only loads what it needs, checking first whether you're using React Compiler (which handles memoization automatically) before suggesting manual optimizations. Especially useful when you're debugging infinite loops, reviewing performance, or working with Next.js. Includes a standardized audit template with severity levels and impact categories, plus detection scripts you can run on your codebase.
$ npx -y skills add gohypergiant/agent-skills --skill accelint-react-best-practices --agent claude-codeInstalls into .claude/skills of the current project.
Comprehensive performance optimization and best practices for React applications, designed for AI agents and LLMs working with React code.
These are the most critical anti-patterns that cause real production issues. Experts learned these the hard way through debugging sessions and performance investigations.
NEVER define components inside components — creates new component type on every render, causing full remount with state loss and DOM recreation. Results in input fields losing focus on keystroke, animations restarting unexpectedly, and useEffect cleanup/setup running on every parent render.
NEVER subscribe to searchParams/localStorage if you only read them in callbacks — causes component to re-render on every URL change or storage event even when the component doesn't display those values. Read directly in the callback instead: new URLSearchParams(window.location.search).
NEVER use object/array dependencies in useEffect — triggers effect on every render since objects are recreated with new references each time. Extract primitive values (id, name) from objects and use those as dependencies instead.
Sponsors