PluginBench
Skill
Pass
Audit score 90

react-native-expert

jeffallan/claude-skills

Builds production React Native and Expo apps with optimized navigation, native modules, and cross-platform performance.

What is react-native-expert?

Expert-level skill for building, optimizing, and debugging cross-platform mobile applications with React Native and Expo. Handles navigation hierarchies, native module integration, FlatList performance optimization, and platform-specific code for iOS and Android. Use when developing a React Native or Expo mobile app, setting up navigation, integrating native modules, improving scroll performance, or configuring Expo SDK projects.

  • Implements navigation hierarchies (tabs, stacks, drawers) with Expo Router or React Navigation
  • Configures and integrates native modules with proper error recovery
  • Optimizes FlatList rendering using memo, useCallback, and performance tuning (removeClippedSubviews, maxToRenderPerBatch, windowSize)
  • Handles platform-specific code for iOS and Android using Platform.select and file extensions (.ios.tsx, .android.tsx)
  • Manages SafeAreaView for notches, KeyboardAvoidingView for forms, and Android back-button navigation
  • Profiles and debugs performance with Flipper and React DevTools

How to install react-native-expert

npx skills add https://github.com/jeffallan/claude-skills --skill react-native-expert
Prerequisites
  • React Native 0.73+ or Expo SDK 50+ installed
  • TypeScript configured in project
  • iOS simulator or Android emulator (or real devices for testing)
  • Xcode (for iOS) and Android Studio or command-line tools (for Android)
Claude Code
Cursor
Windsurf
Cline

How to use react-native-expert

  1. 1.Run `npx expo doctor` to verify environment and SDK compatibility before starting
  2. 2.Organize project using feature-based folder structure
  3. 3.Set up navigation using Expo Router or React Navigation with typed route params
  4. 4.Implement components with platform handling using Platform.select or platform-specific file splits
  5. 5.Optimize lists with FlatList, memo, useCallback, and recommended rendering props
  6. 6.Test on both iOS simulator and Android emulator; verify Metro bundler output for errors
  7. 7.Profile performance using Flipper or React DevTools before shipping

Use cases

Good for
  • Building a new Expo or React Native app with TypeScript and feature-based project structure
  • Setting up tab, stack, or drawer navigation with deep linking support
  • Optimizing large scrolling lists to prevent frame drops and memory leaks
  • Handling platform-specific UI differences (shadows, keyboard behavior, safe areas)
  • Integrating native modules and resolving Metro bundler or native build errors
Who it's for
  • Mobile engineers building production React Native applications
  • Full-stack developers extending web skills to iOS and Android
  • Teams using Expo for rapid cross-platform development
  • Developers optimizing existing React Native apps for performance

react-native-expert FAQ

When should I use FlatList vs ScrollView?

Always use FlatList or SectionList for lists with more than a few items. ScrollView renders all children at once and causes memory issues. FlatList virtualizes rendering and is optimized for performance.

How do I fix Metro bundler errors?

Clear the cache with `npx expo start --clear` and restart. Check the bundler output for specific errors. If issues persist, verify SDK compatibility with `npx expo doctor`.

What's the best way to handle iOS and Android differences?

Use Platform.select() for small differences, or create separate .ios.tsx and .android.tsx files for larger platform-specific components. Always test on both platforms.

How do I optimize FlatList performance?

Wrap list items with memo, use useCallback for handlers, set keyExtractor correctly, enable removeClippedSubviews, and tune maxToRenderPerBatch and windowSize based on item complexity.

How do I handle keyboard input in forms?

Wrap your form in KeyboardAvoidingView with behavior set to 'padding' on iOS and 'height' on Android, use SafeAreaView for notches, and set keyboardShouldPersistTaps='handled' on ScrollView.

Full instructions (SKILL.md)

Source of truth, from jeffallan/claude-skills.


name: react-native-expert description: Builds, optimizes, and debugs cross-platform mobile applications with React Native and Expo. Implements navigation hierarchies (tabs, stacks, drawers), configures native modules, optimizes FlatList rendering with memo and useCallback, and handles platform-specific code for iOS and Android. Use when building a React Native or Expo mobile app, setting up navigation, integrating native modules, improving scroll performance, handling SafeArea or keyboard input, or configuring Expo SDK projects. license: MIT metadata: author: https://github.com/Jeffallan version: "1.1.0" domain: frontend triggers: React Native, Expo, mobile app, iOS, Android, cross-platform, native module role: specialist scope: implementation output-format: code related-skills: react-expert, flutter-expert, test-master

React Native Expert

Senior mobile engineer building production-ready cross-platform applications with React Native and Expo.

Core Workflow

  1. Setup — Expo Router or React Navigation, TypeScript config → run npx expo doctor to verify environment and SDK compatibility; fix any reported issues before proceeding
  2. Structure — Feature-based organization
  3. Implement — Components with platform handling → verify on iOS simulator and Android emulator; check Metro bundler output for errors before moving on
  4. Optimize — FlatList, images, memory → profile with Flipper or React DevTools
  5. Test — Both platforms, real devices

Error Recovery

  • Metro bundler errors → clear cache with npx expo start --clear, then restart
  • iOS build fails → check Xcode logs → resolve native dependency or provisioning issue → rebuild with npx expo run:ios
  • Android build fails → check adb logcat or Gradle output → resolve SDK/NDK version mismatch → rebuild with npx expo run:android
  • Native module not found → run npx expo install <module> to ensure compatible version, then rebuild native layers

Reference Guide

Load detailed guidance based on context:

TopicReferenceLoad When
Navigationreferences/expo-router.mdExpo Router, tabs, stacks, deep linking
Platformreferences/platform-handling.mdiOS/Android code, SafeArea, keyboard
Listsreferences/list-optimization.mdFlatList, performance, memo
Storagereferences/storage-hooks.mdAsyncStorage, MMKV, persistence
Structurereferences/project-structure.mdProject setup, architecture

Constraints

MUST DO

  • Use FlatList/SectionList for lists (not ScrollView)
  • Implement memo + useCallback for list items
  • Handle SafeAreaView for notches
  • Test on both iOS and Android real devices
  • Use KeyboardAvoidingView for forms
  • Handle Android back button in navigation

MUST NOT DO

  • Use ScrollView for large lists
  • Use inline styles extensively (creates new objects)
  • Hardcode dimensions (use Dimensions API or flex)
  • Ignore memory leaks from subscriptions
  • Skip platform-specific testing
  • Use waitFor/setTimeout for animations (use Reanimated)

Code Examples

Optimized FlatList with memo + useCallback

import React, { memo, useCallback } from 'react';
import { FlatList, View, Text, StyleSheet } from 'react-native';

type Item = { id: string; title: string };

const ListItem = memo(({ title, onPress }: { title: string; onPress: () => void }) => (
  <View style={styles.item}>
    <Text onPress={onPress}>{title}</Text>
  </View>
));

export function ItemList({ data }: { data: Item[] }) {
  const handlePress = useCallback((id: string) => {
    console.log('pressed', id);
  }, []);

  const renderItem = useCallback(
    ({ item }: { item: Item }) => (
      <ListItem title={item.title} onPress={() => handlePress(item.id)} />
    ),
    [handlePress]
  );

  return (
    <FlatList
      data={data}
      keyExtractor={(item) => item.id}
      renderItem={renderItem}
      removeClippedSubviews
      maxToRenderPerBatch={10}
      windowSize={5}
    />
  );
}

const styles = StyleSheet.create({
  item: { padding: 16, borderBottomWidth: StyleSheet.hairlineWidth },
});

KeyboardAvoidingView Form

import React from 'react';
import {
  KeyboardAvoidingView,
  Platform,
  ScrollView,
  TextInput,
  StyleSheet,
  SafeAreaView,
} from 'react-native';

export function LoginForm() {
  return (
    <SafeAreaView style={styles.safe}>
      <KeyboardAvoidingView
        style={styles.flex}
        behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
      >
        <ScrollView contentContainerStyle={styles.content} keyboardShouldPersistTaps="handled">
          <TextInput style={styles.input} placeholder="Email" autoCapitalize="none" />
          <TextInput style={styles.input} placeholder="Password" secureTextEntry />
        </ScrollView>
      </KeyboardAvoidingView>
    </SafeAreaView>
  );
}

const styles = StyleSheet.create({
  safe: { flex: 1 },
  flex: { flex: 1 },
  content: { padding: 16, gap: 12 },
  input: { borderWidth: 1, borderRadius: 8, padding: 12, fontSize: 16 },
});

Platform-Specific Component

import { Platform, StyleSheet, View, Text } from 'react-native';

export function StatusChip({ label }: { label: string }) {
  return (
    <View style={styles.chip}>
      <Text style={styles.label}>{label}</Text>
    </View>
  );
}

const styles = StyleSheet.create({
  chip: {
    paddingHorizontal: 12,
    paddingVertical: 4,
    borderRadius: 999,
    backgroundColor: '#0a7ea4',
    // Platform-specific shadow
    ...Platform.select({
      ios: { shadowColor: '#000', shadowOffset: { width: 0, height: 2 }, shadowOpacity: 0.2, shadowRadius: 4 },
      android: { elevation: 3 },
    }),
  },
  label: { color: '#fff', fontSize: 13, fontWeight: '600' },
});

Output Format

When implementing React Native features, deliver:

  1. Component code — TypeScript, with prop types defined
  2. Platform handlingPlatform.select or .ios.tsx / .android.tsx splits as needed
  3. Navigation integration — route params typed, back-button handling included
  4. Performance notes — memo boundaries, key extractor strategy, image caching

Knowledge Reference

React Native 0.73+, Expo SDK 50+, Expo Router, React Navigation 7, Reanimated 3, Gesture Handler, AsyncStorage, MMKV, React Query, Zustand

Documentation