Install any skill in seconds. Free to start, no credit card required.
Get Started Free →React and Next.js performance playbook distilled from Vercel Engineering guidance. Use when building, reviewing, or refactoring React/Next.js code for waterfalls, bundle size, rendering cost, and client/server data flow.
.claude/skills/majiayu000-react-best-practices/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 9% | 0% |
| case-02 | ✓→✓ | = Same ✓ | 11% | 0% |
| case-03 | ✓→✓ | = Same ✓ | 26% | 0% |
| case-04 | ✓→✓ | = Same ✓ | 29% | 0% |
| case-05 | ✓→✓ | = Same ✓ | 7% | 0% |
Practical React and Next.js guidance for performance-sensitive product work.
This skill is a self-contained distillation of the Vercel React performance guidance so it can be installed and used directly inside Spellbook.
Use this skill when the user asks to:
Always check higher-priority categories first.
| Priority | Category | Focus | |----------|----------|-------| | 1 | Waterfalls | start async work early, await late, parallelize independent fetches | | 2 | Bundle size | avoid barrel imports, defer heavy code, split by feature | | 3 | Server-side performance | dedupe work, minimize serialization, prefer server execution | | 4 | Client data fetching | dedupe requests, avoid redundant listeners and client churn | | 5 | Rerenders | reduce subscriptions, stabilize dependencies, move expensive work | | 6 | Rendering | avoid hydration flicker, reduce DOM/SVG cost, optimize long lists | | 7 | JavaScript hot paths | cache repeated lookups, combine iterations, exit early | | 8 | Advanced patterns | stable refs and callback patterns for edge cases |
setState when it removes unstable dependencies.startTransition for non-urgent UI updates.content-visibility for long lists when appropriate.&& branches when rendering conditions matter.Map or Set for repeated membership checks.filter / map passes when the path is performance-sensitive.When reviewing React or Next.js code, check for:
Map or Set would helpWhen using this skill, the output should:
react.devnextjs.orgswr.vercel.app| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 18,958 | 18,239 | -4% | 1 | 1 | 0% | 3,232 | 3,520 | +9% | 0 | 0 | — |
case-02 | pass→pass | 12,612 | 9,878 | -22% | 1 | 1 | 0% | 2,267 | 2,507 | +11% | 0 | 0 | — |
case-03 | pass→pass | 11,920 | 9,884 | -17% | 1 | 1 | 0% | 1,995 | 2,505 | +26% | 0 | 0 | — |
case-04 | pass→pass | 11,208 | 9,775 | -13% | 1 | 1 | 0% | 1,907 | 2,464 | +29% | 0 | 0 | — |
case-05 | pass→pass | 10,531 | 6,552 | -38% | 1 | 1 | 0% | 1,825 | 1,961 | +7% | 0 | 0 | — |
case-06 | pass→pass | 8,514 | 6,763 | -21% | 1 | 1 | 0% | 1,377 | 1,955 | +42% | 0 | 0 | — |
case-07 | pass→pass | 11,658 | 8,786 | -25% | 1 | 1 | 0% | 1,959 | 2,470 | +26% | 0 | 0 | — |
case-08 | pass→pass | 14,725 | 9,397 | -36% | 1 | 1 | 0% | 2,457 | 2,474 | +1% | 0 | 0 | — |
case-09 | pass→pass | 6,211 | 6,353 | +2% | 1 | 1 | 0% | 1,079 | 2,084 | +93% | 0 | 0 | — |
case-10 | pass→pass | 11,482 | 6,909 | -40% | 1 | 1 | 0% | 1,991 | 2,031 | +2% | 0 | 0 | — |
case-11 | pass→pass | 8,273 | 5,865 | -29% | 1 | 1 | 0% | 1,417 | 1,771 | +25% | 0 | 0 | — |
case-12 | pass→pass | 13,106 | 9,791 | -25% | 1 | 1 | 0% | 2,327 | 2,546 | +9% | 0 | 0 | — |
case-13 | pass→pass | 7,558 | 8,088 | +7% | 1 | 1 | 0% | 1,330 | 2,312 | +74% | 0 | 0 | — |
case-14 | pass→pass | 18,129 | 13,497 | -26% | 1 | 1 | 0% | 2,779 | 3,050 | +10% | 0 | 0 | — |
case-15 | pass→pass | 9,582 | 7,589 | -21% | 1 | 1 | 0% | 1,413 | 2,071 | +47% | 0 | 0 | — |
case-16 | pass→pass | 12,638 | 8,060 | -36% | 1 | 1 | 0% | 2,060 | 2,189 | +6% | 0 | 0 | — |
case-17 | pass→pass | 8,565 | 6,694 | -22% | 1 | 1 | 0% | 1,469 | 1,941 | +32% | 0 | 0 | — |
case-18 | pass→pass | 10,376 | 6,901 | -33% | 1 | 1 | 0% | 1,692 | 1,968 | +16% | 0 | 0 | — |
case-19 | pass→pass | 12,570 | 9,603 | -24% | 1 | 1 | 0% | 2,134 | 2,381 | +12% | 0 | 0 | — |
case-20 | pass→pass | 19,611 | 20,139 | +3% | 1 | 1 | 0% | 3,643 | 5,080 | +39% | 0 | 0 | — |
case-21 | pass→pass | 19,203 | 17,352 | -10% | 1 | 1 | 0% | 3,565 | 4,312 | +21% | 0 | 0 | — |
case-22 | pass→pass | 10,525 | 10,612 | +1% | 1 | 1 | 0% | 1,842 | 2,638 | +43% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +5 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.