
Expo Router
- 133 installs
- Updated February 14, 2026
- jchaselubitz/drill-app
Apply Expo Router file-based routing, Stack defaults, per-screen options, and native tab patterns without misconfiguring auto-discovered routes.
About
expo-router is an agent skill for solo and indie builders shipping React Native apps with Expo who want navigation that follows current Expo Router conventions instead of legacy React Navigation boilerplate. It encodes how to configure the root Stack in app/_layout.tsx with shared screenOptions while letting the filesystem define routes, and how individual screens own their presentation through Stack.Screen inside the route module— including dynamic segments like lesson detail IDs. The skill applies when you are wiring stacks, native tabs, headers, back titles, or restructuring the app directory tree. It keeps agents from listing every route in the root layout (a common mistake) and steers toward file-based discovery plus localized options. Install it when tasks mention navigation, routing, screen configuration, or Expo Router layout files so changes stay consistent with Expo’s recommended patterns and your existing drill-app stack.
- Root Stack uses screenOptions defaults; routes auto-discover from file structure—do not enumerate every screen in root l
- Per-screen <Stack.Screen> options inside route components for titles, headers, and back labels
- Dynamic route patterns such as app/lesson/[id].tsx with localized header configuration
- Native tabs and file-based routing best practices for Expo Router
- Allowed tools: Read, Edit, Write, Grep, Glob for navigation refactors
Expo Router by the numbers
- 133 all-time installs (skills.sh)
- Ranked #537 of 1,039 Mobile Development skills by installs in the Skillselion catalog
- Security screen: LOW risk (skills.sh audit)
- Data as of Aug 2, 2026 (Skillselion catalog sync)
npx skills add https://github.com/jchaselubitz/drill-app --skill expo-routerAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 133 |
|---|---|
| Security audit | 3 / 3 scanners passed |
| Last updated | February 14, 2026 |
| Repository | jchaselubitz/drill-app ↗ |
What it does
Apply Expo Router file-based routing, Stack defaults, per-screen options, and native tab patterns without misconfiguring auto-discovered routes.
Files
Expo Router Patterns
Stack Navigator Configuration
Root Layout Setup
Use screenOptions on the Stack component to set defaults for all screens. Do NOT explicitly list every screen - routes are auto-discovered from the file structure.
// app/_layout.tsx
import { Stack } from 'expo-router';
export default function RootLayout() {
return (
<Stack screenOptions={{ headerShown: false }} />
);
}Per-Screen Configuration
Individual screens configure their own options using <Stack.Screen> within the component file:
// app/lesson/[id].tsx
import { Stack } from 'expo-router';
export default function LessonScreen() {
return (
<View>
<Stack.Screen
options={{
title: 'Lesson',
headerShown: true,
headerBackTitle: 'Back',
}}
/>
{/* Screen content */}
</View>
);
}Dynamic Header Configuration
Use useNavigation with setOptions for dynamic header content like buttons:
import { useNavigation } from 'expo-router';
import { useLayoutEffect } from 'react';
export default function Screen() {
const navigation = useNavigation();
useLayoutEffect(() => {
navigation.setOptions({
headerRight: () => (
<Pressable onPress={handlePress}>
<Ionicons name="add" size={28} />
</Pressable>
),
});
}, [navigation]);
return <View>{/* content */}</View>;
}Native Tabs (expo-router/unstable-native-tabs)
Native tabs provide platform-native tab bar with SF Symbols on iOS:
// app/(tabs)/_layout.tsx
import { Icon, Label, NativeTabs } from 'expo-router/unstable-native-tabs';
export default function TabLayout() {
return (
<NativeTabs>
<NativeTabs.Trigger name="index" options={{ title: 'Home' }}>
<Icon sf="house.fill" drawable="custom_android_drawable" />
<Label>Home</Label>
</NativeTabs.Trigger>
</NativeTabs>
);
}Key Principles
1. File-based routing: Routes are auto-discovered from the app/ directory structure 2. Minimal configuration: Only configure what you need to override 3. Screen-level options: Screens configure their own headers/options using <Stack.Screen> within the component 4. Layout files: _layout.tsx files define navigation structure for their directory 5. Route groups: Parentheses like (tabs) create route groups without affecting the URL path
Common Mistakes to Avoid
- Don't list every screen explicitly in Stack - they're auto-discovered
- Don't use
screenOptionsfor route-specific settings - use<Stack.Screen>in the route file - Don't nest navigators deeply - use file-based routing for cleaner structure
slug: expo-router
name: expo-router
description: Patterns for Expo Router including Stack configuration, native
tabs, and file-based routing best practices. Apply when working with
navigation, routing, or screen configuration.
tags: []
compat: []
sha256: 202b315c374ae6e07427c443e1c698459ede0a79ca2596d5551ee7d21854d0fe
Related skills
FAQ
Is Expo Router safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.