Communitygithub.com

ComeOnOliver/skillshub

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

skillshub とは?

このスキルは、Vercel が管理する React および Next.js アプリケーション向けの包括的なパフォーマンス最適化ガイドです。8 つのカテゴリに分類された 45 のルールが、優先順位(影響度)順に整理されており、自動リファクタリングやコード生成の指針として機能します。ウォーターフォールの解消、バンドルサイズの最適化、サーバーサイドパフォーマンス、クライアントサイドのデータフェッチ、再レンダリングの最適化、レンダリングパフォーマンス、JavaScript パフォーマンス、高度なパターンといった領域をカバーします。各ルールは個別のマークダウンファイルとして提供され、「なぜ重要か」「誤ったコード例」「正しいコード例」が詳しく解説されています。このスキルは、React コンポーネントや Next.js ページの新規作成、データフェッチの実装、パフォーマンスレビュー、バンドルサイズやロード時間の最適化など、幅広い開発タスクにおいて参照されるべきものです。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ComeOnOliver/skillshub/tree/HEAD/skills/jarrodwatts/claude-code-config/vercel-react-best-practices

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

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

ドキュメント

Vercel React ベストプラクティス

React および Next.js アプリケーション向けの包括的なパフォーマンス最適化ガイド(Vercel 管理)。優先度別に分類された 8 カテゴリ、45 のルールを含み、自動リファクタリングやコード生成の指針となります。

適用タイミング

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

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

ルールカテゴリ(優先度順)

優先度カテゴリ影響度プレフィックス
1ウォーターフォールの解消CRITICALasync-
2バンドルサイズの最適化CRITICALbundle-
3サーバーサイドパフォーマンスHIGHserver-
4クライアントサイドデータフェッチMEDIUM-HIGHclient-
5再レンダリングの最適化MEDIUMrerender-
6レンダリングパフォーマンスMEDIUMrendering-
7JavaScript パフォーマンスLOW-MEDIUMjs-
8高度なパターンLOWadvanced-

クイックリファレンス

1. ウォーターフォールの解消(CRITICAL)

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

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

  • bundle-barrel-imports - バレルファイルを避け、直接インポートする
  • bundle-dynamic-imports - 重いコンポーネントには next/dynamic を使用する
  • bundle-defer-third-party - アナリティクス/ロギングはハイドレーション後にロードする
  • bundle-conditional - 機能が有効化されたときのみモジュールをロードする
  • bundle-preload - ホバー時/フォーカス時にプリロードして知覚速度を向上する

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

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

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

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

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

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

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

  • 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 パフォーマンス(LOW-MEDIUM)

  • 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. 高度なパターン(LOW)

  • 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.

ComeOnOliver/skillshub

Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.

ComeOnOliver/skillshub

Next.js 16+ 和 Turbopack — 增量打包、文件系统缓存、开发速度,以及何时使用 Turbopack 与 webpack。

ComeOnOliver/skillshub

SwiftUI architecture patterns, state management with @Observable, view composition, navigation, performance optimization, and modern iOS/macOS UI best practices.

ComeOnOliver/skillshub

See, Understand, Act on video and audio. See- ingest from local files, URLs, RTSP/live feeds, or live record desktop; return realtime context and playable stream links. Understand- extract frames, build visual/semantic/temporal indexes, and search moments with timestamps and auto-clips. Act- transcode and normalize (codec, fps, resolution, aspect ratio), perform timeline edits (subtitles, text/image overlays, branding, audio overlays, dubbing, translation), generate media assets (image, audio, video), and create real time alerts for events from live streams or desktop capture.

ComeOnOliver/skillshub

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

ComeOnOliver/skillshub

Next.js 15 애플리케이션을 위한 프론트엔드 개발 가이드라인. React 19, TypeScript, Shadcn/ui, Tailwind CSS를 사용한 모던 패턴. Server Components, Client Components, App Router, 파일 구조, Shadcn/ui 컴포넌트, 성능 최적화, TypeScript 모범 사례 포함. 컴포넌트, 페이지, 기능 생성, 데이터 페칭, 스타일링, 라우팅, 프론트엔드 코드 작업 시 사용.

ComeOnOliver/skillshub

Provides Tamagui patterns for config v4, compiler optimization, styled context, and cross-platform styling. Must use when working with Tamagui projects (tamagui.config.ts, @tamagui imports).

ComeOnOliver/skillshub

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.

ComeOnOliver/skillshub

Create high-converting, visually distinctive landing pages. Use when building marketing pages, product launches, SaaS homepages, or any single-page conversion-focused website. Guides section-by-section composition with anti-AI-slop principles.

ComeOnOliver/skillshub

Auto-loaded context for Portfolio Buddy 2 development. Use for ANY task involving: React 19 development, TypeScript, portfolio analysis features, metrics calculations, trading strategy comparison, or working with the Portfolio Buddy 2 codebase. Contains tech stack, known issues, and architectural constraints.

ComeOnOliver/skillshub

Next.js development tooling via MCP. Inspect routes, components, build info, and debug Next.js apps. Use when working on Next.js applications, debugging routing, or inspecting app structure. NOT for general React or non-Next.js projects.

ComeOnOliver/skillshub

Implement UI using Shadcn MCP (atoms/theme) and 21st.dev MCP (complex sections). Use when adding buttons, layouts, or generating landing pages.

ComeOnOliver/skillshub

A conceptual skill for building an API client in Next.js that handles JWT tokens

ComeOnOliver/skillshub

Best practices and patterns for Next.js App Router, Server Actions, and Routing in this project.

ComeOnOliver/skillshub

The Design System, Theme, and UX rules for the Physical AI Hub.

ComeOnOliver/skillshub

Comprehensive frontend development skill for building modern, performant web applications using ReactJS, NextJS, TypeScript, Tailwind CSS. Includes component scaffolding, performance optimization, bundle analysis, and UI best practices. Use when developing frontend features, optimizing performance, implementing UI/UX designs, managing state, or reviewing frontend code.

ComeOnOliver/skillshub

This document captures learnings from fixing keyboard navigation issues when floating components (Select, DropdownMenu, Popover) have CSS open/close animations.

ComeOnOliver/skillshub

Build Next.js 16 applications with correct patterns and distinctive design. Use when creating pages, layouts, dynamic routes, upgrading from Next.js 15, or implementing proxy.ts. Covers breaking changes (async params/searchParams, Turbopack, cacheComponents) and frontend aesthetics. NOT when building non-React or backend-only applications.

ComeOnOliver/skillshub

Comprehensive Framer Motion animation library for React. Covers motion components, variants, gestures, page transitions, and scroll animations. Use when adding animations to React/Next.js applications.

ComeOnOliver/skillshub

Build interfaces that resonate, not just render. This skill enforces bold, intentional

関連スキル