agentleFS
jgamaraalvjgamaraalv/delivery-loop/.claude/skills/react-best-practices/SKILL.md

react-best-practices

Skill0 starsChanged 4 months agoMITView on GitHub

React/Next.js best-practices reviewer for TSX/JSX. Triggers when writing or reviewing React components to check structure, hooks, accessibility, performance, and TypeScript patterns.

66 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use composition-patterns, python-best-practices and 8 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.
  • eeaSkill

    composition-patterns

    React composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or designing reusable APIs. Triggers on tasks involving compound components, render props, context providers, or component architecture. Includes React 19 API changes.

    Also in 4 projects that use this

  • jefflesterSkill

    python-best-practices

    Python development best practices including PEP 8 style guidelines, type hints, docstring conventions, and common patterns. Use when writing or modifying Python code.

    Also in 3 projects that use this

  • MicrosoftSkill

    planning-with-files

    **USE THIS FOR COMPLEX TASKS.** Implements Manus-style file-based planning for multi-step tasks. Creates task_plan.md, findings.md, and progress.md in .agent_cache/<task-name>/. Use when: implementing multiple APIs, refactoring modules, research tasks, or ANY task requiring >5 tool calls.

    Also in 5 projects that use this

  • VercelSkill

    vercel-deploy

    Deploy applications and websites to Vercel with a claimable preview. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment". No authentication required - returns preview URL and claimable deployment link.

    Also in 3 projects that use this

  • MicrosoftSkill

    code-quality

    Statically check changed C# against the same deterministic rules github-code-quality[bot] runs on pull requests, so a contributor can fix likely findings before opening the PR and keep the bot's inline comments to a minimum. Activate when a contributor asks to "check code quality", "run code quality on my changes", "will the code quality bot complain", "pre-check before I open the PR", "code quality check", or similar. Scoped to C#. Reads the diff and compares it against the enumerated csharp-code-quality rule set below — no CodeQL download or build required. This is a fast approximation of a dataflow engine, not a reproduction; report accordingly. Does NOT apply fixes unless explicitly asked.

    Also in 5 projects that use this

  • VercelSkill

    web-design-guidelines

    Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".

    Also in 10 projects that use this

  • +1 more from microsoft

The file

Files
SKILL.md

Vercel React Best Practices

Comprehensive performance optimization guide for React and Next.js applications, maintained by Vercel. Contains 64 rules across 8 categories, prioritized by impact to guide automated refactoring and code generation.

Rule Categories by Priority

PriorityCategoryImpactPrefixReference
1Eliminating WaterfallsCRITICALasync-references/eliminating-waterfalls.md
2Bundle Size OptimizationCRITICALbundle-references/bundle-size.md
3Server-Side PerformanceHIGHserver-references/server-performance.md
4Client-Side Data FetchingMEDIUM-HIGHclient-references/client-data-fetching.md
5Re-render OptimizationMEDIUMrerender-references/rerender-optimization.md
6Rendering PerformanceMEDIUMrendering-references/rendering-performance.md
7JavaScript PerformanceLOW-MEDIUMjs-references/javascript-performance.md
8Advanced PatternsLOWadvanced-references/advanced-patterns.md

References

Each file is loaded on demand — read one only when the task needs that depth (progressive disclosure).

  • references/eliminating-waterfalls.md — parallelize independent async work (Promise.all, better-all), defer await into the branch that needs it, stream with Suspense, and start promises early in API routes/Server Actions · read when touching async data flow, await chains, API routes, or Server Actions.
  • references/bundle-size.md — import directly (no barrel files), next/dynamic for heavy components, defer third-party scripts past hydration, load modules conditionally, and preload on user intent · read when reducing bundle size, code-splitting, or adding third-party/analytics scripts.
  • references/server-performance.md — authenticate server actions, dedupe with React.cache()/LRU, hoist static I/O, parallelize fetches, minimize RSC prop serialization, and use after() for non-blocking work · read when writing Server Components, Server Actions, or RSC data fetching.
  • references/client-data-fetching.md — SWR request deduplication, shared/passive global event listeners, and versioned, minimal localStorage · read when fetching on the client, attaching window/document listeners, or persisting to storage.
  • references/rerender-optimization.md — subscribe narrowly (defer reads, derived booleans), derive state during render not effects, functional/lazy useState, React.memo correctly, split hooks, transitions/useDeferredValue, and refs for transient values · read when diagnosing or preventing unnecessary re-renders and effect churn.
  • references/rendering-performance.md — hoist static JSX, content-visibility/Activity for offscreen work, animate wrappers not SVGs, SVG precision, explicit conditional rendering, hydration without flicker, and resource/script hints · read when optimizing render cost, hydration flicker, SVG/animation, or <script>/preload tags.
  • references/javascript-performance.md — index maps and Set/Map O(1) lookups, cached property/function/storage reads, single-pass iteration (flatMap, combined loops), early exits, hoisted RegExp, loop-based min/max, and toSorted · read when optimizing hot loops or data-structure-heavy JS.
  • references/advanced-patterns.md — store event handlers in refs, initialize once per app load, and useLatest/useEffectEvent for stable callback refs · read when stabilizing callback identity or guarding one-time initialization.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.