jpskill.com
🛠️ 開発・MCP コミュニティ

react-native-specialist

React Nativeの新アーキテクチャやTurboModules、Fabric、Expoを活用し、ネイティブモジュールの開発とパフォーマンスを最適化するSkill。

📜 元の英語説明(参考)

Expert in React Native (New Architecture), TurboModules, Fabric, and Expo. Specializes in native module development and performance optimization.

🇯🇵 日本人クリエイター向け解説

一言でいうと

React Nativeの新アーキテクチャやTurboModules、Fabric、Expoを活用し、ネイティブモジュールの開発とパフォーマンスを最適化するSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o react-native-specialist.zip https://jpskill.com/download/6725.zip && unzip -o react-native-specialist.zip && rm react-native-specialist.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/6725.zip -OutFile "$d\react-native-specialist.zip"; Expand-Archive "$d\react-native-specialist.zip" -DestinationPath $d -Force; ri "$d\react-native-specialist.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して react-native-specialist.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → react-native-specialist フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-17
取得日時
2026-05-17
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

[Skill 名] react-native-specialist

React Native スペシャリスト

目的

「New Architecture」(Fabric/TurboModules)、JSI、およびExpoワークフローに特化したReact Native開発の専門知識を提供します。カスタムネイティブモジュールと最適化されたJavaScript-to-nativeブリッジを使用して、高性能なクロスプラットフォームモバイルアプリケーションを構築します。

使用する場面

  • New Architectureで高性能なReact Nativeアプリを構築する場合
  • カスタムNative ModulesまたはView Managers(TurboModules/Fabric)を作成する場合
  • Expoパイプライン(EAS Build、Updates、Config Plugins)を設定する場合
  • ネイティブクラッシュ(Xcode/Android Studio)またはブリッジのボトルネックをデバッグする場合
  • Old Architecture(Bridge)からNew Architecture(JSI)へ移行する場合
  • 複雑なネイティブSDK(Maps、WebRTC、Bluetooth)を統合する場合

例1:New Architectureへの移行

シナリオ: 大規模な本番アプリをBridgeからFabric/TurboModulesへ移行します。

実装:

  1. New Architectureのフラグを段階的に有効にしました。
  2. Native ModulesをTurboModulesに変換しました。
  3. 複雑なUIのためにFabricコンポーネントを実装しました。
  4. Codegenを使用してネイティブブリッジコードを生成しました。
  5. New Architectureを有効にして徹底的にテストしました。

結果:

  • UIレンダリングが40%高速化しました。
  • バンドルサイズが30%縮小しました。
  • ネイティブ境界全体で型安全性が向上しました。
  • クラッシュレポートとデバッグが改善されました。

例2:カスタムNative Module

シナリオ: フィットネスアプリのためにBluetooth Low Energyを統合する必要があります。

実装:

  1. TypeScript Native Moduleインターフェースを作成しました。
  2. ネイティブコード(iOSはSwift、AndroidはKotlin)を実装しました。
  3. クロスプラットフォームアクセス用にRNTurboModuleを公開しました。
  4. 適切なメモリ管理とライフサイクル処理を追加しました。
  5. 包括的なエラー処理を実装しました。

結果:

  • BLE操作が両プラットフォームでシームレスに動作しました。
  • 型安全なブリッジによりランタイムエラーが防止されました。
  • 従来のネイティブモジュールよりもコードが50%削減されました。
  • RNのアップグレードを通じて維持されました。

例3:パフォーマンス最適化

シナリオ: アプリがぎこちないスクロールとメモリの問題を抱えています。

実装:

  1. Hermesエンジンを有効にしました。
  2. FlatListをFlashListに置き換えました。
  3. メモ化(useMemo、useCallback)を実装しました。
  4. 画像と重いコンポーネントの遅延読み込みを追加しました。
  5. ネイティブブリッジ通信を最適化しました。

結果:

  • スクロールが常に60fpsになりました。
  • メモリ使用量が40%削減されました。
  • アプリの起動時間が35%短縮されました。
  • クラッシュ率が60%削減されました。

ベストプラクティス

アーキテクチャ

  • New Architecture: Fabric/TurboModulesを有効にして使用します。
  • Native Modules: 型安全のためにCodegenを使用します。
  • Navigation: React NavigationまたはExpo Routerを使用します。
  • State Management: 適切なソリューション(Zustand、Redux)を選択します。

パフォーマンス

  • Hermes: 起動とランタイムの改善のために有効にします。
  • Memoization: useMemo、useCallback、React.memoを使用します。
  • Lists: 大規模なリストにはFlashListを使用します。
  • Images: 遅延読み込みと適切なキャッシュを行います。

ネイティブ統合

  • Lifecycle Management: アプリの状態変化を処理します。
  • Error Boundaries: ネイティブエラーを適切に捕捉します。
  • Permissions: 権限を要求し、適切に処理します。
  • Testing: 両プラットフォームで定期的にテストします。

開発

  • Expo Workflow: 開発を高速化するためにExpoを使用します。
  • EAS Build: CI/CDビルドのために使用します。
  • Updates: OTA(Over-the-Air)アップデートのためにEAS Updateを使用します。
  • TypeScript: すべてのコードにTypeScriptを使用します。


2. 意思決定フレームワーク

アーキテクチャの選択

どのアーキテクチャを使用するか?
│
├─ **New Architecture (0.76+のデフォルト)**
│  ├─ **TurboModules:** 遅延ロードされるネイティブモジュール (同期/非同期)。
│  ├─ **Fabric:** UI用のC++シャドーツリー (ブリッジのシリアライゼーションなし)。
│  ├─ **Codegen:** ネイティブ <-> JS通信のための型安全な仕様。
│  └─ **Bridgeless Mode:** レガシーブリッジを完全に削除します。
│
└─ **Old Architecture (レガシー)**
   ├─ **Bridge:** 非同期JSONシリアライゼーション (大量データには遅い)。
   └─ **Maintenance:** 未移行のレガシーライブラリのみ。

Expo vs CLI

機能 Expo (Managed) React Native CLI (Bare)
セットアップ 即時 (create-expo-app) 複雑 (JDK, Xcode, Pods)
ネイティブコード Config Plugins (ネイティブファイルを自動変更) 直接ファイル編集 (AppDelegate.m)
アップグレード npx expo install --fix (安定したセット) 手動での差分比較 (Upgrade Helper)
ビルド EAS Build (クラウド) ローカルまたはCI (Fastlane)
アップデート EAS Update (OTA) CodePush (Microsoft)

パフォーマンス戦略

  1. JSI: 直接C++呼び出し。JSONシリアライゼーションなし。
  2. Reanimated: UIスレッドアニメーション (Worklets)。
  3. FlashList: ビューのリサイクル (FlatListを置き換える)。
  4. Hermes: バイトコードの事前コンパイル (即時起動)。

危険信号 → mobile-developer (ネイティブ) にエスカレート:

  • React Nativeエンジンコア (C++) の変更
  • 曖昧なProGuard/R8クラッシュのデバッグ
  • 低レベルのMetal/OpenGLレンダラーをゼロから作成する


3. コアワークフロー

ワークフロー1:TurboModuleの作成 (New Arch)

目標: JSIを介してネイティブのバッテリーレベルに同期的にアクセスします。

手順:

  1. 仕様の定義 (NativeBattery.ts)

    import type { TurboModule } from 'react-native';
    import { TurboModuleRegistry } from 'react-native';
    
    export interface Spec extends TurboModule {
      getBatteryLevel(): number;
    }
    
    export default TurboModuleRegistry.getEnforcing<Spec>('RTNBattery');
  2. コードの生成

    • yarn codegenを実行します。C++インターフェースが生成されます。
  3. iOSの実装 (RTNBattery.mm)

    - (NSNumber *)getBatteryLevel {
      [UIDevice currentDevice].batteryMonitoringEnabled = YES;
      return @([UIDevice currentDevice].batteryLevel);
    }
    
    - (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
        (const facebook::react::ObjCTurboModule::InitParams &)params {
      return std::make_shared<facebook::react::NativeBatterySpecJSI>(params);
    }
  4. Androidの実装 (BatteryModule.kt)

    class BatteryModule(context: ReactApplicationContext) : NativeBatterySpec(context) {
      override fu
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

React Native Specialist

Purpose

Provides React Native development expertise specializing in the "New Architecture" (Fabric/TurboModules), JSI, and Expo workflows. Builds high-performance cross-platform mobile applications with custom native modules and optimized JavaScript-to-native bridges.

When to Use

  • Building high-performance React Native apps with the New Architecture
  • Writing custom Native Modules or View Managers (TurboModules/Fabric)
  • Configuring Expo pipelines (EAS Build, Updates, Config Plugins)
  • Debugging native crashes (Xcode/Android Studio) or bridge bottlenecks
  • Migrating from Old Architecture (Bridge) to New Architecture (JSI)
  • Integrating complex native SDKs (Maps, WebRTC, Bluetooth)

Examples

Example 1: New Architecture Migration

Scenario: Migrating a large production app from Bridge to Fabric/TurboModules.

Implementation:

  1. Enabled New Architecture flags progressively
  2. Converted Native Modules to TurboModules
  3. Implemented Fabric components for complex UIs
  4. Used Codegen to generate native bridge code
  5. Tested thoroughly with new architecture enabled

Results:

  • 40% faster UI rendering
  • 30% smaller bundle size
  • Improved type safety across native boundaries
  • Better crash reporting and debugging

Example 2: Custom Native Module

Scenario: Need to integrate Bluetooth Low Energy for a fitness app.

Implementation:

  1. Created TypeScript Native Module interface
  2. Implemented native code (Swift for iOS, Kotlin for Android)
  3. Exposed RNTurboModule for cross-platform access
  4. Added proper memory management and lifecycle handling
  5. Implemented comprehensive error handling

Results:

  • BLE operations working seamlessly on both platforms
  • Type-safe bridge prevents runtime errors
  • 50% less code than traditional native modules
  • Maintained through RN upgrades

Example 3: Performance Optimization

Scenario: App experiencing janky scrolling and memory issues.

Implementation:

  1. Enabled Hermes engine
  2. Replaced FlatList with FlashList
  3. Implemented memoization (useMemo, useCallback)
  4. Added lazy loading for images and heavy components
  5. Optimized native bridge communication

Results:

  • Scrolling now consistently 60fps
  • Memory usage reduced by 40%
  • App launch time reduced by 35%
  • Crash rate reduced by 60%

Best Practices

Architecture

  • New Architecture: Enable and use Fabric/TurboModules
  • Native Modules: Use Codegen for type safety
  • Navigation: Use React Navigation or Expo Router
  • State Management: Choose appropriate solution (Zustand, Redux)

Performance

  • Hermes: Enable for better startup and runtime
  • Memoization: Use useMemo, useCallback, React.memo
  • Lists: Use FlashList for large lists
  • Images: Lazy load and cache appropriately

Native Integration

  • Lifecycle Management: Handle app state changes
  • Error Boundaries: Catch native errors gracefully
  • Permissions: Request and handle gracefully
  • Testing: Test on both platforms regularly

Development

  • Expo Workflow: Use Expo for faster development
  • EAS Build: Use for CI/CD builds
  • Updates: Use EAS Update for over-the-air updates
  • TypeScript: Use for all code


2. Decision Framework

Architecture Selection

Which architecture to use?
│
├─ **New Architecture (Default for 0.76+)**
│  ├─ **TurboModules:** Lazy-loaded native modules (Sync/Async).
│  ├─ **Fabric:** C++ Shadow Tree for UI (No bridge serialization).
│  ├─ **Codegen:** Type-safe spec for Native <-> JS communication.
│  └─ **Bridgeless Mode:** Removes the legacy bridge entirely.
│
└─ **Old Architecture (Legacy)**
   ├─ **Bridge:** Async JSON serialization (Slow for large data).
   └─ **Maintenance:** Only for unmigrated legacy libraries.

Expo vs CLI

Feature Expo (Managed) React Native CLI (Bare)
Setup Instant (create-expo-app) Complex (JDK, Xcode, Pods)
Native Code Config Plugins (Auto-modifies native files) Direct file editing (AppDelegate.m)
Upgrades npx expo install --fix (Stable sets) Manual diffing (Upgrade Helper)
Builds EAS Build (Cloud) Local or CI (Fastlane)
Updates EAS Update (OTA) CodePush (Microsoft)

Performance Strategy

  1. JSI: Direct C++ calls. No JSON serialization.
  2. Reanimated: UI thread animations (Worklets).
  3. FlashList: Recycling views (replaces FlatList).
  4. Hermes: Bytecode precompilation (Instant startup).

Red Flags → Escalate to mobile-developer (Native):

  • Modifying the React Native engine core (C++)
  • Debugging obscure ProGuard/R8 crashes
  • Writing low-level Metal/OpenGL renderers from scratch


3. Core Workflows

Workflow 1: Creating a TurboModule (New Arch)

Goal: Access native battery level synchronously via JSI.

Steps:

  1. Define Spec (NativeBattery.ts)

    import type { TurboModule } from 'react-native';
    import { TurboModuleRegistry } from 'react-native';
    
    export interface Spec extends TurboModule {
      getBatteryLevel(): number;
    }
    
    export default TurboModuleRegistry.getEnforcing<Spec>('RTNBattery');
  2. Generate Code

    • Run yarn codegen. Generates C++ interfaces.
  3. Implement iOS (RTNBattery.mm)

    - (NSNumber *)getBatteryLevel {
      [UIDevice currentDevice].batteryMonitoringEnabled = YES;
      return @([UIDevice currentDevice].batteryLevel);
    }
    
    - (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
        (const facebook::react::ObjCTurboModule::InitParams &)params {
      return std::make_shared<facebook::react::NativeBatterySpecJSI>(params);
    }
  4. Implement Android (BatteryModule.kt)

    class BatteryModule(context: ReactApplicationContext) : NativeBatterySpec(context) {
      override fun getName() = "RTNBattery"
    
      override fun getBatteryLevel(): Double {
        val manager = context.getSystemService(Context.BATTERY_SERVICE) as BatteryManager
        return manager.getIntProperty(BatteryManager.BATTERY_PROPERTY_CAPACITY).toDouble()
      }
    }


Workflow 3: Reanimated Worklets

Goal: 60fps drag gesture on the UI thread.

Steps:

  1. Setup

    import { useSharedValue, useAnimatedStyle, withSpring } from 'react-native-reanimated';
    import { GestureDetector, Gesture } from 'react-native-gesture-handler';
  2. Implementation

    function Ball() {
      const offset = useSharedValue({ x: 0, y: 0 });
    
      const gesture = Gesture.Pan()
        .onUpdate((e) => {
          // Runs on UI thread
          offset.value = { x: e.translationX, y: e.translationY };
        })
        .onEnd(() => {
          offset.value = withSpring({ x: 0, y: 0 }); // Snap back
        });
    
      const style = useAnimatedStyle(() => ({
        transform: [{ translateX: offset.value.x }, { translateY: offset.value.y }]
      }));
    
      return (
        <GestureDetector gesture={gesture}>
          <Animated.View style={[styles.ball, style]} />
        </GestureDetector>
      );
    }


5. Anti-Patterns & Gotchas

❌ Anti-Pattern 1: "Bridge Crossing" Animations

What it looks like:

  • Using Animated.timing with useNativeDriver: false.
  • Calculating layout in useEffect and setState.

Why it fails:

  • Runs on JS thread. Drops frames if JS is busy (fetching data).

Correct approach:

  • Use Reanimated or useNativeDriver: true.

❌ Anti-Pattern 2: Large Bundles without Hermes

What it looks like:

  • JSC (JavaScriptCore) used on Android.
  • Startup takes 5 seconds.

Why it fails:

  • JSC parses JS at runtime. Hermes runs precompiled bytecode.

Correct approach:

  • Enable Hermes in podfile / build.gradle (Default in new Expo).

❌ Anti-Pattern 3: Styles in Render

What it looks like:

  • style={{ width: 100, height: 100 }}

Why it fails:

  • Creates new object every render. Forces diffing.

Correct approach:

  • StyleSheet.create or const style = { ... } outside component.


7. Quality Checklist

Performance:

  • [ ] Hermes: Enabled.
  • [ ] Memoization: useMemo/useCallback used for expensive props.
  • [ ] Lists: FlashList used instead of FlatList.

Architecture:

  • [ ] New Arch: Fabric/TurboModules enabled (if libraries support).
  • [ ] Navigation: Native screens used (React Navigation / Expo Router).

Native:

  • [ ] Permissions: Handled gracefully (not crashing if denied).
  • [ ] Upgrades: React Native version is recent (within 2 minor versions).

Anti-Patterns

Architecture Anti-Patterns

  • Bridge Overuse: Heavy use of Old Architecture bridge - migrate to New Architecture
  • Unnecessary Native: Pure JS logic wrapped in native - keep it simple
  • State Management Sprawl: Multiple conflicting state solutions - standardize on one
  • Navigation Nesting: Deeply nested navigators - keep navigation shallow

Performance Anti-Patterns

  • Re-render Everything: No React.memo or optimization - optimize component re-renders
  • FlatList Abuse: Using FlatList for all lists - use appropriate list components
  • Memory Leaks: Not cleaning up subscriptions - use cleanup in useEffect
  • Bridge Bottleneck: Heavy bridge communication - minimize cross-bridge calls

Development Anti-Patterns

  • Debug Mode in Production: Not building for production - always test production builds
  • No Hermes: Not using Hermes engine - enable for better performance
  • Large Bundles: No bundle optimization - use RAM bundles and compression
  • Manual Linking: Manual native linking when not needed - use autolinking

Testing Anti-Patterns

  • No E2E Testing: Only unit tests - add Maestro or Detox tests
  • Platform Conditionals: Too many platform checks - abstract platform differences
  • Hardcoded Dimensions: Fixed pixel values - use relative sizing
  • Missing testID: No accessibility identifiers - add testID for testing