用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/diegosouzapw/awesome-omni-skill --skill mobile命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | mobile |
| description | React Native, Expo, mobile apps. Auto-use for mobile work. |
| version | 2.0.0 |
| allowed-tools | ["Read","Edit","Write","Bash","Grep","Glob"] |
Auto-use when: Expo, React Native, mobile, app, NativeWind, iOS, Android
Works with: backend for API, quality for testing
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
// 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>
)
}
// 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>
)
}
// 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" />
// 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
},
})
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])
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 }>()
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 },
})
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" />
# 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"
# 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
[] 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