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.mdCopy 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
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
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
Comments
- β¦
More skills from this repository
batch-operations
8.2kHelps your agent make the same change across many files at once, such as renaming a function or replacing an old import everywhere.
brainstorming
8.2kTeaches your agent to ask clarifying questions before building anything new or complex, so it understands your goal first.
code-review-checklist
8.2kGives your agent a checklist for reviewing code for correctness, security, performance, testing and documentation, including AI-specific risks.
code-review-graph
8.2kHelps your agent review code in large projects using a structural map, so it reads only the files affected by a change.
Similar skills
angular-developer
280kHelps your agent create Angular code and give project structure advice. Useful for starting new projects, creating code parts, or improving performance and accessibility.
frontend-a11y
280kHelps your agent make web interfaces accessible to everyone. It ensures websites and apps work well with screen readers and keyboard navigation.
frontend-patterns
280kHas your agent apply modern patterns in frontend development. It optimizes performance, manages state, and follows best practices in React and Next.js.