一键导入
expo
Managed workflow for cross-platform mobile apps with EAS. Trigger: When developing with Expo, configuring EAS services, or building mobile apps.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Managed workflow for cross-platform mobile apps with EAS. Trigger: When developing with Expo, configuring EAS services, or building mobile apps.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Paste-ready session summary for context transfer to a new chat. Trigger: User says 'context handoff', 'start fresh', or session needs to continue.
One-at-a-time questioning to fully profile a goal before acting. Trigger: User says 'grill me', goal is vague, or clarification is needed first.
Batch execution with checkpoints. Trigger: When executing plans with batched tasks.
Universal coding principles: DRY, security by default, null guards, and YAGNI. Trigger: When writing or reviewing code in any language or technology.
Accessibility guide (WCAG 2.1/2.2, Level A–AAA). Trigger: When building UI components, interactive elements, or auditing accessibility compliance.
Astro quality patterns: island philosophy, SEO by page type, and Core Web Vitals. Trigger: When reviewing Astro site quality or hydration decisions.
| name | expo |
| description | Managed workflow for cross-platform mobile apps with EAS. Trigger: When developing with Expo, configuring EAS services, or building mobile apps. |
| license | Apache 2.0 |
| metadata | {"version":"1.1","type":"framework","skills":["react-native"],"dependencies":{"expo":">=50.0.0 <51.0.0","react-native":">=0.73.0 <1.0.0","react":">=18.0.0 <19.0.0"},"allowed-tools":["file-reader"]} |
Cross-platform mobile with Expo managed workflow. Setup, native features (EAS Build/Update), deployment with TypeScript and React Native.
Don't use for:
// ✅ CORRECT: Expo SDK modules
import * as Location from "expo-location";
import { Camera } from "expo-camera";
// ❌ WRONG: Direct React Native linking (use Expo modules)
import { NativeModules } from "react-native";
// ✅ CORRECT: Request permissions before using
const { status } = await Location.requestForegroundPermissionsAsync();
if (status === "granted") {
const location = await Location.getCurrentPositionAsync();
}
// ❌ WRONG: No permission check
const location = await Location.getCurrentPositionAsync(); // May crash
// ✅ CORRECT: Typed props and state
interface Props {
title: string;
}
const Component: React.FC<Props> = ({ title }) => {
const [count, setCount] = useState<number>(0);
};
Configure build profiles before submitting to app stores.
{
"build": {
"development": { "developmentClient": true, "distribution": "internal" },
"preview": { "distribution": "internal" },
"production": {}
}
}
# Build for all platforms (production)
eas build --platform all --profile production
# Run development build on device
eas build --platform ios --profile development
Configure OTA updates in app.json. Match runtimeVersion to native changes.
{
"expo": {
"updates": { "url": "https://u.expo.dev/<project-id>" },
"runtimeVersion": { "policy": "appVersion" }
}
}
# Publish JS-only update (no native change needed)
eas update --branch production --message "Fix login crash"
// ❌ WRONG: Ejecting to bare workflow for minor native customization
// Loses: Expo Go dev testing, managed OTA updates, EAS Build simplicity
// ✅ CORRECT: Config plugins handle most native customizations
const { withInfoPlist } = require('@expo/config-plugins');
module.exports = withInfoPlist(config, (config) => {
config.modResults.NSCameraUsageDescription = "For QR scanning";
return config;
});
// Only eject when config plugins cannot satisfy the requirement
Native feature?
→ Check Expo SDK first
Custom native code?
→ Config plugins or eject
Store builds?
→ EAS Build (cloud)
OTA updates?
→ EAS Update
Platform code?
→ Platform.select() or .ios.tsx/.android.tsx
Testing?
→ Expo Go (dev), devices/simulators (final)
Navigation?
→ Expo Router or React Navigation
import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Text, View } from 'react-native';
export default function App() {
return (
<View style={styles.container}>
<Text>Welcome to Expo</Text>
<StatusBar style="auto" />
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});
Platform-specific code: Use Platform.select() for inline differences; platform-specific file extensions (.ios.tsx, .android.tsx) for large divergences between platforms.
Permission denial: Always handle the denied state — show an explanation UI and guide the user to device settings. Never assume permission is granted on subsequent launches.
OTA update conflicts: JS-only changes publish via eas update. Any native code change (new SDK module, config plugin change) requires a new app store build with a matching runtimeVersion bump.
Offline mode: Use @react-native-community/netinfo to detect connectivity. Cache data with AsyncStorage or MMKV. Show a visible offline indicator and gracefully block network-dependent actions.
Custom native modules: Use Expo config plugins first. Use a development client (expo-dev-client) for modules not available in Expo Go. Only eject to bare workflow when config plugins cannot satisfy the requirement.
eas init run — project linked to EASeas.json configured with development, preview, production profilesapp.json (android.permissions, ios.infoPlist)updates.url, runtimeVersion.policy)Platform.select() or platform file extensions