跳到主内容
智客 ZICQ

技能库 智客分类:运维与云 react-native-dev

React Native Dev

反应原生和博览会开发指南,涵盖组件,造型,动画,导航,状态管理,形式,网络,性能优化,测试,原生能力,和工程(项目结构,部署,SDK升级,CI/CD). 使用时: 构建 React Introduction 或 Expo apps, 执行动画或本土UI, 管理状态, 获取数据, 写入测试, 优化性能, 部署到 App Store/ Play Store, 设置 CI/CD, 升级 Expo SDK, 或配置 Tailwind/ Native Wind.

1888 安装量

官方网址:skills.sh

技能介绍

先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。

做什么

反应原生和博览会开发指南,涵盖组件,造型,动画,导航,状态管理,形式,网络,性能优化,测试,原生能力,以及工程(项目结构,部署,SDK升级,CI/CD)

何时用

构建 React 本地或 Expo 应用程序, 执行动画或本地用户界面, 管理状态, 获取数据, 写入测试, 优化性能, 部署到 App Store/ Play Store, 设置 CI/ CD, 升级 Expo SDK, 或配置 Tailwind/ NativeWind

代理如何加载

按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:React Native & Expo Development Guide、References、Quick Reference、Component Preferences、Scaling Up、State Management。

文件分析

文件分析:除 SKILL.md 外,正文引用了 references/navigation.md、references/components.md、references/styling.md、references/animations.md、references/state-management.md、references/forms.md,属于带资源的技能包,这些文件按需再读。

官方 description(原文)

React Native and Expo development guide covering components, styling, animations, navigation, state management, forms, networking, performance optimization, testing, native capabilities, and engineering (project structure, deployment, SDK upgrades, CI/CD). Use when: building React Native or Expo apps, implementing animations or native UI, managing state, fetching data, writing tests, optimizing performance, deploying to App Store/Play Store, setting up CI/CD, upgrading Expo SDK, or configuring Tailwind/NativeWind.

React Native & Expo Development GuideReferencesQuick ReferenceComponent PreferencesScaling UpState ManagementPerformance PrioritiesNew Project Init1. Create project2. Install Expo Router + core deps3. (Optional) Common extrasCore Principles

· 许可:MIT

来源分类:skills.sh agent-skill

SKILL.md 与 Agent 调用

官方规范 ↗
name
react-native-dev
description
React Native and Expo development guide covering components, styling, animations, navigation, state management, forms, networking, performance optimization, testing, native capabilities, and engineering (project structure, deployment, SDK upgrades, CI/CD). Use when: building React Native or Expo apps, implementing animations or native UI, managing state, fetching data, writing tests, optimizing performance, deploying to App Store/Play Store, setting up CI/CD, upgrading Expo SDK, or configuring Tailwind/NativeWind.
许可
MIT
  1. 发现技能客户端向 Agent 提供名称与描述目录。
  2. 匹配与调用用户指定或任务匹配后,载入 SKILL.md 指令。
  3. 按需加载按步骤读取参考文档、使用脚本与素材。
指令中引用的文件 · 6
  • references/navigation.md
  • references/components.md
  • references/styling.md
  • references/animations.md
  • references/state-management.md
  • references/forms.md

以下路径提取自原文;文件是否齐全请以来源仓库中的完整目录为准。

具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗

安装这个技能

Skills CLI ↗

先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。

该技能引用了附属文件,请从来源获取完整目录;仅复制 SKILL.md 可能缺少依赖。

交给 Agent 安装

复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。

把 Agent Skill「react-native-dev」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-f13a3d826a9ebffb-%E5%8F%8D%E5%BA%94%E5%8E%9F%E7%94%9F-Dev.html
请存为 .cursor/skills/react-native-dev/SKILL.md 或 .claude/skills/react-native-dev/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。
该技能还带 scripts/、references/、assets/ 等文件,请从 https://github.com/minimax-ai/skills 取完整目录,不要只建一个 SKILL.md。

GitHub 完整包 ↗

终端安装 · Skills CLI

需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。

npx skills add 'https://github.com/minimax-ai/skills' --list

npx skills add 'https://github.com/minimax-ai/skills' --skill 'react-native-dev'

CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。

阅读排版
--- name: react-native-dev description: | React Native and Expo development guide covering components, styling, animations, navigation, state management, forms, networking, performance optimization, testing, native capabilities, and engineering (project structure, deployment, SDK upgrades, CI/CD). Use when: building React Native or Expo apps, implementing animations or native UI, managing state, fetching data, writing tests, optimizing performance, deploying to App Store/Play Store, setting up CI/CD, upgrading Expo SDK, or configuring Tailwind/NativeWind. license: MIT metadata: version: "1.0.0" category: mobile sources: - expo/skills by Expo (https://github.com/expo/skills) — Native UI, navigation, and animation patterns - Expo documentation (docs.expo.dev) - React Native documentation (reactnative.dev) - EAS (Expo Application Services) documentation --- # React Native & Expo Development Guide A practical guide for building production-ready React Native and Expo applications. Covers UI, animations, state, testing, performance, and deployment. ## References Consult these resources as needed: - [references/navigation.md](references/navigation.md) — Expo Router: Stack, Tabs, NativeTabs (`headerLargeTitle`, `headerBackButtonDisplayMode`), links, modals, sheets, context menus - [references/components.md](references/components.md) — FlashList patterns, `expo-image`, safe areas (`contentInsetAdjustmentBehavior`), native controls, blur/glass effects, storage - [references/styling.md](references/styling.md) — StyleSheet, NativeWind/Tailwind, platform styles, theming, dark mode - [references/animations.md](references/animations.md) — Reanimated 3: entering/exiting, shared values, gestures, scroll-driven - [references/state-management.md](references/state-management.md) — Zustand (selectors, persist), Jotai (atoms, derived), React Query, Context - [references/forms.md](references/forms.md) — React Hook Form + Zod: validation, multi-step, dynamic arrays - [references/networking.md](references/networking.md) — fetch wrapper, React Query (optimistic updates), auth tokens, offline, API routes, webhooks - [references/performance.md](references/performance.md) — Profiling workflow, FlashList + `memo`, bundle analysis, TTI, memory leaks, animation perf - [references/testing.md](references/testing.md) — Jest, React Native Testing Library, E2E with Maestro - [references/native-capabilities.md](references/native-capabilities.md) — Camera, location, permissions (`use*Permissions` hooks), haptics, notifications, biometrics - [references/engineering.md](references/engineering.md) — Project layout (`components/ui/`, `stores/`, `services/`), path aliases, SDK upgrades, EAS build/submit, CI/CD, DOM components ## Quick Reference ### Component Preferences | Purpose | Use | Instead of | |---------|-----|------------| | Lists | `FlashList` (`@shopify/flash-list`) + `memo` items | `FlatList` (no view recycling) | | Images | `expo-image` | RN `` (no cache, no WebP) | | Press | `Pressable` | `TouchableOpacity` (legacy) | | Audio | `expo-audio` | `expo-av` (deprecated) | | Video | `expo-video` | `expo-av` (deprecated) | | Animations | Reanimated 3 | RN Animated API (limited) | | Gestures | Gesture Handler | PanResponder (legacy) | | Platform check | `process.env.EXPO_OS` | `Platform.OS` | | Context | `React.use()` | `React.useContext()` (React 18) | | Safe area scroll | `contentInsetAdjustmentBehavior="automatic"` | `` | | SF Symbols | `expo-image` with `source="sf:name"` | `expo-symbols` | ### Scaling Up | Situation | Consider | |-----------|----------| | Long lists with scroll jank | Virtualized list libraries (e.g. FlashList) | | Want Tailwind-style classes | NativeWind v4 | | High-frequency storage reads | Sync-based storage (e.g. MMKV) | | New project with Expo | Expo Router over bare React Navigation | ### State Management | State Type | Solution | |------------|----------| | Local UI state | `useState` / `useReducer` | | Shared app state | Zustand or Jotai | | Server / async data | React Query | | Form state | React Hook Form + Zod | ### Performance Priorities | Priority | Issue | Fix | |----------|-------|-----| | CRITICAL | Long list jank | `FlashList` + memoized items | | CRITICAL | Large bundle | Avoid barrel imports, enable R8 | | HIGH | Too many re-renders | Zustand selectors, React Compiler | | HIGH | Slow startup | Disable bundle compression, native nav | | MEDIUM | Animation drops | Only animate `transform`/`opacity` | ## New Project Init ```bash # 1. Create project npx create-expo-app@latest my-app --template blank-typescript cd my-app # 2. Install Expo Router + core deps npx expo install expo-router react-native-safe-area-context react-native-screens # 3. (Optional) Common extras npx expo install expo-image react-native-reanimated react-native-gesture-handler ``` Then configure: 1. Set entry point in `package.json`: `"main": "expo-router/entry"` 2. Add scheme in `app.json`: `"scheme": "my-app"` 3. Delete `App.tsx` and `index.ts` 4. Create `app/_layout.tsx` as root Stack layout 5. Create `app/(tabs)/_layout.tsx` for tab navigation 6. Create route files in `app/(tabs)/` (see [navigation.md](references/navigation.md)) For web support, also install: `npx expo install react-native-web react-dom @expo/metro-runtime` ## Core Principles **Consult references before writing**: when implementing navigation, lists, networking, or project setup, read the matching reference file above for patterns and pitfalls. **Try Expo Go first** (`npx expo start`). Custom builds (`eas build`) only needed when using local Expo modules, Apple targets, or third-party native modules not in Expo Go. **Conditional rendering**: use `{count > 0 && }` not `{count && }` (renders "0"). **Animation rule**: only animate `transform` and `opacity` — GPU-composited, no layout thrash. **Imports**: always import directly from source, not barrel files — avoids bundle bloat. **Lists and images**: before using `FlatList` or RN `Image`, check the Component Preferences table above — `FlashList` and `expo-image` are almost always the right choice. **Route files**: always use kebab-case, never co-locate components/types/utils in `app/`. ## Checklist ### New Project Setup - [ ] `tsconfig.json` path aliases configured - [ ] `EXPO_PUBLIC_API_URL` env var set per environment - [ ] Root layout has `GestureHandlerRootView` (if using gestures) - [ ] `contentInsetAdjustmentBehavior="automatic"` on all scroll views - [ ] `FlashList` instead of `FlatList` for lists > 20 items ### Before Shipping - [ ] Profile in `--profile` mode, fix frames > 16ms - [ ] Bundle analyzed (`source-map-explorer`), no barrel imports - [ ] R8 enabled for Android - [ ] Unit + component tests for critical paths - [ ] E2E flows for login, core feature, checkout --- Flutter development → see `flutter-dev` skill. iOS native (UIKit/SwiftUI) → see `ios-application-dev` skill. Android native (Kotlin/Compose) → see `android-native-dev` skill. *React Native is a trademark of Meta Platforms, Inc. Expo is a trademark of 650 Industries, Inc. All other product names are trademarks of their respective owners.*

相关技能

运维与云

Docker Essentials

用于容器管理,图像操作,调试的基本道克命令和工作流程.

运维与云

Find Skills

从开放的代理技能生态系统中发现并安装技能. 使用时:(1)用户问"我如何做X",X可能拥有现有技能,(2)用户说"为X找到技能"或"是否为X有技能",(3)用户问"你能否做X",X是专门能力,(4)用户想扩展代理能力,(5)用户想搜索工具,模板,或工作流程,(6)用户提到他们希望…

运维与云

Microsoft Foundry

构建,部署,评价,优化,微调,管理微软创始代理,模型,资源最终结束. 用法:铸造、azd ai代理、azd 提供/部署、托管代理脚手架/开发/运行/部署/拖放、即时代理创建、创建代理、更新代理、添加代理工具、援引代理、代理.yaml、评估代理、批量活化、连续活化、持续监测、代理C…

运维与云

Azure Deploy

执行已有.azure/部署计划.md和基础设施文件的ALREADY-PREPARED应用程序的Azure部署。 当用户向 CREATE 请求新应用程序时, 请不要使用此技能 。 这种技能运行了 azd上行, azd 部署, trarraform 应用, 和 az 部署命令带有内置…