Provides architecture guidance for building cross-platform Expo apps (iOS, Android, web) from one codebase. Helps keep apps factored without over-building, covering expo-router, NativeWind, EAS Build/Update, and monorepo setup.
Ships in effective-expo. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
A frontier model writes correct Expo code from a single prompt, then drifts over a multi-turn build — two opposite ways:
A lazy senior avoids both. This skill is the anchor: re-apply it each turn so the app stays factored and stays small.
Share the brains, not the UI — and only the structure the app has actually earned. TypeScript logic is shared; the UI is per-platform; and every layer of structure waits until something real needs it.
| You have… | Do this | Add the heavier thing when |
|---|---|---|
| A mobile app only | One Expo app: app/ (routes) + components/ + lib/ (logic). No monorepo, no packages/. | …web and native need the same TypeScript. Then add the monorepo + packages/. |
| Logic you reuse in 2 screens | A function/hook in lib/. | …it's reused across apps → promote it to packages/. |
| An SDK called in one place | Call it directly. | …it's called from many screens or is upgrade-prone (auth, payments) → wrap it once in lib/. |
| An MVP | Ship the screens. | …a real pain shows up (silent crashes, store-review friction) → then add a crash gate / custom paywall / BFF. |
| A "remind me / notify me" feature | An on-device local notification the phone schedules with itself (expo-notifications); web is a no-op. No server. | …it must fire while the app is closed for days AND can't be re-derived on app-open (depends on other users, or a server clock the phone can't poll) → then a scheduled job. A backend merely storing the data isn't enough — the phone fetches it on open and schedules locally. |
Never add a layer "for the other platforms later." Later can add it in one commit; today it's dead weight.
document) do not run on native or react-native-web. The native UI is a rebuild in RN primitives + NativeWind, not a port. Duplicating a 30-line component beats fighting the boundary with a shared package.packages/ holds only shared TypeScript — types, API client, domain logic, validation. Never UI. (create-t3-turbo is the structural reference if you've reached monorepo scale.) Metro auto-configures monorepos since SDK 52 — don't hand-write watchFolders/resolver unless you're pre-52.lib//packages/, not in screens. A screen wires params to components and hooks; it holds no business logic. But derived render state — a filter/sort/format computed from already-loaded data for one screen — stays in the screen; promoting it to lib/ with a single caller is the over-build. Re-applied each turn, this stops the god-screen without inventing an abstraction the screen didn't need.app/; _layout.tsx defines nav; group folders (group) organize without adding a URL segment; turn on typed routes. Use the file system — don't build a navigation abstraction over it.components/, logic → lib/. That's the whole pattern; resist more.Expo's own rule: inline Platform.OS / Platform.select for one-liners; promote to a platform-extension file (.ios.tsx / .android.tsx / .web.tsx / .native.tsx) only when a whole component diverges. Don't reach for a platform file when a one-line check does it.
app/ (routes), a platform file needs a non-platform sibling (routes stay universal for deep linking). For genuinely different screens, build the variants in components/ with extensions and re-export one as the route.Things AI writes wrong on native (fix on sight — these are bugs, not style):
KeyboardAvoidingView behavior: "padding" (iOS), undefined (Android — "height" breaks scroll).Alert.prompt is iOS-only; silent no-op on Android. Guard + modal fallback.await expo-haptics in a critical path (e.g. sign-out) — can hang on Android. Fire-and-forget.SafeAreaView.Pressable vs TouchableOpacity: different hit-targets on web.plugins. (react-native-purchases v10 autolinks; v9 needed a plugin, so the model suggests the v9 way.) Add a config plugin only if the lib's current docs say so.runtimeVersion: every native release is its own OTA lane; EAS Update JS only reaches matching runtimeVersion — don't promise an OTA fix to users on an older binary.EXPO_PUBLIC_* is embedded in the client bundle = public (publishable keys, base URLs). Secrets (sk_*, Stripe/Clerk secret) never get the prefix; server-side only. For builds, EAS env vars are the source of truth, not local .env.Drifting toward mush?
lib//packages/? → move it. (Derived render state — a filter/sort/format over already-loaded data for one screen — stays put; lifting it to lib/ for one caller is the over-build.)Drifting toward over-build?
4. A monorepo/packages/ with one app, or a wrapper with one caller and a stable SDK? → delete it; use lib/ / call directly.
5. A BFF / crash gate / custom paywall / platform abstraction added before a real need? → YAGNI; add when it bites.
The right answer is usually the smaller one. Pairs well with the ponytail skill.
references/cross-platform-pitfalls.md — full pitfall catalog, EAS/env detail, version pins. Each "heavier" pattern there is marked with the scale that justifies it.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
expo, react-native, cross-platform, mobile-architecture, expo-router, nativewind
Other plugins' skills for the same job
/effective-expo:effective-expofrom effective-expo
npx claudepluginhub human-frontier-labs-inc/human-frontier-labs-marketplace --plugin effective-expo