mobile
React Native, Expo, mobile apps. Auto-use for mobile work.
Best use case
mobile is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
React Native, Expo, mobile apps. Auto-use for mobile work.
Teams using mobile should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/mobile/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How mobile Compares
| Feature / Agent | mobile | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
React Native, Expo, mobile apps. Auto-use for mobile work.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Mobile
**Auto-use when:** Expo, React Native, mobile, app, NativeWind, iOS, Android
**Works with:** `backend` for API, `quality` for testing
---
## Quick Setup
### File Structure
```
app/
├── _layout.tsx # Root (providers, fonts)
├── index.tsx # Home
├── (auth)/ # Auth group
│ ├── _layout.tsx
│ └── login.tsx
├── (tabs)/ # Tab group (authenticated)
│ ├── _layout.tsx
│ ├── index.tsx
│ └── profile.tsx
└── [id].tsx # Dynamic route
```
### Root Layout
```typescript
// app/_layout.tsx
import { Stack } from 'expo-router'
import { QueryClientProvider } from '@tanstack/react-query'
import '../global.css'
export default function RootLayout() {
return (
<QueryClientProvider client={queryClient}>
<AuthProvider>
<Stack screenOptions={{ headerShown: false }} />
</AuthProvider>
</QueryClientProvider>
)
}
```
### Protected Tabs
```typescript
// app/(tabs)/_layout.tsx
import { Tabs, Redirect } from 'expo-router'
import { useAuth } from '@/providers/auth'
export default function TabLayout() {
const { session, isLoading } = useAuth()
if (isLoading) return null
if (!session) return <Redirect href="/login" />
return (
<Tabs>
<Tabs.Screen name="index" options={{ title: 'Home' }} />
<Tabs.Screen name="profile" options={{ title: 'Profile' }} />
</Tabs>
)
}
```
---
## NativeWind
```typescript
// Usage (Tailwind syntax)
<View className="flex-1 bg-white p-4">
<Text className="text-lg font-bold text-gray-900">Title</Text>
<Pressable className="bg-blue-500 p-4 rounded-lg active:opacity-70">
<Text className="text-white text-center">Button</Text>
</Pressable>
</View>
// Platform-specific
<View className="ios:pt-12 android:pt-8" />
// Dark mode
<Text className="text-gray-900 dark:text-white" />
```
---
## Supabase Mobile
### Client
```typescript
// lib/supabase.ts
import AsyncStorage from '@react-native-async-storage/async-storage'
import { createClient } from '@supabase/supabase-js'
export const supabase = createClient(url, key, {
auth: {
storage: AsyncStorage,
autoRefreshToken: true,
persistSession: true,
detectSessionInUrl: false, // Important for mobile
},
})
```
### Realtime with Cleanup (CRITICAL)
```typescript
useEffect(() => {
let channel: RealtimeChannel
const setup = async () => {
const { data } = await supabase.from('items').select('*')
setData(data || [])
channel = supabase
.channel(`room:${roomId}`)
.on('postgres_changes', { event: '*', schema: 'public', table: 'items' },
(payload) => setData(prev => [...prev, payload.new])
)
.subscribe()
}
setup()
// CRITICAL: Cleanup
return () => {
if (channel) supabase.removeChannel(channel)
}
}, [roomId])
```
---
## Common Patterns
### Navigation
```typescript
import { router, useLocalSearchParams, Link } from 'expo-router'
router.push('/profile')
router.push({ pathname: '/user/[id]', params: { id: '123' } })
router.replace('/login')
router.back()
const { id } = useLocalSearchParams<{ id: string }>()
```
### Platform-Specific
```typescript
import { Platform } from 'react-native'
const padding = Platform.OS === 'ios' ? 50 : 30
const styles = Platform.select({
ios: { shadowColor: '#000', shadowOpacity: 0.1 },
android: { elevation: 4 },
})
```
### Safe Area
```typescript
import { useSafeAreaInsets } from 'react-native-safe-area-context'
const insets = useSafeAreaInsets()
<View style={{ paddingTop: insets.top }} />
// Or with NativeWind
<View className="pt-safe pb-safe" />
```
---
## EAS Commands
```bash
# Development build
eas build --profile development --platform ios
# Preview (internal testing)
eas build --profile preview --platform all
# Production
eas build --profile production --platform all
# Submit to stores
eas submit --platform ios
eas submit --platform android
# OTA update
eas update --branch production --message "Bug fixes"
```
---
## Package Installation
```bash
# ALWAYS use npx expo install (not npm install)
npx expo install package-name
# Common packages
npx expo install react-native-reanimated
npx expo install @react-native-async-storage/async-storage
npx expo install expo-image-picker
npx expo install expo-secure-store
```
---
## Checklist
```
[] Uses REAL data (not mock)
[] Loading states
[] Error states
[] Empty states
[] Cleanup subscriptions on unmount
[] Use expo-secure-store for secrets
[] HTTPS for all API calls
[] Platform-specific handling where needed
```Related Skills
qa-testing-mobile
Mobile app testing strategy and execution for iOS and Android (native + cross-platform): choose automation frameworks, define device matrix, control flakes, validate performance/reliability/accessibility, and set CI + release gates. Use when you need a mobile QA plan, device lab/CI setup, or guidance on XCUITest/Espresso/Appium/Detox/Maestro/Flutter testing.
ant-design-mobile
Provides comprehensive guidance for Ant Design Mobile component library including mobile components, themes, and platform adaptations. Use when the user asks about Ant Design Mobile, needs to build mobile applications, or implement mobile UI components.
mobile_react_native
React Native best practices, hooks, navigation ve performance optimization.
mobile-ui-development-rule
General rules pertaining to Mobile UI development. Covers UI/UX best practices, state management, and navigation patterns.
mobile-security-expert
移动安全漏洞挖掘知识库,基于HackerOne公开报告提供Android和iOS应用的漏洞挖掘手法、技术细节和代码模式分析;用于安全研究人员和漏洞挖掘者学习参考、代码审计和漏洞检测指导。
mobile-security-coder
Expert in secure mobile coding practices specializing in input validation, WebView security, and mobile-specific security patterns.
mobile-offline-support
Implement offline-first mobile apps with local storage, sync strategies, and conflict resolution. Covers AsyncStorage, Realm, SQLite, and background sync patterns.
mobile-guide
Comprehensive mobile development guide for iOS, Android, React Native, and Flutter. Includes Swift, Kotlin, and cross-platform frameworks. Use when building mobile applications, iOS, Android, or cross-platform apps.
mobile-games
Mobile game development principles. Touch input, battery, performance, app stores.
mobile-frontend
React Native patterns, NativeWind styling, React Native Reusables components, mobile-specific patterns
mobile-first-design-rules
Focuses on rules and best practices for mobile-first design and responsive typography using tailwind.
mobile-development
Cross-platform and native mobile development. Frameworks: React Native, Flutter, Swift/SwiftUI, Kotlin/Jetpack Compose. Capabilities: mobile UI, offline-first architecture, push notifications, deep linking, biometrics, app store deployment. Actions: build, create, implement, optimize, test, deploy mobile apps. Keywords: iOS, Android, React Native, Flutter, Swift, Kotlin, mobile app, offline sync, push notification, deep link, biometric auth, App Store, Play Store, iOS HIG, Material Design, battery optimization, memory management, mobile performance. Use when: building mobile apps, implementing mobile-first UX, choosing native vs cross-platform, optimizing battery/memory/network, deploying to app stores, handling mobile-specific features.