Install any skill in seconds. Free to start, no credit card required.
Get Started Free →React and Next.js performance optimization from Vercel Engineering.
.claude/skills/dokhacgiakhoa-nextjs-react-expert/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -11% | 0% |
| case-03 | ✓→✓ | = Same ✓ | 31% | 0% |
| case-04 | ✓→✓ | = Same ✓ | 57% | 0% |
| case-05 | ✓→✓ | = Same ✓ | 46% | 0% |
| case-06 | ✓→✓ | = Same ✓ | 79% | 0% |
> From Vercel Engineering - 57 optimization rules prioritized by impact > Philosophy: Eliminate waterfalls first, optimize bundles second, then micro-optimize.
Read ONLY sections relevant to your task! Check the content map below and load what you need.
> 🔴 For performance reviews: Start with CRITICAL sections (1-2), then move to HIGH/MEDIUM.
| File | Impact | Rules | When to Read | |------|--------|-------|--------------| | 1-async-eliminating-waterfalls.md | 🔴 CRITICAL | 5 rules | Slow page loads, sequential API calls, data fetching waterfalls | | 2-bundle-bundle-size-optimization.md | 🔴 CRITICAL | 5 rules | Large bundle size, slow Time to Interactive, First Load issues | | 3-server-server-side-performance.md | 🟠 HIGH | 7 rules | Slow SSR, API route optimization, server-side waterfalls | | 4-client-client-side-data-fetching.md | 🟡 MEDIUM-HIGH | 4 rules | Client data management, SWR patterns, deduplication | | 5-rerender-re-render-optimization.md | 🟡 MEDIUM | 12 rules | Excessive re-renders, React performance, memoization | | 6-rendering-rendering-performance.md | 🟡 MEDIUM | 9 rules | Rendering bottlenecks, virtualization, image optimization | | 7-js-javascript-performance.md | ⚪ LOW-MEDIUM | 12 rules | Micro-optimizations, caching, loop performance | | 8-advanced-advanced-patterns.md | 🔵 VARIABLE | 3 rules | Advanced React patterns, useLatest, init-once |
Total: 57 rules across 8 categories
What's your performance issue?
🐌 Slow page loads / Long Time to Interactive
→ Read Section 1: Eliminating Waterfalls
→ Read Section 2: Bundle Size Optimization
📦 Large bundle size (> 200KB)
→ Read Section 2: Bundle Size Optimization
→ Check: Dynamic imports, barrel imports, tree-shaking
🖥️ Slow Server-Side Rendering
→ Read Section 3: Server-Side Performance
→ Check: Parallel data fetching, streaming
🔄 Too many re-renders / UI lag
→ Read Section 5: Re-render Optimization
→ Check: React.memo, useMemo, useCallback
🎨 Rendering performance issues
→ Read Section 6: Rendering Performance
→ Check: Virtualization, layout thrashing
🌐 Client-side data fetching problems
→ Read Section 4: Client-Side Data Fetching
→ Check: SWR deduplication, localStorage
✨ Need advanced patterns
→ Read Section 8: Advanced PatternsUse this order when doing comprehensive optimization:
1️⃣ CRITICAL (Biggest Gains - Do First):
├─ Section 1: Eliminating Waterfalls
│ └─ Each waterfall adds full network latency (100-500ms+)
└─ Section 2: Bundle Size Optimization
└─ Affects Time to Interactive and Largest Contentful Paint
2️⃣ HIGH (Significant Impact - Do Second):
└─ Section 3: Server-Side Performance
└─ Eliminates server-side waterfalls, faster response times
3️⃣ MEDIUM (Moderate Gains - Do Third):
├─ Section 4: Client-Side Data Fetching
├─ Section 5: Re-render Optimization
└─ Section 6: Rendering Performance
4️⃣ LOW (Polish - Do Last):
├─ Section 7: JavaScript Performance
└─ Section 8: Advanced Patterns| Need | Skill | |------|-------| | API design patterns | @[skills/api-patterns] | | Database optimization | @[skills/database-design] | | Testing strategies | @[skills/testing-patterns] | | UI/UX design principles | @[skills/frontend-design] | | TypeScript patterns | @[skills/typescript-expert] | | Deployment & DevOps | @[skills/deployment-procedures] |
Before shipping to production:
Critical (Must Fix):
High Priority:
Medium Priority:
Low Priority (Polish):
DON'T:
await for independent operationsindex.ts re-exports) in app codeDO:
Promise.all()const Comp = dynamic(() => import('./Heavy'))import { specific } from 'library/specific'| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 43,657 | 33,864 | -22% | 1 | 1 | 0% | 8,261 | 7,368 | -11% | 0 | 0 | — |
case-02 | fail→fail | 14,241 | 11,916 | -16% | 1 | 1 | 0% | 2,693 | 4,129 | +53% | 0 | 0 | — |
case-03 | pass→pass | 16,670 | 10,700 | -36% | 1 | 1 | 0% | 2,857 | 3,730 | +31% | 0 | 0 | — |
case-04 | pass→pass | 13,792 | 11,880 | -14% | 1 | 1 | 0% | 2,575 | 4,038 | +57% | 0 | 0 | — |
case-05 | pass→pass | 16,111 | 12,749 | -21% | 1 | 1 | 0% | 2,835 | 4,148 | +46% | 0 | 0 | — |
case-06 | pass→pass | 15,399 | 16,729 | +9% | 1 | 1 | 0% | 2,699 | 4,821 | +79% | 0 | 0 | — |
case-07 | pass→pass | 13,793 | 12,524 | -9% | 1 | 1 | 0% | 2,595 | 4,169 | +61% | 0 | 0 | — |
case-08 | pass→pass | 11,511 | 9,854 | -14% | 1 | 1 | 0% | 2,072 | 3,622 | +75% | 0 | 0 | — |
case-09 | pass→pass | 14,494 | 10,382 | -28% | 1 | 1 | 0% | 2,460 | 3,612 | +47% | 0 | 0 | — |
case-10 | pass→pass | 9,167 | 7,401 | -19% | 1 | 1 | 0% | 1,678 | 3,166 | +89% | 0 | 0 | — |
case-11 | pass→pass | 14,756 | 14,286 | -3% | 1 | 1 | 0% | 2,327 | 4,163 | +79% | 0 | 0 | — |
case-12 | pass→pass | 18,297 | 17,981 | -2% | 1 | 1 | 0% | 3,265 | 4,591 | +41% | 0 | 0 | — |
case-13 | pass→pass | 12,730 | 12,271 | -4% | 1 | 1 | 0% | 2,341 | 4,226 | +81% | 0 | 0 | — |
case-14 | pass→pass | 11,919 | 10,687 | -10% | 1 | 1 | 0% | 2,215 | 3,931 | +77% | 0 | 0 | — |
case-15 | pass→pass | 15,600 | 16,338 | +5% | 1 | 1 | 0% | 2,796 | 4,613 | +65% | 0 | 0 | — |
case-16 | pass→pass | 12,528 | 13,103 | +5% | 1 | 1 | 0% | 2,575 | 4,264 | +66% | 0 | 0 | — |
case-17 | pass→pass | 13,543 | 9,550 | -29% | 1 | 1 | 0% | 2,322 | 3,561 | +53% | 0 | 0 | — |
case-18 | pass→pass | 8,658 | 9,981 | +15% | 1 | 1 | 0% | 1,751 | 3,691 | +111% | 0 | 0 | — |
case-19 | pass→pass | 14,000 | 10,891 | -22% | 1 | 1 | 0% | 2,545 | 3,852 | +51% | 0 | 0 | — |
case-20 | pass→pass | 11,993 | 13,239 | +10% | 1 | 1 | 0% | 2,434 | 4,439 | +82% | 0 | 0 | — |
case-21 | pass→pass | 10,564 | 10,788 | +2% | 1 | 1 | 0% | 2,079 | 3,905 | +88% | 0 | 0 | — |
case-22 | pass→pass | 17,006 | 18,866 | +11% | 1 | 1 | 0% | 3,509 | 5,557 | +58% | 0 | 0 | — |
case-23 | pass→pass | 23,493 | 17,071 | -27% | 1 | 1 | 0% | 3,917 | 5,232 | +34% | 0 | 0 | — |
case-24 | pass→pass | 11,780 | 9,582 | -19% | 1 | 1 | 0% | 1,920 | 3,644 | +90% | 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. 24 cases were attempted. The headline lift of +4 percentage points is the difference between those two pass rates over the 24 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.