用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/mikailustuner/OmniRule --skill mobile-patterns命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | mobile-patterns |
| description | Mobile: React Native, PWA, native features, offline-first, app store |
| triggers | {"extensions":[".tsx"],"keywords":["React Native","Expo","mobile","iOS","Android","native","FlashList","expo-router"]} |
| auto_load_when | Building React Native or Expo mobile apps |
| agent | mobile-ops |
| tools | ["Read","Write","Bash"] |
Focus: Mobile strategy, React Native vs PWA, native features, offline
Choose React Native when:
├── Need native performance
├── Platform-specific UI
├── Access device APIs
└── Existing JS team
Choose PWA when:
├── Web-only is acceptable
├── No app store review
├── Low development budget
├── Target all platforms equally
Choose Native (Swift/Kotlin) when:
├── Complex graphics (games)
├── Heavy processing
├── Platform-first requirements
└── Deep OS integration
Manifest requirements:
├── name, short_name
├── icons: 192x192, 512x512
├── theme_color
├── display: standalone
└── start_url
Service Worker:
├── Cache-first for assets
├── Network-first for API
└── Background sync for offline
Web capabilities:
├── Push notifications
├── Add to home screen
└── Full-screen experience
Data sync strategy:
├── Local-first: read from local
├── Queue writes when offline
├── Sync on connectivity
└── Conflict resolution
Storage options:
├── IndexedDB: large structured data
├── Cache API: HTTP responses
└── localStorage: simple key-value
Sync patterns:
├── Optimistic updates
├── Background sync
└── Periodic sync (when charging)
Camera/Photo:
├── React Native: react-native-camera
├── PWA: <input type="file" capture>
└── Consider: permissions, quality
Location:
├── Geolocation API (PWA)
├── Geolocation native (RN)
└── Background tracking: platform-specific
Push Notifications:
├── Web Push (PWA): VAPID keys
├── Native: APNs/FCM tokens
└── Handle: permissions, states
Biometrics:
├── Face ID / Touch ID
├── WebAuthn (newer browsers)
└── Native bridge for older
iOS App Store:
├── App Store Review Guidelines
├── Privacy nutrition labels
└── TestFlight for beta
Google Play:
├── Play Console
├── Internal testing tracks
└── Material Design guidelines
Cross-platform tools:
├── EAS Build (Expo)
├── React Native CLI
└── Capacitor (PWA to app)
React Native optimization:
├── FlatList for long lists
├── useMemo/useCallback
├── Native modules for heavy ops
└── Hermes JS engine
PWA optimization:
├── Lazy loading
├── Image optimization
└── Code splitting
Metrics:
├── Core Web Vitals
├── App startup time
└── Memory usage
❌ Using web-style touch handlers instead of Gesture Responder
✅ Use React Native PanResponder or Gesture Handler for touch
❌ Large JS bundle causing slow TTI on mobile
✅ Hermes engine + Metro bundler tree-shaking; lazy load screens
❌ Platform-specific code scattered everywhere
✅ Platform.select() or .ios.tsx / .android.tsx file extensions
❌ ScrollView wrapping FlatList (double scroll)
✅ FlatList / SectionList for any dynamic list — not ScrollView
❌ No deep link handling
✅ React Navigation linking config + universal links setup
| Need | React Native API | Expo |
|---|---|---|
| Navigation | React Navigation | expo-router |
| Camera | react-native-vision-camera | expo-camera |
| Storage | MMKV / AsyncStorage | expo-secure-store |
| Push notifications | notifee | expo-notifications |
| OTA update | CodePush | expo-updates |
| Device info | react-native-device-info | expo-device |