用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tomevault-io/skills-registry --skill react-native命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
| Use when this capability is needed.
> Use when this capability is needed.
Review architecture and API design for the vfs-s3 project. Use when the user mentions @architect, asks to review an issue's design, discuss module boundaries, API shape, or architectural decisions for vfs-s3. Also trigger when the user wants to create an ADR (Architecture Decision Record) or evaluate a technical approach for the project. Intended for dispatch from Codex automation or Claude routines; GitHub trigger phrase: @vfs-s3-bot please prepare design doc Use when this capability is needed.
基于 SOC 职业分类
正在显示 SKILL.md
| name | react-native |
| description | | Use when this capability is needed. |
import { View, Text, ScrollView, FlatList, Pressable, StyleSheet } from 'react-native';
function ProductList({ products }: { products: Product[] }) {
return (
<FlatList
data={products}
keyExtractor={(item) => item.id}
renderItem={({ item }) => (
<Pressable onPress={() => navigate('Detail', { id: item.id })} style={styles.card}>
<Text style={styles.title}>{item.name}</Text>
<Text style={styles.price}>${item.price}</Text>
</Pressable>
)}
ItemSeparatorComponent={() => <View style={styles.separator} />}
/>
);
}
const styles = StyleSheet.create({
card: { padding: 16, backgroundColor: '#fff' },
title: { fontSize: 16, fontWeight: '600' },
price: { fontSize: 14, color: '#666', marginTop: 4 },
separator: { height: 1, backgroundColor: '#eee' },
});
import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
type RootStackParamList = {
Home: undefined;
Detail: { id: string };
};
const Stack = createNativeStackNavigator<RootStackParamList>();
const Tab = createBottomTabNavigator();
function App() {
return (
<NavigationContainer>
<Stack.Navigator>
<Stack.Screen name="Home" component={HomeScreen} />
<Stack.Screen name="Detail" component={DetailScreen} />
</Stack.Navigator>
</NavigationContainer>
);
}
// Type-safe navigation
import { NativeStackScreenProps } from '@react-navigation/native-stack';
= <, >;
() {
{ id } = route.;
;
}
import { Platform } from 'react-native';
const styles = StyleSheet.create({
shadow: Platform.select({
ios: { shadowColor: '#000', shadowOffset: { width: 0, height: 2 }, shadowOpacity: 0.1 },
android: { elevation: 3 },
}),
});
// File-based: Component.ios.tsx / Component.android.tsx (auto-resolved)
import { useQuery, useMutation } from '@tanstack/react-query';
function useProducts() {
return useQuery({
queryKey: ['products'],
queryFn: async () => {
const res = await fetch(`${API_URL}/products`);
if (!res.ok) throw new Error('Failed to fetch');
return res.json() as Promise<Product[]>;
},
});
}
import EncryptedStorage from 'react-native-encrypted-storage';
await EncryptedStorage.setItem('auth_token', token);
const token = await EncryptedStorage.getItem('auth_token');
await EncryptedStorage.removeItem('auth_token');
| Technique | Impact |
|---|---|
FlatList over ScrollView for lists | High |
React.memo on list items | Medium |
useCallback for event handlers in lists | Medium |
| Hermes engine (default in RN 0.70+) | High |
| Avoid inline styles in render | Low-Medium |
InteractionManager.runAfterInteractions | Medium |
| Anti-Pattern | Fix |
|---|---|
| ScrollView for long lists | Use FlatList or FlashList |
| Inline functions in FlatList renderItem | Extract component, use React.memo |
| Storing tokens in AsyncStorage | Use react-native-encrypted-storage |
| No error boundaries | Wrap screens in error boundaries |
| Ignoring keyboard on forms | Use KeyboardAvoidingView |
Source: claude-dev-suite/claude-dev-suite — distributed by TomeVault.