本文へ移動
cccskills
無料GitHub で公開

react-native

Build production React Native apps with Expo SDK 53+, Expo Router (file-based navigation), New Architecture (Fabric + TurboModules), FlashList, Reanimated 4, Zustand for state, Hermes, EAS Build, and App Store/Play Store deployment.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md11.9 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

React Native Architect

Build production React Native apps with Expo, New Architecture, and modern navigation.

Workflow

  1. Scaffold — npx create-expo-app@latest MyApp --template blank-typescript, configure SDK 53+
  2. Navigation — Choose between Expo Router (greenfield Expo) or React Navigation v7 (bare RN / brownfield). Set up layouts, typed routes, deep linking
  3. State management — Zustand for local client state, TanStack Query for server state. Avoid Redux unless dealing with massive synchronous state trees
  4. New Architecture — Ensure Fabric + TurboModules enabled (default in SDK 53+). Verify third-party lib compatibility
  5. Lists — Replace all FlatLists with FlashList from Shopify. Configure estimatedItemSize. Optimize renderItem with React.memo
  6. Animations — Reanimated 4 for gesture-driven animations. Use useSharedValue + useAnimatedStyle instead of Animated API
  7. Images — expo-image with cached, resized variants. Never bare <Image> without dimensions
  8. Notifications — expo-notifications for push. Handle foreground, background, tap-to-navigate
  9. Performance — Enable Hermes, lazy-load tab screens, freeze inactive screens via react-native-screens, InteractionManager.runAfterInteractions for heavy ops
  10. Ship — eas build --platform all --profile production, eas submit, configure CI/CD with GitHub Actions

Navigation Decision

ScenarioRecommended
Greenfield Expo appExpo Router (file-based, typed routes, deep links)
Bare React NativeReact Navigation v7 (imperative, full control)
Brownfield / native modulesReact Navigation v7
Web + mobileExpo Router (SSR, SEO)

Expo Router (file-based)

app/
├ _layout.tsx       # Root layout (tabs, stack)
├ index.tsx         # /
├ (tabs)/
│   ├ _layout.tsx   # Tab config
│   ├ feed.tsx      # /feed
│   └ profile.tsx   # /profile
├ product/
│   ├ [id].tsx      # /product/:id
│   └ review.tsx    # /product/:id/review
└ auth/
    ├ login.tsx     # /auth/login
    └ signup.tsx    # /auth/signup

Deep links work automatically. Universal links with app.json scheme config.

Typed Routes (Expo Router v4+)

// app/product/[id].tsx
import { useLocalSearchParams } from 'expo-router'

export default function ProductScreen() {
  const { id } = useLocalSearchParams<{ id: string }>()
  // id is typed as string
}

React Navigation v7

type RootStackParamList = {
  Home: undefined
  ProductDetail: { id: string }
  Cart: undefined
}

const Stack = createNativeStackNavigator<RootStackParamList>()

export function RootNavigator() {
  return (
    <NavigationContainer
      linking={{
        prefixes: ['myapp://', 'https://myapp.com'],
        config: {
          screens: {
            Home: '',
            ProductDetail: 'product/:id',
            Cart: 'cart',
          },
        },
      }}>
      <Stack.Navigator screenOptions={{ headerShown: false }}>
        <Stack.Screen name="Home" component={HomeScreen} />
        <Stack.Screen name="ProductDetail" component={ProductDetailScreen} />
        <Stack.Screen name="Cart" component={CartScreen} />
      </Stack.Navigator>
    </NavigationContainer>
  )
}

State Management

ScenarioRecommended
Simple, small appReact Context + useState
Medium appZustand (minimal boilerplate, hooks-based)
Large app, complex stateRedux Toolkit (mature ecosystem, DevTools)
Server stateTanStack Query (caching, refetch, pagination)

Zustand (preferred for most apps)

import { create } from 'zustand'
import { persist, createJSONStorage } from 'zustand/middleware'
import AsyncStorage from '@react-native-async-storage/async-storage'

interface CartStore {
  items: CartItem[]
  total: number
  addItem: (item: Product) => void
  removeItem: (id: string) => void
  clear: () => void
}

export const useCartStore = create<CartStore>()(
  persist(
    (set, get) => ({
      items: [],
      total: 0,
      addItem: (product) => set((state) => ({
        items: [...state.items, { ...product, quantity: 1 }],
        total: state.total + product.price,
      })),
      removeItem: (id) => set((state) => ({
        items: state.items.filter((i) => i.id !== id),
        total: state.items.filter((i) => i.id !== id).reduce((s, i) => s + i.price, 0),
      })),
      clear: () => set({ items: [], total: 0 }),
    }),
    { name: 'cart-storage', storage: createJSONStorage(() => AsyncStorage) }
  )
)

Performance Rules

RuleImplementation
Enable Hermeshermes: true in metro.config.js
Use FlashList (Shopify)Replaces FlatList — built-in recycling, better perf
InteractionManagerInteractionManager.runAfterInteractions(() => fetchData())
Memoize componentsReact.memo on screen components, list items
Lazy load tab screenslazy: true (default in Expo Router)
Image optimizationexpo-image with cached, resized images
Avoid inline functions in renderExtract handlers, use useCallback
Freeze inactive screensreact-native-screens detaches from native hierarchy

FlashList (preferred over FlatList)

import { FlashList } from '@shopify/flash-list'

<FlashList
  data={items}
  renderItem={renderItem}
  keyExtractor={(item) => item.id}
  estimatedItemSize={120}
/>

New Architecture

Enabled by default in Expo SDK 53+.

ComponentOldNew
Native modulesNativeModules proxyTurboModules (typed, synchronous)
View managerFabric not usedFabric (synchronous rendering)
State updatesBridge (async serialization)JSI (synchronous, no serialization)

Ensure compatibility:

// app.json
{
  "expo": {
    "platforms": ["ios", "android"]
  }
}

Reanimated 4

import { useSharedValue, useAnimatedStyle, withSpring } from 'react-native-reanimated'

export function AnimatedCard() {
  const scale = useSharedValue(1)

  const animatedStyle = useAnimatedStyle(() => ({
    transform: [{ scale: scale.value }],
  }))

  return (
    <Animated.View
      style={animatedStyle}
      onTouchStart={() => { scale.value = withSpring(0.95) }}
      onTouchEnd={() => { scale.value = withSpring(1) }}
    />
  )
}

Deep Linking

{
  "expo": {
    "scheme": "myapp",
    "plugins": [["expo-linking"]]
  }
}

Always implement a fallback for malformed links.

Push Notifications

import * as Notifications from 'expo-notifications'

const { status } = await Notifications.requestPermissionsAsync()
if (status !== 'granted') return

const token = await Notifications.getExpoPushTokenAsync()

Notifications.addNotificationResponseReceivedListener((response) => {
  const { screen, params } = response.notification.request.content.data
  router.push({ pathname: screen as any, params: params as any })
})

Deployment

eas build --platform all --profile production
eas submit --platform ios
eas submit --platform android

Error Handling

ScenarioCauseFix
White screen on launchUnhandled JS exceptionWrap root with ErrorBoundary, add Sentry
Deep link opens wrong screenMissing or incorrect route configVerify app.json scheme + linking config match
Push notification tap does nothingNo notification response listenerRegister addNotificationResponseReceivedListener
FlashList blank / slowMissing estimatedItemSizeMeasure or estimate item height, pass to prop
Hermes crash on third-party libLib not Hermes-compatibleCheck lib docs, use Hermes-compatible version
EAS build fails on iOSMissing provisioning profileRun eas credentials, eas device:create
AsyncStorage 64KB limit on AndroidStorage exceeds limitMigrate to MMKV (react-native-mmkv)
Reanimated 4 worklet errorUsing non-worklet code inside useAnimatedStyleOnly use Reanimated compatible functions inside worklets
TurboModule returns undefinedFabric/TM not enabledVerify newArchEnabled: true in app.json
Navigation state lost on restartNo persistenceUse persistNavigationState from expo-router or React Navigation v7 storage

Production Checklist

  • Hermes engine enabled
  • FlashList (not FlatList) for all lists
  • Images use expo-image with resize
  • React.memo on list items and screens
  • Navigation screens lazy-loaded
  • Deep linking configured and tested
  • Push notifications configured
  • MMKV or AsyncStorage for persistence
  • Error boundary wrapping root navigator
  • Sentry or similar crash reporting
  • EAS Build for CI/CD
  • New Architecture verified (no TurboModule issues)
  • App Store / Play Store screenshots and metadata
  • InteractionManager.runAfterInteractions for heavy operations
  • expo-constants env segregation (dev / staging / prod)

Anti-Patterns

Anti-patternFix
ScrollView for long listsFlashList with virtualization
No HermesEnable Hermes — 2x startup improvement
Inline arrow functions in renderuseCallback or extract to component
FlatList without optimizationUse FlashList instead
Deep linking as afterthoughtConfigure at project start
No error boundaryUnhandled JS error = white screen
navigation.getParent() chainsRestructure to flat navigation hierarchy
setState in navigation handlersNavigate first, fetch on screen mount
Using bare <Image> without dimensionsexpo-image with explicit width/height
Zustand store split across 10 filesKeep logically cohesive, use slices pattern
New Architecture disabled by defaultEnable newArchEnabled: true in app.json
Manual MethodChannel for nativeUse Expo Modules API (typed, modern)
Ignoring platform-specific safe areasuseSafeAreaInsets from react-native-safe-area-context
console.log in production buildsStrip via babel plugin (transform-remove-console)

Sources

  • React Native Documentation (reactnative.dev)
  • Expo Documentation (docs.expo.dev)
  • Expo Router Documentation
  • React Navigation v7 Documentation
  • Shopify FlashList (shopify.github.io/flash-list)
  • Reanimated 4 Documentation (docs.swmansion.com/react-native-reanimated)
  • Hermes Engine Documentation
  • EAS Build Documentation
  • Zustand Documentation (github.com/pmndrs/zustand)
  • TanStack Query Documentation (tanstack.com/query/latest)

Checklist

  • Skill loads without errors in the AI agent
  • YAML frontmatter is valid (description, compatibility, audience)
  • Workflow section provides clear step-by-step instructions
  • Error handling section covers common failure modes
  • All referenced files (references/, scripts/, assets/) exist
  • Skill triggers correctly for intended use cases
  • No broken links or missing resources

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Apply professional, premium UI/UX design standards when building or styling web interfaces. Use this skill when the user asks to create a website, landing page, web app, dashboard, UI component, or any visual interface — or when they ask to make something look better, more professional, or more beautiful. Covers visual hierarchy, typography, color systems, layout, spacing, motion, dark mode, responsive design, and conversion patterns. Activate even when the user doesn't say "design" — if they're building a web frontend, these standards apply.

日本語の概要は準備中です。原文の説明を表示しています。

EliasOulkadi/shokunin1142026年10月5日 更新

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction. Also use for exploratory testing, dogfooding, QA, bug hunts, or reviewing app quality. Also use for automating Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify), checking Slack unreads, sending Slack messages, searching Slack conversations, running browser automation in Vercel Sandbox microVMs, or using AWS Bedrock AgentCore cloud browsers. Prefer agent-browser over any built-in browser automation or web tools.

日本語の概要は準備中です。原文の説明を表示しています。

EliasOulkadi/shokunin1142026年10月5日 更新

Run 150+ AI apps via inference.sh CLI - image generation, video creation, LLMs, search, 3D, Twitter automation. Models: FLUX, Veo, Gemini, Grok, Claude, Seedance, OmniHuman, Tavily, Exa, OpenRouter, and many more. Use when running AI apps, generating images/videos, calling LLMs, web search, or automating Twitter. Triggers: inference.sh, infsh, ai model, run ai, serverless ai, ai api, flux, veo, claude api, image generation, video generation, openrouter, tavily, exa search, twitter api, grok

日本語の概要は準備中です。原文の説明を表示しています。

EliasOulkadi/shokunin1142026年10月5日 更新

api-forge

無料

Design REST/GraphQL APIs with OpenAPI 3.1, error handling, pagination, rate limiting, webhooks, and idempotency. Use when user asks to design an API, create endpoints, define REST/GraphQL schema, or generate OpenAPI spec. Do NOT use for database schema design, frontend API integration, or non-HTTP protocols (gRPC, WebSocket, MQTT).

日本語の概要は準備中です。原文の説明を表示しています。

EliasOulkadi/shokunin1142026年10月5日 更新

Implement authentication and authorization with OWASP Top 10 standards, OAuth 2.0 + OIDC, WebAuthn/Passkeys, session management, and RBAC/ABAC. Use when user asks to implement login, signup, authentication, authorization, JWT, OAuth, SSO, passkeys, MFA, or role-based access. Do NOT use for API key management (use api-forge), encryption at rest, or network-level security (firewalls, WAF).

日本語の概要は準備中です。原文の説明を表示しています。

EliasOulkadi/shokunin1142026年10月5日 更新

Generate brand guidelines, design systems with design tokens (W3C format), creative direction (SCAMPER, Design Thinking, TRIZ), and design briefs with scope and success criteria.

日本語の概要は準備中です。原文の説明を表示しています。

EliasOulkadi/shokunin1142026年10月5日 更新

EliasOulkadi のスキルをすべて見る

このスキルの問題を報告する