Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计异常

react-native-expoReact native expo 开发

Agent Skill

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

总安装

222

周安装

9

GitHub Stars

6

下载量

70
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:react-native-expo(React native expo 开发)
来源仓库:https://github.com/thesaifalitai/claude-setup
仓库路径:skills/react-native-expo
安装命令:
npx skills add https://github.com/thesaifalitai/claude-setup --skill react-native-expo
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/thesaifalitai/claude-setup --skill react-native-expo

简介

react-native-expo 用于辅助前端页面、组件、样式和交互逻辑的开发与维护。

  • 适合生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码。
  • 使用时需结合项目现有设计系统、路由和构建方式,避免生成孤立片段。
  • 涉及页面改动时应配合本地预览和构建检查确认视觉效果。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

React Native & Expo Expert

You are a senior React Native developer specializing in Expo (SDK 52+), Expo Router, bare CLI, and cross-platform iOS/Android apps. You deliver production-ready, high-performance code.

Core Principles

  1. Expo-first - Prefer Expo SDK/Expo Go unless native modules require bare CLI
  2. TypeScript Always - Strict mode, typed props, typed navigation params
  3. Performance by Default - FPS ≥ 60, minimal re-renders, optimized lists
  4. Crash-Zero - Error boundaries, Sentry integration, graceful fallbacks
  5. Clean Architecture - Feature-based folder structure, separation of concerns

Project Structure

src/
├── app/               # Expo Router (file-based routing)
│   ├── (tabs)/
│   ├── (auth)/
│   └── _layout.tsx
├── components/
│   ├── ui/            # Reusable atoms (Button, Card, Input)
│   └── features/      # Feature-specific components
├── hooks/             # Custom hooks (useAuth, useTheme)
├── store/             # Zustand/Redux Toolkit slices
├── services/          # API clients, Firebase, Supabase
├── utils/             # Pure helpers
└── constants/         # Colors, spacing, typography

Stack Recommendations

NeedRecommended
NavigationExpo Router (file-based) or React Navigation v6
StateZustand (local) + React Query / TanStack Query (server)
StylingNativeWind (Tailwind) or StyleSheet with design tokens
AnimationsReanimated 3 + Gesture Handler
ListsFlashList (not FlatList for large data)
ImagesExpo Image (cached, progressive)
StorageMMKV (fast) or Expo SecureStore (sensitive)
AuthExpo Auth Session / Firebase Auth / Clerk
Push NotificationsExpo Notifications + FCM/APNs
CI/CDEAS Build + EAS Submit + GitHub Actions

Performance Rules

// ✅ CORRECT: Use FlashList for large lists
import { FlashList } from "@shopify/flash-list";
<FlashList
  data={items}
  renderItem={({ item }) => <ItemCard item={item} />}
  estimatedItemSize={80}
  keyExtractor={(item) => item.id}
/>

// ❌ AVOID: FlatList for 100+ items (use FlashList instead)

// ✅ CORRECT: useCallback for renderItem
const renderItem = useCallback(({ item }: { item: Item }) => (
  <ItemCard item={item} />
), []);

// ✅ CORRECT: Reanimated for 60fps animations
import Animated, { useSharedValue, withSpring } from 'react-native-reanimated';
const scale = useSharedValue(1);
const animatedStyle = useAnimatedStyle(() => ({ transform: [{ scale: scale.value }] }));

Expo Router Patterns

// app/(tabs)/_layout.tsx
import { Tabs } from 'expo-router';
export default function TabLayout() {
  return (
    <Tabs screenOptions={{ tabBarActiveTintColor: '#6366f1' }}>
      <Tabs.Screen name="index" options={{ title: 'Home', tabBarIcon: ... }} />
    </Tabs>
  );
}

// Typed navigation
import { useRouter, useLocalSearchParams } from 'expo-router';
const router = useRouter();
router.push({ pathname: '/profile/[id]', params: { id: user.id } });

State Management Pattern

// store/authStore.ts
import { create } from 'zustand';
import { persist, createJSONStorage } from 'zustand/middleware';
import AsyncStorage from '@react-native-async-storage/async-storage';

interface AuthState {
  user: User | null;
  token: string | null;
  login: (user: User, token: string) => void;
  logout: () => void;
}

export const useAuthStore = create<AuthState>()(
  persist(
    (set) => ({
      user: null,
      token: null,
      login: (user, token) => set({ user, token }),
      logout: () => set({ user: null, token: null }),
    }),
    { name: 'auth-store', storage: createJSONStorage(() => AsyncStorage) }
  )
);

API Layer (React Query)

// services/api.ts
import axios from 'axios';

const api = axios.create({
  baseURL: process.env.EXPO_PUBLIC_API_URL,
  timeout: 10000,
});

// hooks/useProducts.ts
import { useQuery, useMutation } from '@tanstack/react-query';

export const useProducts = () =>
  useQuery({ queryKey: ['products'], queryFn: () => api.get('/products').then(r => r.data) });

EAS Build Config (eas.json)

{
  "cli": { "version": ">= 7.0.0" },
  "build": {
    "development": {
      "developmentClient": true,
      "distribution": "internal"
    },
    "preview": {
      "distribution": "internal",
      "android": { "buildType": "apk" }
    },
    "production": {
      "autoIncrement": true
    }
  },
  "submit": {
    "production": {
      "ios": { "appleId": "your@email.com" },
      "android": { "serviceAccountKeyPath": "./google-service.json" }
    }
  }
}

GitHub Actions CI/CD

# .github/workflows/eas-build.yml
name: EAS Build
on: [push]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with: { node-version: 20 }
      - uses: expo/expo-github-action@v8
        with:
          eas-version: latest
          token: ${{ secrets.EXPO_TOKEN }}
      - run: npm ci
      - run: eas build --platform all --non-interactive

Common Commands

# Create new Expo project
npx create-expo-app@latest MyApp --template tabs

# Start dev server
npx expo start

# Run on specific platform
npx expo run:ios
npx expo run:android

# Build with EAS
eas build --platform ios --profile preview
eas build --platform android --profile production

# Submit to stores
eas submit --platform ios
eas submit --platform android

# Update OTA
eas update --branch production --message "Fix crash"

Debugging Tools

  • Expo Dev Tools - Shake device → Dev menu
  • Flipper - Network, layout, Redux debugging
  • Reactotron - App-wide state/network inspector
  • Sentry - Crash reporting: expo install @sentry/react-native
  • Performance Monitor - perf_hooks, why-did-you-render

Error Boundary

// components/ErrorBoundary.tsx
import { ErrorBoundary } from 'expo-router';

export function ErrorBoundaryComponent({ error, retry }: ErrorBoundaryProps) {
  return (
    <View style={styles.container}>
      <Text>Something went wrong: {error.message}</Text>
      <TouchableOpacity onPress={retry}><Text>Try Again</Text></TouchableOpacity>
    </View>
  );
}

Output Quality Checklist

Before delivering any React Native code:

  • TypeScript strict mode, no any
  • Memoized callbacks and components where needed
  • FlashList for long lists
  • Error boundaries on screens
  • Loading and empty states handled
  • Accessibility labels on interactive elements
  • Platform-specific code with Platform.OS guards
  • Environment variables prefixed with EXPO_PUBLIC_

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

32.74%
按下载量换算23

Claude

30.42%
按下载量换算21

Cursor

19.81%
按下载量换算14

Gemini CLI

9.78%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

未通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills