
React Native Expert
Scaffold and extend Expo Router apps with correct file-based routing, tab stacks, auth groups, and dynamic segments.
Overview
React Native Expert is an agent skill for the Build phase that teaches Expo Router project structure, layouts, tabs, auth groups, and dynamic routes for mobile apps.
Install
npx skills add https://github.com/jeffallan/claude-skills --skill react-native-expertWhat is this skill?
- Documents Expo Router app/ tree: root Stack, (tabs), (auth), nested settings stack, and dynamic details/[id]
- Includes copy-ready _layout.tsx patterns for Stack, Tabs, ThemeProvider, and modal presentation
- Covers tab bar config with Ionicons and screenOptions for active tint and headers
- Maps route groups for auth flows without tab chrome versus main tab navigation
- Supports file-based routing conventions solo builders need to avoid broken deep links
- Covers root Stack, tab group, auth group, nested settings stack, and dynamic [id] route patterns
Adoption & trust: 3k installs on skills.sh; 9.7k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your agent keeps proposing wrong folders or legacy React Navigation setup while you need idiomatic Expo Router file routes that actually run.
Who is it for?
Solo builders starting or refactoring an Expo Router mobile app who want agent output to match current file-based routing docs.
Skip if: Pure native Swift/Kotlin projects, web-only React, or teams that only need Detox/EAS Ship automation without UI routing help.
When should I use this skill?
You are implementing or refactoring navigation in an Expo Router project and need correct app/ folder and _layout.tsx patterns.
What do I get? / Deliverables
You get a correct app/ route map and layout templates so screens, tabs, auth, and dynamic paths compile and navigate predictably.
- Expo Router directory blueprint
- Layout and screen TypeScript snippets for tabs, auth, and dynamic routes
Recommended Skills
Journey fit
Build is where solo builders implement the mobile client; this skill is the canonical shelf for Expo Router structure and navigation patterns. Frontend subphase covers app directory layouts, tab bars, stacks, and screens—not backend APIs or ship-time testing.
How it compares
Opinionated Expo Router structure skill—not a generic React Native snippet dump or Flutter navigation guide.
Common Questions / FAQ
Who is react-native-expert for?
Indie developers and small teams building SaaS or consumer mobile apps with Expo Router who rely on Claude Code or Cursor for layout and navigation code.
When should I use react-native-expert?
Use it during Build while defining app/_layout.tsx, tab groups, auth stacks, and dynamic routes—especially when adding settings flows or modal detail screens.
Is react-native-expert safe to install?
It is primarily documentation and templates with no mandated network calls; still review the Security Audits panel on this page before installing any third-party skill into your agent.
SKILL.md
READMESKILL.md - React Native Expert
# Expo Router ## Project Structure ``` app/ ├── _layout.tsx # Root layout ├── index.tsx # Home (/) ├── +not-found.tsx # 404 page ├── (tabs)/ # Tab group │ ├── _layout.tsx # Tab bar config │ ├── index.tsx # First tab │ └── profile.tsx # Profile tab ├── (auth)/ # Auth group (no tabs) │ ├── _layout.tsx │ ├── login.tsx │ └── register.tsx ├── settings/ │ ├── _layout.tsx # Stack layout │ ├── index.tsx # Settings main │ └── notifications.tsx └── details/[id].tsx # Dynamic route ``` ## Root Layout ```typescript // app/_layout.tsx import { Stack } from 'expo-router'; import { ThemeProvider } from '@react-navigation/native'; export default function RootLayout() { return ( <ThemeProvider value={colorScheme === 'dark' ? DarkTheme : DefaultTheme}> <Stack screenOptions={{ headerShown: false }}> <Stack.Screen name="(tabs)" /> <Stack.Screen name="(auth)" /> <Stack.Screen name="details/[id]" options={{ presentation: 'modal' }} /> </Stack> </ThemeProvider> ); } ``` ## Tab Layout ```typescript // app/(tabs)/_layout.tsx import { Tabs } from 'expo-router'; import { Ionicons } from '@expo/vector-icons'; export default function TabLayout() { return ( <Tabs screenOptions={{ tabBarActiveTintColor: '#007AFF', headerShown: true, }} > <Tabs.Screen name="index" options={{ title: 'Home', tabBarIcon: ({ color, size }) => ( <Ionicons name="home" color={color} size={size} /> ), }} /> <Tabs.Screen name="profile" options={{ title: 'Profile', tabBarIcon: ({ color, size }) => ( <Ionicons name="person" color={color} size={size} /> ), }} /> </Tabs> ); } ``` ## Navigation ```typescript import { router, useLocalSearchParams, Link } from 'expo-router'; // Programmatic navigation router.push('/details/123'); // Push to stack router.replace('/home'); // Replace current router.back(); // Go back router.canGoBack(); // Check if can go back // With params router.push({ pathname: '/details/[id]', params: { id: '123', title: 'Item' }, }); // Link component <Link href="/profile" asChild> <Pressable> <Text>Go to Profile</Text> </Pressable> </Link> // Reading params function DetailsScreen() { const { id, title } = useLocalSearchParams<{ id: string; title?: string }>(); return <Text>Details for {id}</Text>; } ``` ## Protected Routes ```typescript // app/(auth)/_layout.tsx import { Redirect, Stack } from 'expo-router'; import { useAuth } from '@/hooks/useAuth'; export default function AuthLayout() { const { user, isLoading } = useAuth(); if (isLoading) { return <LoadingScreen />; } if (user) { return <Redirect href="/(tabs)" />; } return <Stack screenOptions={{ headerShown: false }} />; } // app/(tabs)/_layout.tsx export default function TabLayout() { const { user, isLoading } = useAuth(); if (isLoading) { return <LoadingScreen />; } if (!user) { return <Redirect href="/(auth)/login" />; } return <Tabs>...</Tabs>; } ``` ## Deep Linking ```json // app.json { "expo": { "scheme": "myapp", "web": { "bundler": "metro" } } } ``` ```typescript // Handle: myapp://details/123 // app/details/[id].tsx handles automatically ``` ## Quick Reference | Component | Purpose | |-----------|---------| | `<Stack>` | Stack navigator | | `<Tabs>` | Tab navigator | | `<Drawer>` | Drawer navigator | | `<Link>` | Declarative navigation | | router method | Behavior | |---------------|----------| | `push()` | Add to stack | | `replace()` | Replace current | | `back()` | Go back | | `dismissAll()` | Dismiss modals | # List Optimization ## Optimized