本文へスキップ
Skillpedia
WebサイトとUI(フロントエンド)8.2k · #12537

nextjs-react-expert

できること

このスキルは、ReactとNext.jsのアプリのための、性能に関するルールの一式をAIに与えます。ページの読み込みが遅い、またはもたつく感じがする開発者向けです。

使う場面

  • ✓ReactまたはNext.jsのページの読み込みが遅く、操作可能になるまで時間がかかるとき。
  • ✓ブラウザに送られるJavaScriptのサイズを減らしたいとき。
  • ✓Reactコンポーネントに性能の問題がないかをレビューしたいとき。

スキルのリンク

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

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/vudovn/ag-kit/blob/main/.agents/skills/nextjs-react-expert/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“私のNext.jsのページは読み込みが遅いです。確認して、最も大きな性能の問題から先に直してください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

スキルは、影響の大きさの順にルールを並べ、読み込みの連鎖の解消のような最も重要なものから示します。AIは関連する部分だけを読み、修正を適用します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)を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
よくある質問

どの問題から直すべきですか?

スキルは、読み込みの連鎖や大きなバンドルなど、重大な項目から始めるように説明しています。

サーバー側の速度も扱いますか?

はい。サーバー側の性能についての項目が含まれています。

Next.jsだけが対象ですか?

いいえ。Reactの性能も扱い、Next.js固有のルールも加えています。

詳細

作者による元の説明

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

人気

GitHubのスター
8.2k
ランキング
#12537
ライセンス
MIT
更新日
2026/10/18

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル