用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Dev-Toolbelt/dev-team-agents --skill react-native命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | react-native |
| description | React Native and Expo rules, patterns, and checklists. Load when react-native is detected. |
Load this skill when any of the following are found:
| Signal | File / Dependency |
|---|---|
react-native in package.json dependencies | package.json |
| Metro bundler config | metro.config.js / metro.config.ts |
| React Native CLI project | android/ + ios/ directories together |
| Expo project | app.json with "expo" key, eas.json, or expo in package.json |
| Expo Modules | expo-modules-core in package.json |
src/
├── app/ # Root navigation and app entry
├── components/ # Reusable, platform-agnostic UI components
├── screens/ # Screen-level components (one per route)
├── hooks/ # Custom hooks (no UI, no side effects tied to render)
├── store/ # Global state (Redux, Zustand, Jotai)
├── services/ # API clients, native module wrappers
├── utils/ # Pure functions, formatters, constants
├── types/ # Shared TypeScript types and interfaces
└── assets/ # Images, fonts, icons
.ios.tsx / .android.tsx suffixes — only when unavoidable→ Load skills/mobile/react-native/references/expo-vs-bare.md when deciding between Managed and Bare workflows, configuring EAS Build, or handling OTA updates.
→ Load skills/mobile/react-native/references/navigation.md when working with React Navigation, deep links, or back behavior.
→ Load skills/mobile/react-native/references/state-management.md when choosing or implementing state management (Zustand, Redux Toolkit, Jotai, TanStack Query).
FlatList or SectionList for dynamic lists — never ScrollView + .map() for more than ~10 items@shopify/flash-list) over FlatList for large lists (> 100 items) — it is significantly fasterkeyExtractor to a stable, unique string — never use array indexgetItemLayout when item height is fixed to skip measurement overheadremoveClippedSubviews={true} for long lists on AndroidReact.memo on components that receive stable props and re-render oftenuseCallback on functions passed as props to memoized childrenuseMemo only for genuinely expensive computations — not as a defaultexpo-image or react-native-fast-image instead of the built-in Image — both support caching and progressive loadingwidth and height — never let images cause layout shiftAlways request permissions at the moment they are needed, not at app launch:
import * as Location from 'expo-location'; // Managed
// or
import { request, PERMISSIONS } from 'react-native-permissions'; // Bare
const requestLocation = async () => {
const { status } = await Location.requestForegroundPermissionsAsync();
if (status !== 'granted') {
// Show rationale or graceful degradation — never crash
}
};
denied and blocked states gracefullyNSUsageDescription keys in app.json → ios.infoPlist before submittingexpo-notifications (Managed) or @react-native-firebase/messaging (Bare/Firebase)When a native module is not available in the Expo SDK:
npx create-expo-module my-moduleExpoModulesCore — avoids the old bridge entirelyexpo-constants or a secrets managerexpo-secure-store (Managed) or react-native-keychain (Bare) — both use iOS Keychain and Android Keystoreexpo-device (isRooted) or react-native-jail-monkey for sensitive apps| Layer | Tool | Purpose |
|---|---|---|
| Unit | Jest + @testing-library/react-native | Component rendering and hooks |
| Integration | Detox | Full device E2E (real device or simulator) |
| Manual | Physical device on each target OS version | Permissions, gestures, platform quirks |
preview build profileexpo-icon-generator or Sketch/Figma export)version) and build number (ios.buildNumber / android.versionCode) incremented__DEV__ guards removed)app.json (required for apps accessing camera, location, contacts)bundleIdentifier matches App Store Connect entryNSUsageDescription keys populated in infoPlistpackage name matches Play Console entrytargetSdkVersion ≥ current Google Play requirement (updated annually)android.adaptiveIcon)