Officialコーディング&開発github.com

vercel-react-native-skills

React Native と Expo のベストプラクティスに基づき、高性能なモバイルアプリを構築するためのスキルです。

vercel-react-native-skills とは?

このスキルは、React Native および Expo を使用したモバイルアプリ開発において、パフォーマンス、アニメーション、UI パターン、プラットフォーム固有の最適化にわたる包括的なベストプラクティスを提供します。FlashList を使用したリストの仮想化、Reanimated による効率的なアニメーション、ネイティブナビゲーターの活用など、各ルールは重要度に応じて優先順位付けされ、コード例とともに詳細に説明されています。開発者はこれらのルールに従うことで、アプリの応答性、滑らかさ、保守性を大幅に向上させることができます。特に大量のデータを扱うリスト画面や複雑なアニメーションを含むアプリで有効です。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/vercel-labs/agent-skills/tree/main/skills/react-native-skills

Installed? Explore more コーディング&開発 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

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

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

ドキュメント

React Native スキル

React Native および Expo アプリケーションのための包括的なベストプラクティスです。パフォーマンス、アニメーション、UI パターン、プラットフォーム固有の最適化にわたるルールを含みます。

適用タイミング

以下の状況でこれらのガイドラインを参照してください:

  • React Native または Expo アプリの構築時
  • リストやスクロールのパフォーマンス最適化時
  • Reanimated を使用したアニメーションの実装時
  • 画像やメディアの操作時
  • ネイティブモジュールやフォントの設定時
  • ネイティブ依存関係を持つモノレポプロジェクトの構造化時

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

優先度カテゴリ影響度プレフィックス
1リストパフォーマンス重大list-performance-
2アニメーション高animation-
3ナビゲーション高navigation-
4UI パターン高ui-
5状態管理中react-state-
6レンダリング中rendering-
7モノレポ中monorepo-
8設定低fonts-, imports-

クイックリファレンス

1. リストパフォーマンス(重大)

  • list-performance-virtualize - 大きなリストには FlashList を使用する
  • list-performance-item-memo - リストアイテムコンポーネントをメモ化する
  • list-performance-callbacks - コールバック参照を安定化する
  • list-performance-inline-objects - インラインなスタイルオブジェクトを避ける
  • list-performance-function-references - 関数をレンダリング外に抽出する
  • list-performance-images - リスト内の画像を最適化する
  • list-performance-item-expensive - 重い処理をアイテム外に移動する
  • list-performance-item-types - 異種リストにはアイテムタイプを使用する

2. アニメーション(高)

  • animation-gpu-properties - transform と opacity のみアニメーションさせる
  • animation-derived-value - 計算されたアニメーションには useDerivedValue を使用する
  • animation-gesture-detector-press - Pressable の代わりに Gesture.Tap を使用する

3. ナビゲーション(高)

  • navigation-native-navigators - JS ナビゲーターよりネイティブスタックとネイティブタブを使用する

4. UI パターン(高)

  • ui-expo-image - すべての画像に expo-image を使用する
  • ui-image-gallery - 画像ライトボックスには Galeria を使用する
  • ui-pressable - TouchableOpacity の代わりに Pressable を使用する
  • ui-safe-area-scroll - ScrollView でセーフエリアを処理する
  • ui-scrollview-content-inset - ヘッダーには contentInset を使用する
  • ui-menus - ネイティブのコンテキストメニューを使用する
  • ui-native-modals - 可能な場合はネイティブモーダルを使用する
  • ui-measure-views - measure() ではなく onLayout を使用する
  • ui-styling - StyleSheet.create または Nativewind を使用する

5. 状態管理(中)

  • react-state-minimize - 状態購読を最小化する
  • react-state-dispatcher - コールバックにはディスパッチャーパターンを使用する
  • react-state-fallback - 最初のレンダリングでフォールバックを表示する
  • react-compiler-destructure-functions - React Compiler のために分割代入する
  • react-compiler-reanimated-shared-values - コンパイラで共有値を扱う

6. レンダリング(中)

  • rendering-text-in-text-component - テキストは Text コンポーネントでラップする
  • rendering-no-falsy-and - 条件付きレンダリングに偽の && を使用しない

7. モノレポ(中)

  • monorepo-native-deps-in-app - ネイティブ依存関係はアプリパッケージに保持する
  • monorepo-single-dependency-versions - パッケージ間で単一バージョンを使用する

8. 設定(低)

  • fonts-config-plugin - カスタムフォントには設定プラグインを使用する
  • imports-design-system-folder - デザインシステムのインポートを整理する
  • js-hoist-intl - Intl オブジェクトの作成をホイストする

使い方

個別のルールファイルには、詳細な説明とコード例が含まれています:

rules/list-performance-virtualize.md
rules/animation-gpu-properties.md

各ルールファイルの内容:

  • なぜ重要なのかの簡単な説明
  • 誤ったコード例とその説明
  • 正しいコード例とその説明
  • 追加のコンテキストと参照

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

すべてのルールを展開した完全ガイドは AGENTS.md をご覧ください。

Individual skills in this repo

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

deploy-to-vercel

Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment".

vercel-cli-with-tokens

Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g.

vercel-composition-patterns

React composition patterns that scale. Use when refactoring components with

vercel-labs/vercel-composition-patterns

React composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or designing reusable APIs. Triggers on tasks involving compound components, render props, context providers, or component architecture. Includes React 19 API changes.

vercel-labs/vercel-react-best-practices

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

vercel-labs/vercel-react-native-skills

React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.

vercel-labs/vercel-react-view-transitions

Guide for implementing smooth, native-feeling animations using React's View Transition API (`<ViewTransition>` component, `addTransitionType`, and CSS view transition pseudo-elements). Use this skill whenever the user wants to add page transitions, animate route changes, create shared element animations, animate enter/exit of components, animate list reorder, implement directional (forward/back) navigation animations, or integrate view transitions in Next.js. Also use when the user mentions view transitions, `startViewTransition`, `ViewTransition`, transition types, or asks about animating between UI states in React without third-party animation libraries.

vercel-optimize

Use for Vercel cost and performance optimization on deployed projects, especially Next.js, SvelteKit, Nuxt, and limited Astro apps. Collect Vercel metrics, usage, project config, and code scan results first; investigate only metric-backed candidates; produce ranked recommendations grounded in verified files and version-aware Vercel/framework docs. Trigger for Vercel bill reduction, slow or expensive routes, caching opportunities, Function Invocations, Build Minutes, Fast Data Transfer, Core Web Vitals, Bot Management, Fluid compute, or cost breakdown requests.

vercel-react-best-practices

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

web-design-guidelines

Review UI code for Web Interface Guidelines compliance. Use when asked to

writing-guidelines

Review docs/prose for Writing Guidelines compliance. Use when asked to

関連スキル