Skip to content
Skillpedia
Websites & UI (frontend)8.2k Β· #12537

nextjs-react-expert

What it does

This skill gives your AI a set of performance rules for React and Next.js apps. It is for developers whose pages load slowly or feel sluggish.

When to use it

  • βœ“When a React or Next.js page loads slowly or takes too long to become interactive.
  • βœ“When you want to reduce the size of the JavaScript sent to the browser.
  • βœ“When you want to review a React component for performance problems.

Skill link

https://github.com/vudovn/ag-kit/blob/main/.agents/skills/nextjs-react-expert/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/vudovn/ag-kit/blob/main/.agents/skills/nextjs-react-expert/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

Example of what to ask your AI

β€œMy Next.js page is slow to load. Review it and fix the biggest performance problems first.”

5 new skills a week. 1 minute to read.

How it works

The skill lists its rules by impact, starting with the most important ones such as eliminating loading waterfalls. The AI reads only the relevant part and applies the fixes.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Next.js & React Performance Expert

From Vercel Engineering - 58 optimization rules prioritized by impact, plus Next.js 16 Cache Components Philosophy: Eliminate waterfalls first, optimize bundles second, then micro-optimize.


🎯 Selective Reading Rule (MANDATORY)

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.


πŸ“‘ Content Map

File Impact Rules When to Read
1-async-eliminating-waterfalls.md πŸ”΄ CRITICAL 6 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
9-cache-components.md πŸ”΄ CRITICAL 4 sections Next.js 16+ Only: use cache, cacheLife, PPR, cacheTag

Total: 58 rules across 8 categories, plus Section 9 (Cache Components) for Next.js 16+


πŸš€ Quick Decision Tree

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 Patterns

πŸš€ **Next.js 16+ Performance (Caching & PPR)**
  β†’ Read Section 9: Cache Components

πŸ“Š Impact Priority Guide

Use 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

πŸ”₯ **MODERN (Next.js 16+):**
   └─ Section 9: Cache Components (Replaces most traditional revalidation)

πŸ”— Related Skills

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]
D
FAQ

Which problems should it fix first?

The skill says to start with the critical items, such as loading waterfalls and large bundles.

Does it cover server-side speed?

Yes. It includes a section on server-side performance.

Is it only for Next.js?

No. It covers React performance too, and it adds Next.js-specific rules.

Details

Original description by the author

React and Next.js performance optimization from Vercel Engineering. Use when building React components, optimizing performance, eliminating waterfalls, reducing bundle size, reviewing code for performance issues, or implementing server/client-side optimizations.

repo: vudovn/ag-kit

Popularity

GitHub stars
8.2k
Ranking position
#12537
License
MIT
Updated
10/18/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills