agentleFS
Evan-Kim2028Evan-Kim2028/agent-skills/skills/frontend/react-performance/SKILL.md

react-performance

Skill1 starsChanged 3 months agoMITView on GitHub

React/SPA performance — request waterfalls, bundles, re-renders, chart/list jank, code-splitting heavy libs. Use only when load time, jank, or a performance budget is the stated problem. Prefer frontend-design when the task is general UI build/polish (it routes here if needed). Not for pure CSS aesthetics, a11y-only reviews (web-quality), or chart cognitive design (tufte).

18 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use orch-pipeline, parallel-execution-optimizer 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.
  • renepfSkill

    orch-pipeline

    Shared orchestration engine for the orch-* skill family. Defines the gated Research-Plan-TDD-Review-Commit pipeline, the size classifier, the agent map, and the two human gates that the orch-* operation skills delegate to. Not usually invoked directly.

    Also in 3 projects that use this

  • marcusgollSkill

    parallel-execution-optimizer

    Identify and execute independent operations in parallel for 3-5x speedup. Auto-analyzes task dependencies, groups into batches, launches parallel Task() calls. Applies to /optimize (5 checks), /ship pre-flight (5 checks), /implement (task batching), /prototype (N screens). Auto-triggers when detecting multiple independent operations in a phase.

    Also in 4 projects that use this

  • ronmkrSkill

    vite-patterns

    Vite build tool patterns including config, plugins, HMR, env variables, proxy setup, SSR, library mode, dependency pre-bundling, and build optimization. Activate when working with vite.config.ts, Vite plugins, or Vite-based projects.

    Also in 4 projects that use this

  • RojiosSkill

    defi-amm-security

    Security checklist for Solidity AMM contracts, liquidity pools, and swap flows. Covers reentrancy, CEI ordering, donation or inflation attacks, oracle manipulation, slippage, admin controls, and integer math.

    Also in 3 projects that use this

  • RojiosSkill

    security-bounty-hunter

    Hunt for exploitable, bounty-worthy security issues in repositories. Focuses on remotely reachable vulnerabilities that qualify for real reports instead of noisy local-only findings.

    Also in 4 projects that use this

  • renepfSkill

    plan-orchestrate

    Read a plan document, decompose it into steps, design a per-step agent chain from the ECC catalogue, and emit ready-to-paste /orchestrate custom prompts. Generative only — never invokes /orchestrate itself. Use when the user has a multi-step plan and wants to drive it through orchestrate without composing chains by hand.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 18 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Prefer parallel fetches over await chains

    line 37
  2. Distinctive:

    Use deferred/streaming patterns when the framework supports them

    line 39
  3. Distinctive:

    Avoid barrel-file imports that pull whole icon/component sets

    line 46
  4. Very specific:

    Keep SSR/client entry lean.

    line 47

“Common” is measured: kept by at least 6 in 10 of the 18 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

React performance

Job: Make product UI fast enough that craft work is usable.

Sources (attribution)

  • Vercel Engineering React Best Practices agent-skill lineage: prioritized rules around waterfalls, bundle size, server/client data fetching, and re-render hygiene (public react-best-practices skill pattern).
  • Core Web Vitals orientation (LCP, INP/FID proxy, CLS) as used in product performance budgets.
  • Chart/code-split practice common in analytics frontends (lazy heavy viz libs).

This file is a compact agent checklist, not a dump of Vercel’s full rule set.

When to load

  • Slow route transitions or chat streams that block input
  • Large main bundles / lighthouse or budget failures
  • Card grids, virtualized lists, ECharts/map libs
  • “Everything re-renders when one filter changes”

Priority order (fix highest impact first)

1. Eliminate waterfalls (critical)

  • Prefer parallel fetches over await chains
  • Don’t block entire page on secondary panels
  • Use deferred/streaming patterns when the framework supports them

Smell: Network waterfall in DevTools; time-to-first-content dominated by sequential API calls.

2. Bundle size (critical)

  • Dynamic import heavy routes and libs (echarts, markdown, pdf, maps)
  • Avoid barrel-file imports that pull whole icon/component sets
  • Keep SSR/client entry lean; split admin/scanner/trade if route-isolated

Smell: Main chunk jumps after adding one chart import.

3. Data fetching hygiene

  • Cache with stable keys (React Query / router loaders)
  • Stale-while-revalidate for browse surfaces when product allows
  • Don’t refetch whole page for grade/timeframe toggles if partial data works
  • Cancel/ignore stale responses on rapid filter changes

4. Re-render control (medium)

  • State lives near consumers; avoid god-context for high-frequency values
  • Derived booleans over storing everything raw
  • Memoize expensive pure calc (chart option builders), not every component
  • Virtualize long lists (@tanstack/react-virtual or equivalent)

5. Rendering performance

  • Animate transform/opacity only
  • content-visibility for long offscreen sections when appropriate
  • Images: correct size/variant for thumbnails vs lightbox

6. Charts (analytics-specific)

  • One shared chart component contract (dispose on unmount)
  • Don’t rebuild full option objects on unrelated parent state
  • Separate chart chunk from app shell

Review output

State impact tier + fix:

CRITICAL — sequential grade-stats then sales fetch on card open; parallelize
HIGH — echarts imported from route root; dynamic import into Chart shell
MEDIUM — filter context re-renders entire PriceMatrix; split selection state

Hand off

NeedNext skill
Tokens/layoutdesign-system / product-ui-craft
Prove no visual regression after splitbrowser-verify
Mobile jank from sticky+scrollmobile-product-ux

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.