mobile-app-developer by 404kidwiz/claude-supercode-skills
npx skills add https://github.com/404kidwiz/claude-supercode-skills --skill mobile-app-developer提供跨平台移动开发专业知识,专注于 React Native 和 Flutter。构建具有离线优先架构、原生模块集成以及针对 iOS 和 Android 的优化交付流程的高性能移动应用程序。
Which framework fits the project?
│
├─ **React Native (0.76+)**
│ ├─ Team knows React? → **Yes** (Fastest ramp-up)
│ ├─ Need OTA Updates? → **Yes** (Expo Updates / CodePush)
│ ├─ Heavy Native UI? → **Maybe** (New Architecture makes this easier, but complex)
│ └─ Ecosystem? → **Massive** (npm, vast library support)
│
├─ **Flutter (3.24+)**
│ ├─ Pixel Perfection needed? → **Yes** (Skia/Impeller rendering guarantees consistency)
│ ├─ Heavy Animation? → **Yes** (60/120fps default)
│ ├─ Desktop support needed? → **Yes** (First-class Windows/macOS/Linux)
│ └─ Dart knowledge? → **Required** (Learning curve for JS devs)
│
└─ **Expo (Managed RN)**
├─ Rapid MVP? → **Yes** (Zero config, EAS Build)
├─ Custom Native Code? → **Yes** (Config Plugins handle 99% of cases)
└─ Ejecting? → **No** (Prebuild allows native code without ejecting)
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 架构 | React Native | Flutter | 最佳适用场景 |
|---|---|---|---|
| MVVM | MobX / Legend-State | Provider / Riverpod | 响应式 UI,清晰的分离 |
| Redux 风格 | Redux Toolkit / Zustand | BLoC / Cubit | 复杂的企业级应用,严格的数据流 |
| 原子化 | Recoil / Jotai | Riverpod | 细粒度更新,高性能 |
| 离线优先 | WatermelonDB / Realm | Hive / Isar / Drift | 需要健壮同步功能的应用 |
| 指标 | 目标 | 优化策略 |
|---|---|---|
| 冷启动 | < 1.5 秒 | Hermes (RN),懒加载,延迟初始化 |
| 帧率 | 60fps (最低) / 120fps (目标) | Memoization,释放线程 (JS) vs UI 线程,Impeller (Flutter) |
| 包大小 | < 30MB (通用) | ProGuard/R8,拆分 APK,资源优化 |
| 内存 | < 200MB (平均) | 图片缓存,列表项回收 (FlashList) |
危险信号 → 升级至 mobile-developer (原生):
目标: 使用 Fabric 和 TurboModules 初始化一个高性能的 React Native 应用。
步骤:
初始化 (Expo)
npx create-expo-app@latest my-app -t default
cd my-app
npx expo install expo-router react-native-reanimated
配置 (app.json)
{
"expo": {
"newArchEnabled": true,
"plugins": [
"expo-router",
"expo-font",
["expo-build-properties", {
"ios": { "newArchEnabled": true },
"android": { "newArchEnabled": true }
}]
]
}
}
目录结构 (基于文件的路由)
/app
/_layout.tsx # 根布局 (Provider 设置)
/index.tsx # 主屏幕
/(tabs)/ # 标签页导航组
/_layout.tsx # 标签页配置
/home.tsx
/settings.tsx
/product/[id].tsx # 动态路由
/components # UI 组件
/services # API 与逻辑
/store # 状态管理
导航实现
// app/_layout.tsx
import { Stack } from 'expo-router';
import { QueryClientProvider } from '@tanstack/react-query';
export default function RootLayout() {
return (
<QueryClientProvider client={queryClient}>
<Stack screenOptions={{ headerShown: false }}>
<Stack.Screen name="(tabs)" />
<Stack.Screen name="modal" options={{ presentation: 'modal' }} />
</Stack>
</QueryClientProvider>
);
}
目标: 以 60fps 渲染 10,000+ 个列表项。
步骤:
替换 FlatList
import { FlashList } from "@shopify/flash-list";
const MyList = ({ data }) => {
return (
<FlashList
data={data}
renderItem={({ item }) => <ListItem item={item} />}
estimatedItemSize={100} // 对性能至关重要
keyExtractor={item => item.id}
onEndReached={loadMore}
onEndReachedThreshold={0.5}
/>
);
};
Memoize 列表项
const ListItem = React.memo(({ item }) => {
return (
<View style={styles.item}>
<Text>{item.title}</Text>
</View>
);
}, (prev, next) => prev.item.id === next.item.id);
图片优化
expo-image (使用 SDWebImage/Glide 原生缓存)。cachePolicy="memory-disk"。transition={200} 实现平滑加载。使用场景: 无需 eject 即可添加原生代码。
// plugins/withCustomNative.js
const { withAndroidManifest } = require('@expo/config-plugins');
const withCustomNative = (config) => {
return withAndroidManifest(config, async (config) => {
const androidManifest = config.modResults;
// 添加权限
androidManifest.manifest['uses-permission'].push({
$: { 'android:name': 'android.permission.BLUETOOTH' }
});
return config;
});
};
module.exports = withCustomNative;
使用场景: 使用 FaceID/TouchID 进行安全登录。
import * as LocalAuthentication from 'expo-local-authentication';
export function useBiometrics() {
const authenticate = async () => {
const hasHardware = await LocalAuthentication.hasHardwareAsync();
if (!hasHardware) return false;
const isEnrolled = await LocalAuthentication.isEnrolledAsync();
if (!isEnrolled) return false;
const result = await LocalAuthentication.authenticateAsync({
promptMessage: 'Login with FaceID',
fallbackLabel: 'Use Passcode',
});
return result.success;
};
return { authenticate };
}
使用场景: 优雅地处理认证令牌、重试和网络错误。
import axios from 'axios';
import * as SecureStore from 'expo-secure-store';
const api = axios.create({ baseURL: 'https://api.example.com' });
api.interceptors.request.use(async (config) => {
const token = await SecureStore.getItemAsync('auth_token');
if (token) {
config.headers.Authorization = `Bearer ${token}`;
}
return config;
});
api.interceptors.response.use(
(response) => response,
async (error) => {
if (error.response?.status === 401) {
// 触发令牌刷新逻辑
// 如果刷新失败,重定向到登录页
}
return Promise.reject(error);
}
);
openapi-generator)。flexDirection, justifyContent)。testID="login_btn")。每周安装数
78
代码仓库
GitHub 星标数
45
首次出现
2026 年 1 月 24 日
安全审计
安装于
opencode64
codex58
gemini-cli58
claude-code58
cursor53
github-copilot51
Provides cross-platform mobile development expertise specializing in React Native and Flutter. Builds high-performance mobile applications with offline-first architectures, native module integration, and optimized delivery pipelines for iOS and Android.
Which framework fits the project?
│
├─ **React Native (0.76+)**
│ ├─ Team knows React? → **Yes** (Fastest ramp-up)
│ ├─ Need OTA Updates? → **Yes** (Expo Updates / CodePush)
│ ├─ Heavy Native UI? → **Maybe** (New Architecture makes this easier, but complex)
│ └─ Ecosystem? → **Massive** (npm, vast library support)
│
├─ **Flutter (3.24+)**
│ ├─ Pixel Perfection needed? → **Yes** (Skia/Impeller rendering guarantees consistency)
│ ├─ Heavy Animation? → **Yes** (60/120fps default)
│ ├─ Desktop support needed? → **Yes** (First-class Windows/macOS/Linux)
│ └─ Dart knowledge? → **Required** (Learning curve for JS devs)
│
└─ **Expo (Managed RN)**
├─ Rapid MVP? → **Yes** (Zero config, EAS Build)
├─ Custom Native Code? → **Yes** (Config Plugins handle 99% of cases)
└─ Ejecting? → **No** (Prebuild allows native code without ejecting)
| Architecture | React Native | Flutter | Best For |
|---|---|---|---|
| MVVM | MobX / Legend-State | Provider / Riverpod | Reactive UI, clean separation |
| Redux-style | Redux Toolkit / Zustand | BLoC / Cubit | Complex enterprise apps, strict flow |
| Atomic | Recoil / Jotai | Riverpod | Fine-grained updates, high performance |
| Offline-First | WatermelonDB / Realm | Hive / Isar / Drift | Apps needing robust sync |
| Metric | Target | Optimization Strategy |
|---|---|---|
| Cold Start | < 1.5s | Hermes (RN), Lazy Loading, Deferred initialization |
| Frame Rate | 60fps (min) / 120fps (target) | Memoization, release thread (JS) vs UI thread, Impeller (Flutter) |
| Bundle Size | < 30MB (Universal) | ProGuard/R8, Split APKs, Asset Optimization |
| Memory | < 200MB (Avg) | Image caching, List recycling (FlashList) |
Red Flags → Escalate tomobile-developer (Native):
Goal: Initialize a high-performance React Native app with Fabric & TurboModules.
Steps:
Initialization (Expo)
npx create-expo-app@latest my-app -t default
cd my-app
npx expo install expo-router react-native-reanimated
Configuration (app.json)
{
"expo": {
"newArchEnabled": true,
"plugins": [
"expo-router",
"expo-font",
["expo-build-properties", {
"ios": { "newArchEnabled": true },
"android": { "newArchEnabled": true }
}]
]
}
}
Directory Structure (File-based Routing)
/app
/_layout.tsx # Root layout (Provider setup)
/index.tsx # Home screen
/(tabs)/ # Tab navigation group
/_layout.tsx # Tab configuration
/home.tsx
/settings.tsx
/product/[id].tsx # Dynamic route
/components # UI Components
/services # API & Logic
/store # State Management
Navigation Implementation
// app/_layout.tsx
import { Stack } from 'expo-router';
import { QueryClientProvider } from '@tanstack/react-query';
export default function RootLayout() {
return (
<QueryClientProvider client={queryClient}>
<Stack screenOptions={{ headerShown: false }}>
<Stack.Screen name="(tabs)" />
<Stack.Screen name="modal" options={{ presentation: 'modal' }} />
</Stack>
</QueryClientProvider>
);
}
Goal: Render 10,000+ list items at 60fps.
Steps:
Replace FlatList
import { FlashList } from "@shopify/flash-list";
const MyList = ({ data }) => {
return (
<FlashList
data={data}
renderItem={({ item }) => <ListItem item={item} />}
estimatedItemSize={100} // Critical for performance
keyExtractor={item => item.id}
onEndReached={loadMore}
onEndReachedThreshold={0.5}
/>
);
};
Memoize List Items
const ListItem = React.memo(({ item }) => {
return (
<View style={styles.item}>
<Text>{item.title}</Text>
</View>
);
}, (prev, next) => prev.item.id === next.item.id);
Image Optimization
expo-image (uses SDWebImage/Glide native caching).cachePolicy="memory-disk".transition={200} for smooth loading.Use case: Adding native code without ejecting.
// plugins/withCustomNative.js
const { withAndroidManifest } = require('@expo/config-plugins');
const withCustomNative = (config) => {
return withAndroidManifest(config, async (config) => {
const androidManifest = config.modResults;
// Add permission
androidManifest.manifest['uses-permission'].push({
$: { 'android:name': 'android.permission.BLUETOOTH' }
});
return config;
});
};
module.exports = withCustomNative;
Use case: Secure login with FaceID/TouchID.
import * as LocalAuthentication from 'expo-local-authentication';
export function useBiometrics() {
const authenticate = async () => {
const hasHardware = await LocalAuthentication.hasHardwareAsync();
if (!hasHardware) return false;
const isEnrolled = await LocalAuthentication.isEnrolledAsync();
if (!isEnrolled) return false;
const result = await LocalAuthentication.authenticateAsync({
promptMessage: 'Login with FaceID',
fallbackLabel: 'Use Passcode',
});
return result.success;
};
return { authenticate };
}
Use case: Handling auth tokens, retries, and network errors gracefully.
import axios from 'axios';
import * as SecureStore from 'expo-secure-store';
const api = axios.create({ baseURL: 'https://api.example.com' });
api.interceptors.request.use(async (config) => {
const token = await SecureStore.getItemAsync('auth_token');
if (token) {
config.headers.Authorization = `Bearer ${token}`;
}
return config;
});
api.interceptors.response.use(
(response) => response,
async (error) => {
if (error.response?.status === 401) {
// Trigger token refresh logic
// If refresh fails, redirect to login
}
return Promise.reject(error);
}
);
openapi-generator).flexDirection, justifyContent).testID="login_btn").Weekly Installs
78
Repository
GitHub Stars
45
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode64
codex58
gemini-cli58
claude-code58
cursor53
github-copilot51
Flutter无障碍功能实现指南:UI设计、语义组件与网页适配完整教程
3,900 周安装