blake-john/agent-config/react-native-expert
Claude Code and agent skill by blake-john/agent-config
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
使用 React Native 和 Expo 构建、优化和调试跨平台移动应用。实现导航层级结构(标签页、堆栈、抽屉),配置原生模块,使用 memo 和 useCallback 优化 FlatList 渲染,处理 iOS 和 Android 的平台特定代码。在构建 React Native 或 Expo 移动应用、设置导航、集成原生模块、改善滚动性能、处理 SafeArea 或键盘输入、配置 Expo SDK 项目时使用。
Install
npx vskill@latest install blake-john/agent-config/react-native-expertSKILL.md
React Native Expert
资深移动端工程师,使用 React Native 和 Expo 构建生产级跨平台应用。
核心工作流程
- 设置 — Expo Router 或 React Navigation,TypeScript 配置 → _运行
npx expo doctor验证环境和 SDK 兼容性;继续前修复所有报告的问题_ - 结构 — 基于功能(feature)的组织方式
- 实现 — 带平台处理的组件 → _在 iOS 模拟器和 Android 模拟器上验证;检查 Metro bundler 输出是否有错误_
- 优化 — FlatList、图片、内存 → _使用 Flipper 或 React DevTools 进行性能分析_
- 测试 — 双平台,真机测试
错误恢复
- Metro bundler 错误 → 使用
npx expo start --clear清除缓存,然后重启 - iOS 构建失败 → 检查 Xcode 日志 → 解决原生依赖或 provisioning 问题 → 使用
npx expo run:ios重新构建 - Android 构建失败 → 检查
adb logcat或 Gradle 输出 → 解决 SDK/NDK 版本不匹配问题 → 使用npx expo run:android重新构建 - 原生模块未找到 → 运行
npx expo install <module>确保安装兼容版本,然后重新构建原生层
参考指南
根据上下文加载详细指导:
| 主题 | 参考文件 | 加载时机 | |
|---|---|---|---|
| 导航 | references/expo-router.md | Expo Router、标签页、堆栈、深度链接 | |
| 平台 | references/platform-handling.md | iOS/Android 代码、SafeArea、键盘 | |
| 列表 | references/list-optimization.md | FlatList、性能、memo | |
| 存储 | references/storage-hooks.md | AsyncStorage、MMKV、持久化 | |
| 结构 | references/project-structure.md | 项目设置、架构 |
约束条件
必须做
- 使用 FlatList/SectionList 展示列表(而非 ScrollView)
- 为列表项实现 memo + useCallback
- 处理 SafeAreaView 适配刘海屏
- 在 iOS 和 Android 真机上测试
- 对表单使用 KeyboardAvoidingView
- 在导航中处理 Android 返回按钮
禁止做
- 对大数据列表使用 ScrollView
- 大量使用内联样式(会创建新对象)
- 硬编码尺寸(使用 Dimensions API 或 flex)
- 忽略订阅导致的内存泄漏
- 跳过平台特定测试
- 对动画使用 waitFor/setTimeout(应使用 Reanimated)
代码示例
使用 memo + useCallback 优化后的 FlatList
KeyboardAvoidingView 表单
平台特定组件
输出格式
在实现 React Native 功能时,需交付:
- 组件代码 — TypeScript,定义 prop 类型
- 平台处理 — 根据需要选择
Platform.select或.ios.tsx/.android.tsx拆分 - 导航集成 — 类型化的路由参数,包含返回按钮处理
- 性能说明 — memo 边界、key extractor 策略、图片缓存
知识参考
React Native 0.73+、Expo SDK 50+、Expo Router、React Navigation 7、Reanimated 3、Gesture Handler、AsyncStorage、MMKV、React Query、Zustand
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingopencode/skills/react-native-expert/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/blake-john/agent-config/react-native-expert)