Comprehensive performance optimization and best practices for React applications, designed for AI agents and LLMs working with React code.
Works with
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionaccelint-react-best-practicesExecute the skills CLI command in your project's root directory to begin installation:
Fetches accelint-react-best-practices from gohypergiant/agent-skills and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate accelint-react-best-practices. Access via /accelint-react-best-practices in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
0
total installs
0
this week
7
GitHub stars
0
upvotes
Run in your terminal
0
installs
0
this week
7
stars
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.
NEVER sync derived state with useState + useEffect — leads to extra re-renders, infinite loops, and stale intermediate states. Calculate derived values during render instead: const fullName = firstName + ' ' + lastName.
NEVER use client-only state (localStorage, cookies, device detection) directly in SSR components — causes hydration mismatches where server HTML doesn't match client render, resulting in React warnings, visual flickering, and broken interactivity. Use synchronous inline <script> before React hydrates.
NEVER use forwardRef in React 19+ — deprecated API. Use ref as a regular prop instead: function MyInput({ ref }) { return <input ref={ref} /> }.
NEVER create callbacks/objects/arrays inline as props to memoized components — breaks memoization since new reference is created each render. Extract to module scope, useMemo, or useCallback: const config = useMemo(() => ({ theme }), [theme]).
NEVER put user interaction logic in useEffect — if it's triggered by a button click or form submit, put it directly in the event handler. Effects are for synchronization with external systems, not user-triggered actions.
This skill uses a progressive disclosure structure to minimize context usage:
Read AGENTS.md for a concise overview of all rules with one-line summaries.
When you identify a relevant optimization, load the corresponding reference file for detailed implementation guidance:
Re-render Optimizations:
Rendering Performance:
Advanced Patterns:
Misc:
Quick References:
Automation Scripts:
Each reference file contains:
When this skill is invoked, use the standardized report format:
Template: assets/output-report-template.md
The report format provides:
When to use the audit template:
/accelint-react-best-practices <path>When NOT to use the report template:
Task: "This component re-renders too frequently when the user scrolls"
Approach:
Task: "This callback always uses the old state value"
Approach:
Task: "Getting hydration errors with localStorage theme"
Approach:
Each reference file demonstrates ONE proven pattern, but React problems often have multiple valid solutions.
When applying patterns:
Example: For SSR hydration issues, prevent-hydration-mismatch.md shows the synchronous script approach, but a simple "mounted flag" pattern may be more appropriate for basic use cases.
Many manual optimization patterns (memo, useMemo, useCallback, hoisting static JSX) are automatically handled by React Compiler.
Before optimizing, check if the project uses React Compiler:
See react-compiler-guide.md for a complete breakdown of what the compiler handles vs what still needs manual optimization.
This skill covers React 19 features including:
useEffectEvent (19.2+) for stable event handlers<Activity> component for preserving hidden component stateref as a prop (replaces deprecated forwardRef)Catch up on React 19 features:
Prerequisites
Time Estimate
15-45 minutes depending on use case complexity
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
asyrafhussin/agent-skills
jwynia/agent-skills
kadajett/agent-nestjs-skills
anthropics/claude-code
mblode/agent-skills
github/awesome-copilot
Useful defaults in accelint-react-best-practices — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
accelint-react-best-practices is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
accelint-react-best-practices reduced setup friction for our internal harness; good balance of opinion and flexibility.
accelint-react-best-practices has been reliable in day-to-day use. Documentation quality is above average for community skills.
I recommend accelint-react-best-practices for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
accelint-react-best-practices reduced setup friction for our internal harness; good balance of opinion and flexibility.
I recommend accelint-react-best-practices for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
Keeps context tight: accelint-react-best-practices is the kind of skill you can hand to a new teammate without a long onboarding doc.
accelint-react-best-practices fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
Solid pick for teams standardizing on skills: accelint-react-best-practices is focused, and the summary matches what you get after install.
showing 1-10 of 33