react
Skill14 starsChanged 4 months agoMITView on GitHub
Audits React and Next.js code for high-leverage runtime and rendering pitfalls, then routes to deep-dive references on useEffect anti-patterns, re-render causes, rendering model selection, React 19 APIs, and waterfall chains. Use when a .tsx or .jsx file is opened or reviewed, the user asks "is my React code good", mentions useEffect, re-renders, memoization, React Compiler, Server Components, Server Actions, SSR vs CSR, hydration, waterfalls, or bundle size. Triggers on React runtime/rendering reviews.
30 other projects use a version of this.
Adopted by
Most recently taken up by
- lobehub/lobehubtheir own version, first seen Oct 1, 2026
- compozy/compozytheir own version, first seen Oct 1, 2026
- vercel-labs/json-rendertheir own version, first seen Sep 23, 2026
- dafaalz/agent-skillstheir own version, first seen Sep 22, 2026
- AvilaCarlosDev/openclaw-skillstheir own version, first seen Sep 19, 2026
- danielteles/awesome-agent-skillstheir own version, first seen Sep 2, 2026
Used with
Projects with it also use app-renderer-systems, refactoring-analysis and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
pedronauckSkillapp-renderer-systems
Create, extend, or debug frontend domain modules organized under systems/. Covers adapters, Query hooks, local state, and public exports; excludes generic components and backend implementation.
Also in 3 projects that use this
pedronauckSkillrefactoring-analysis
Audit code quality and architectural health or plan refactoring using Fowler code smells and techniques; write prioritized findings to docs/_refacs/. Excludes formatting, performance, and security audits.
Also in 3 projects that use this
rogue-dev-studioSkillnodejs
Node.js development environment. Use when the project needs this capability or the user / team manifest asks for it. Use for specialized `nodejs` work when listed in TEAM.yaml or explicitly requested.
Also in 6 projects that use this
akornmeierSkilltailwindcss
Guide for implementing Tailwind CSS - a utility-first CSS framework for rapid UI development. Use when styling applications with responsive design, dark mode, custom themes, or building design systems with Tailwind's utility classes.
Also in 6 projects that use this
MindrallySkillprisma
Expert in Prisma ORM with type-safe database operations and schema design
Also in 4 projects that use this
joabgonzalezSkillexpress
Express.js routing, middleware, and error handling. Trigger: When building REST APIs or server logic with Express.
Also in 3 projects that use this
- +1 more from pedronauck
Other versions30 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 30
- lobehub/lobehub★ 83ksame name
- vercel-labs/json-render★ 18ksame name
- compozy/compozy★ 2.8ksame name
- openops-cloud/openops★ 1.1ksame name
- pedronauck/skills★ 633same name
- Mindrally/skills★ 266same name
- magnus919/agent-skills★ 109same name
- dylantarre/design-system-skills★ 50same name
- nimadorostkar/Claude-Skills-collection★ 28same name
- sordi-ai/skill-everything★ 20same name
20 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository46 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- analyze-repoSkill
- architectSkill
- commitSkill
- debugSkill
- frontendSkill
- pr-reviewSkill
- react-hook-form-auditSkill
- react-hook-formSkill
- refactorSkill
- researchSkill
- reviewSkill
- specSkill
- testSkill
- auditSkill
- neovimSkill
- shell-envSkill
- learnSkill
- tilSkill
- audit-paraSkill
- capture-receiptSkill
- close-daySkill
- dailySkill
- goalsSkill
- ideasSkill
- ingestSkill
- maintainSkill
- memory-recallSkill
- moneySkill
- process-inboxSkill
- projectSkill
- save-noteSkill
- spot-driftSkill
- vaultSkill
- weekly-reviewSkill
- careerSkill
- check-communicationSkill
- deslopifySkill
- ideationSkill
- prototypeSkill
- standupSkill
- blogSkill
- docsSkill
- talkSkill
- tutorialSkill
- tweet-todaySkill
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 4 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 23 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 34
If state is only a calculation from props/state, compute it during render (optionally useMemo for expensive work) instead of syncing with …
- Very specific: line 50
Prefer plain function components.
- Distinctive: line 64
Use this for full audits. The universal checks above catch the most common bugs.
- Distinctive: line 135
After the full checklist, provide:
- Distinctive: line 142
Before loading references, determine which stack the user is on:
- Very specific: line 151
If unsure, look at the imports: next/ imports → App Router.
- Distinctive: line 177
When multiple references match, load in priority order — they don't overlap
“Common” is measured: kept by at least 6 in 10 of the 23 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
React Best Practices Audit
Focused audit layer for React and Next.js runtime/rendering issues. Start with the universal checks, then route to the reference that matches the user's specific question.
Universal Checks (no exceptions — run these every time)
These checks take seconds to scan for and catch common high-impact mistakes. Skip them only if you have already verified them in the same session.
- Components defined inside other components They are re-created on every render; state resets and memoization is lost. Extract to module scope.
- Array index as
keyin dynamic listskeyis React's identity anchor. When lists reorder, insert, or delete, an index key reassigns identity to the wrong element. Use a stable ID from the data. Exception: truly static, never-reordered lists. - Derived state via
useState+useEffectIf state is only a calculation from props/state, compute it during render (optionallyuseMemofor expensive work) instead of syncing with an Effect. - Data fetching in
useEffectwithout cleanup Slow responses can overwrite fresh data. Use cleanup/cancellation, TanStack Query, or Server Components so stale requests cannot win the race. - Unmemoized Context provider value New object/function references make every consumer re-render. Memoize the provider value or split data and API contexts.
- Server Actions for client-side data reads Server Actions serialize calls and are for mutations. Reads should use RSC, route handlers, or a client data layer that can parallelize and dedupe.
React.FCandforwardRefas default patterns Prefer plain function components.React.FCadds noise and misleading children behavior; React 19 makesrefa normal prop for new code. Load the React 19 reference for version-specific migration details.
Ownership Boundary with Frontend
react owns React runtime/rendering issues: Effects, re-renders, Context,
keys, Server Actions, hydration, React 19 APIs, waterfalls, and bundle/runtime
performance. frontend owns broader TypeScript, UI accessibility, browser
security, Next.js file boundaries, Tailwind/component API patterns, and frontend
file structure.
Priority Checklist (run after universal checks)
Use this for full audits. The universal checks above catch the most common bugs; this checklist catches the rest.
CRITICAL — Eliminating Waterfalls:
- No sequential awaits that could run in parallel
Promise.allfor independent operations- API routes don't chain awaits unnecessarily
- Strategic Suspense boundaries for streaming
CRITICAL — Bundle Size:
- Direct imports (no barrel files)
- Dynamic imports for heavy components
- Conditional module loading
- Non-critical libs deferred
- Preload based on user intent
HIGH — Server-Side Performance:
- Server Actions have authentication
- RSC props minimized (only needed data)
- Parallel data fetching via composition
React.cache()for per-request dedupafter()for non-blocking operations- No duplicate serialization
MEDIUM-HIGH — Client Data Fetching:
- SWR/TanStack Query for automatic deduplication
- Passive event listeners for scroll
- Global event listeners deduplicated
localStorageversioned and minimal
MEDIUM — Re-render Optimization:
- Functional
setStateupdates (no stale closures) - Lazy state initialization for expensive values
- Narrow effect dependencies (primitives > objects)
useTransitionfor non-urgent updates- Derived state calculated during render (not via
useEffect) - Interaction logic in event handlers (not state + effect)
useReffor transient values (mouse trackers, intervals)- Extract to memoized components when re-render scope is too broad
- No unnecessary
useMemowrapping (prefer React Compiler if available)
MEDIUM — Rendering Performance:
content-visibilityfor long listsuseTransitionover manual loading states- Explicit conditional rendering (not
&&with truthy non-booleans) suppressHydrationWarningfor known server/client differences- Prevent hydration mismatch without UI flicker
LOW-MEDIUM — JavaScript Performance:
Set/Mapfor O(1) lookups- Early returns in functions
- Cached repeated function calls
toSorted()oversort()for immutability- Avoid layout thrashing
- Hoist
RegExpcreation outside render
LOW — Advanced Patterns:
- Event handlers in refs for stable references
useEffectEventfor stable callback refs- App initialization with module-level guards (not
useEffect)
Report Format
For each violation:
[PRIORITY] Rule Name
File: path/to/file.tsx:line
Issue: [description of the problem]
Fix: [code example showing correct pattern]After the full checklist, provide:
- Violation Count by Priority — CRITICAL: N · HIGH: N · MEDIUM: N · LOW: N
- Top 3 Highest-Impact Fixes — brief description + expected improvement
- Overall Assessment — Pass / Needs Work / Critical Issues
Stack Context — Determine Before Routing
Before loading references, determine which stack the user is on:
- Next.js App Router → RSC, Server Actions, streaming, and
react-19.mdaction props /useActionStatepatterns apply - Vite SPA (React Router / TanStack Router) → no RSC, TanStack Query is the
primary data layer,
tanstack-query.mdis the first reference to reach for - Both →
re-renders.md,useeffect-antipatterns.md,portals-and-stacking-context.md, andbundle-and-perf-investigation.mdare stack-agnostic
If unsure, look at the imports: next/ imports → App Router; react-router-dom
or @tanstack/react-router → Vite SPA.
References — Priority Table
Load the reference that matches the issue. Higher-priority references fix more users / cause more damage when missed — resolve CRITICAL before MEDIUM.
| Priority | Load when | Reference |
| 1 — Critical | React 19 APIs (useActionState, useOptimistic, use()), ref as prop, action props, nuqs, async transitions, Suspense sibling change | references/react-19.md |
| 2 — Critical | sequential await, waterfall chains, Promise.all, Suspense streaming, React.cache, after(), parallel fetching | references/waterfalls.md |
| 3 — Critical | slow initial load, bundle size, barrel file imports, code splitting, rollup-plugin-visualizer, Web Vitals, dynamic import | references/bundle-and-perf-investigation.md |
| 4 — High | useEffect questions, "should I use an effect", stale closure, race condition, flickering UI, useLayoutEffect | references/useeffect-antipatterns.md |
| 5 — High | SSR/CSR/SSG/ISR/RSC choice, "when should I use a Server Component", hydration mismatch, suppressHydrationWarning | references/rendering-models.md |
| 6 — Medium-High | TanStack Query, useQuery, queryOptions, select, staleTime, gcTime, mutations, optimistic updates, query keys | references/tanstack-query.md |
| 7 — Medium | useMemo, useCallback, React.memo, "why does this re-render", React Compiler, memoization decision | references/re-renders.md |
| 8 — Medium | modal, dialog, tooltip, popover, z-index, "appears behind", portal, stacking context | references/portals-and-stacking-context.md |
When to load a reference
- Load the highest-priority matching reference first — fix CRITICAL issues before reaching for MEDIUM optimization references
- A rule-level question ("should I do X?") → load the reference for that category
- A conceptual question ("why does X happen?") → load the same reference; they include both explanation and the correct pattern
- When multiple references match, load in priority order — they don't overlap
- The universal checks + priority checklist above cover the most common violations without loading any reference; only load when depth is needed beyond the checklist
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

