用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/pluginagentmarketplace/custom-plugin-react-native --skill react-native-basics命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | react-native-basics |
| description | Master React Native fundamentals - components, styling, layout, and Expo |
| sasmp_version | 1.3.0 |
| bonded_agent | 01-react-native-fundamentals |
| bond_type | PRIMARY_BOND |
| version | 2.0.0 |
| updated | 2025-01 |
Learn production-ready React Native fundamentals including core components, StyleSheet, Flexbox, and Expo SDK.
After completing this skill, you will be able to:
View - Container component (like div)
Text - Text display (required for strings)
Image - Image rendering
ScrollView - Scrollable container
FlatList - Optimized list rendering
TextInput - User input
Pressable - Touch handling
// StyleSheet.create for performance
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
padding: 16,
},
title: {
fontSize: 24,
fontWeight: 'bold',
color: '#1a1a1a',
},
});
// Common patterns
flexDirection: 'row' | 'column' // Main axis
justifyContent: 'center' | 'space-between' // Main axis alignment
alignItems: 'center' | 'stretch' // Cross axis alignment
flex: 1 // Grow to fill
import { Platform } from 'react-native';
// Method 1: Platform.select
const styles = StyleSheet.create({
shadow: Platform.select({
ios: { shadowColor: '#000', shadowOpacity: 0.1 },
android: { elevation: 4 },
}),
});
// Method 2: Platform.OS
if (Platform.OS === 'ios') {
// iOS specific code
}
# Create new project
npx create-expo-app MyApp
cd MyApp
# Start development
npx expo start
# Build for production
eas build --platform all
import React from 'react';
import { View, Text, StyleSheet, FlatList, Pressable } from 'react-native';
interface Item {
id: string;
title: string;
}
export default function App() {
const [items, setItems] = React.useState<Item[]>([
{ id: '1', title: 'Learn React Native' },
{ id: '2', title: 'Build first app' },
]);
return (
<View style={styles.container}>
<Text style={styles.title}>My Tasks</Text>
<FlatList
data={items}
keyExtractor={(item) => item.id}
renderItem={({ item }) => (
<Pressable style=>
{item.title}
)}
/>
);
}
styles = .({
: { : , : , : },
: { : , : , : },
: { : , : , : , : },
});
| Error | Cause | Solution |
|---|---|---|
| "Text strings must be wrapped" | Raw text outside <Text> | Wrap all text in <Text> |
| Styles not applying | Plain object vs StyleSheet | Use StyleSheet.create() |
| FlatList not scrolling | No height/flex | Add flex: 1 to parent |
| Image not showing | Invalid source | Check URI or require path |
Skill("react-native-basics")
Bonded Agent: 01-react-native-fundamentals