Communitygithub.com

ASoudy/AGS

Vercel エンジニアリングによる React および Next.js のパフォーマンス最適化ガイドライン。React/Next.js コードの作成、レビュー、リファクタリング時に最適なパフォーマンスパターンを確保するために使用します。

AGS とは?

このスキルは、Vercel が維持する React および Next.js アプリケーション向けの包括的なパフォーマンス最適化ガイドです。8 つのカテゴリにわたる 45 のルールが含まれており、影響度に基づいて優先順位が付けられています。主に、ウォーターフォールの排除、バンドルサイズの最適化、サーバーサイドパフォーマンス、クライアントサイドデータフェッチ、再レンダリング最適化、レンダリングパフォーマンス、JavaScript パフォーマンス、高度なパターンをカバーします。このスキルは、Claude Code、Cursor、Codex などの AI エージェントが、React コンポーネントや Next.js ページの作成、データフェッチの実装、パフォーマンスレビューやリファクタリングを行う際に、自動的にルールを参照・適用できるよう設計されています。各ルールには具体的なコード例と説明が用意されており、実践的で即座に活用可能です。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ASoudy/AGS/tree/HEAD/claude_skills_libraries/landing-page-mastery/skills/vercel-react-best-practices

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

Vercel React ベストプラクティス

React および Next.js アプリケーション向けの包括的なパフォーマンス最適化ガイド。Vercel が維持しています。自動リファクタリングとコード生成を導くために、8 つのカテゴリにわたり 45 のルールが影響度ごとに優先順位付けされています。

適用タイミング

以下の場合にこれらのガイドラインを参照してください:

  • 新しい React コンポーネントや Next.js ページを作成するとき
  • データフェッチ(クライアントサイドまたはサーバーサイド)を実装するとき
  • パフォーマンス上の問題についてコードをレビューするとき
  • 既存の React/Next.js コードをリファクタリングするとき
  • バンドルサイズや読み込み時間を最適化するとき

優先順位別ルールカテゴリ

優先順位カテゴリ影響度プレフィックス
1ウォーターフォールの排除重大async-
2バンドルサイズの最適化重大bundle-
3サーバーサイドパフォーマンス高server-
4クライアントサイドデータフェッチ中-高client-
5再レンダリングの最適化中rerender-
6レンダリングパフォーマンス中rendering-
7JavaScript パフォーマンス低-中js-
8高度なパターン低advanced-

クイックリファレンス

1. ウォーターフォールの排除(重大)

  • async-defer-await - await を実際に使用されるブランチに移動する
  • async-parallel - 独立した処理には Promise.all() を使用する
  • async-dependencies - 部分的な依存関係には better-all を使用する
  • async-api-routes - API ルートでは Promise を早期に開始し、遅れて await する
  • async-suspense-boundaries - Suspense を使用してコンテンツをストリーミングする

2. バンドルサイズの最適化(重大)

  • bundle-barrel-imports - バレルファイルを避け、直接インポートする
  • bundle-dynamic-imports - 重いコンポーネントには next/dynamic を使用する
  • bundle-defer-third-party - 分析/ログはハイドレーション後に読み込む
  • bundle-conditional - 機能が有効な場合のみモジュールを読み込む
  • bundle-preload - ホバー/フォーカス時にプリロードして体感速度を向上させる

3. サーバーサイドパフォーマンス(高)

  • server-cache-react - リクエストごとの重複排除に React.cache() を使用する
  • server-cache-lru - リクエスト間のキャッシュに LRU キャッシュを使用する
  • server-serialization - クライアントコンポーネントに渡すデータを最小化する
  • server-parallel-fetching - フェッチを並列化するためにコンポーネントを再構築する
  • server-after-nonblocking - ノンブロッキング処理には after() を使用する

4. クライアントサイドデータフェッチ(中-高)

  • client-swr-dedup - 自動リクエスト重複排除には SWR を使用する
  • client-event-listeners - グローバルイベントリスナーを重複排除する

5. 再レンダリングの最適化(中)

  • rerender-defer-reads - コールバックでのみ使用する状態を購読しない
  • rerender-memo - 高コストな処理をメモ化されたコンポーネントに抽出する
  • rerender-dependencies - 副作用の依存関係にはプリミティブ値を使用する
  • rerender-derived-state - 生の値ではなく、派生した真偽値を購読する
  • rerender-functional-setstate - 安定したコールバックには関数型 setState を使用する
  • rerender-lazy-state-init - 高コストな値には関数を useState に渡す
  • rerender-transitions - 緊急でない更新には startTransition を使用する

6. レンダリングパフォーマンス(中)

  • rendering-animate-svg-wrapper - SVG 要素ではなく div ラッパーをアニメーションさせる
  • rendering-content-visibility - 長いリストには content-visibility を使用する
  • rendering-hoist-jsx - 静的な JSX をコンポーネントの外部に抽出する
  • rendering-svg-precision - SVG 座標の精度を下げる
  • rendering-hydration-no-flicker - クライアント専用データにはインラインスクリプトを使用する
  • rendering-activity - 表示/非表示には Activity コンポーネントを使用する
  • rendering-conditional-render - 条件付きレンダリングには && ではなく三項演算子を使用する

7. JavaScript パフォーマンス(低-中)

  • js-batch-dom-css - クラスまたは cssText を使用して CSS 変更をグループ化する
  • js-index-maps - 繰り返し検索には Map を構築する
  • js-cache-property-access - ループ内でオブジェクトのプロパティをキャッシュする
  • js-cache-function-results - 関数の結果をモジュールレベルの Map にキャッシュする
  • js-cache-storage - localStorage/sessionStorage の読み取りをキャッシュする
  • js-combine-iterations - 複数の filter/map を 1 つのループに結合する
  • js-length-check-first - 高コストな比較の前に配列の長さを確認する
  • js-early-exit - 関数から早期に return する
  • js-hoist-regexp - RegExp の生成をループの外に移動する
  • js-min-max-loop - sort ではなくループを使用して最小/最大値を求める
  • js-set-map-lookups - O(1) 検索には Set/Map を使用する
  • js-tosorted-immutable - 不変性のために toSorted() を使用する

8. 高度なパターン(低)

  • advanced-event-handler-refs - イベントハンドラーを ref に格納する
  • advanced-use-latest - 安定したコールバック参照には useLatest を使用する

使用方法

個別のルールファイルで詳細な説明とコード例を参照してください:

rules/async-parallel.md
rules/bundle-barrel-imports.md
rules/_sections.md

各ルールファイルには以下が含まれます:

  • それが重要な理由の簡単な説明
  • 説明付きの誤ったコード例
  • 説明付きの正しいコード例
  • 追加のコンテキストと参考文献

完全なコンパイル済みドキュメント

すべてのルールを展開した完全なガイド:AGENTS.md

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

ASoudy/AGS

Advanced JavaScript animation library skill for creating complex, high-performance web animations.

ASoudy/AGS

Astropy is the core Python package for astronomy, providing essential functionality for astronomical research and data analysis.

ASoudy/AGS

Build content-focused websites with Astro — zero JS by default, islands architecture, multi-framework components, and Markdown/MDX support.

ASoudy/AGS

One sentence - what this skill does and when to invoke it

ASoudy/AGS

Audit and fix animation performance issues including layout thrashing, compositor properties, scroll-linked motion, and blur effects. Use when animations stutter, transitions jank, or reviewing CSS/JS animation performance.

ASoudy/AGS

Internationalization and localization patterns. Detecting hardcoded strings, managing translations, locale files, RTL support.

ASoudy/AGS

Pull a YouTube video transcript into a queryable markdown vault with yt-dlp subtitle discovery, VTT cleanup, metadata frontmatter, and capture-seed stubs.

ASoudy/AGS

Expert in building portfolios that actually land jobs and clients - not just showing work, but creating memorable experiences. Covers developer portfolios, designer portfolios, creative portfolios, and portfolios that convert visitors into opportunities.

ASoudy/AGS

Generates high-converting Next.js/React landing pages with Tailwind CSS. Uses PAS, AIDA, and BAB frameworks for optimized copy/components (Heroes, Features, Pricing). Focuses on Core Web Vitals/SEO.

ASoudy/AGS

AI-powered animation tool for creating motion in logos, UI, icons, and social media assets.

ASoudy/AGS

CRITICAL: Use for Makepad animation system. Triggers on: makepad animation, makepad animator, makepad hover, makepad state, makepad transition, "from: { all: Forward", makepad pressed, makepad 动画, makepad 状态, makepad 过渡, makepad 悬停效果

ASoudy/AGS

Comprehensive patterns for Next.js 14+ App Router architecture, Server Components, and modern full-stack React development.

ASoudy/AGS

Next.js App Router principles. Server Components, data fetching, routing patterns.

ASoudy/AGS

Expert integration of Supabase Auth with Next.js App Router

ASoudy/AGS

React and Next.js 14+ application development with App Router, Server Components, TypeScript, Tailwind CSS, and modern frontend patterns.

ASoudy/AGS

Best practices for Remotion - Video creation in React

ASoudy/AGS

Generate walkthrough videos from Stitch projects using Remotion with smooth transitions, zooming, and text overlays

ASoudy/AGS

Seek and analyze video content using Memories.ai Large Visual Memory Model for persistent video intelligence

ASoudy/AGS

Writes complete, structured landing pages optimized for SEO ranking, AEO citation, and visitor conversion. Activate when the user wants to write or generate a landing page for a product, service, or offer.

ASoudy/AGS

Skill for discovering and researching autonomous AI agents, tools, and ecosystems using the AgentFolio directory.

関連スキル