expo-prebuild
Skill8 starsChanged 3 months agoMITView on GitHub
Managed-to-bare transition with Expo prebuild, the ios/android directories, .easignore, native-upgrade discipline, and custom-mod application order. Triggers on expo prebuild, prebuild, managed to bare, bare workflow, native upgrade, ios android directory, easignore, prebuild cache, eject, sync native, native code generation.
- Reads credentials
- Deletes or force-pushes
- Installs packages
In this repository63 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- ai-automationSkill
- consultingSkill
- contentSkill
- customer-successSkill
- data-analyticsSkill
- designSkill
- design-tokensSkill
- developmentSkill
- devopsSkill
- ecommerceSkill
- emailSkill
- expo-app-configSkill
- expo-config-pluginSkill
- expo-dev-clientSkill
- expo-eas-buildSkill
- expo-eas-submitSkill
- expo-eas-updateSkill
- expo-modulesSkill
- expo-notificationsSkill
- expo-orchestratorSkill
- expo-routerSkill
- expo-troubleshootingSkill
- financeSkill
- frontend-tasteSkill
- marketingSkill
- market-researchSkill
- mobileSkill
- pentest-adSkill
- pentest-apiSkill
- pentest-bizlogicSkill
- pentest-bugbountySkill
- pentest-cicdSkill
- pentest-cloudSkill
- pentest-credentialsSkill
- pentest-ctfSkill
- pentest-detectionSkill
- pentest-engagementSkill
- pentest-exploit-chainSkill
- pentest-forensicsSkill
- pentest-llmSkill
- pentest-malwareSkill
- pentest-mobileSkill
- pentest-opsec-evidenceSkill
- pentest-orchestratorSkill
- pentest-privescSkill
- pentest-reconSkill
- pentest-reportSkill
- pentest-socialSkill
- pentest-stigSkill
- pentest-threat-modelSkill
- pentest-webSkill
- pentest-wirelessSkill
- productivitySkill
- productSkill
- salesSkill
- security-checkSkill
- securitySkill
- seo-crawl-budgetSkill
- seoSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 59
Don't run prebuild — go straight to Xcode/Android Studio
- Distinctive: line 107
If you're not using CNG:
- Distinctive: line 128
If there's a clash: one plugin adds a key to Info.plist, the next must not delete it.
- Very specific: line 191
--clean: use often — it fixes stale-residue problems - Distinctive: line 192
Write the plugin order explicitly (add comments)
- Distinctive: line 193
Pod install: after every prebuild (if an iOS native dep changes)
- Very specific: line 194
Run expo-doctor before and after prebuild
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
expo-prebuild
A guide to the managed → bare transition and continuous native sync with npx expo prebuild. Managing the ios/ and android/ directories, .easignore, the native-upgrade flow, and custom-mod application order. Plugin writing lives in expo-config-plugin.
What It Does
- Generates the native projects with the
prebuildcommand - Continuous native generation (CNG) vs persisted native decision
- EAS build cleanup with
.easignore - Native upgrade flow (Expo SDK + dependencies)
- Prebuild cache and
--cleanflag usage - Custom mod compose order
Prebuild Commands
# Basic
npx expo prebuild
# Single platform
npx expo prebuild --platform ios
npx expo prebuild --platform android
# Clean start (delete and regenerate the native directories)
npx expo prebuild --clean
# Specific template
npx expo prebuild --template <github-url-or-tarball>
# Skip dependency install
npx expo prebuild --no-installTwo Strategies
A) Continuous Native Generation (CNG) — Recommended
- Don't commit the
ios/andandroid/directories prebuildruns before every build (EAS does it automatically)- Native config is fully generated from
app.config.ts+ plugins - Advantage: easy SDK upgrades, no conflicts
- Limit: very custom native changes = you must write a config plugin
B) Persisted Native (the old "bare")
ios/andandroid/are committed- Don't run
prebuild— go straight to Xcode/Android Studio - Advantage: full native control
- Limit: manual SDK upgrades, expect conflicts
.gitignore (for CNG)
/ios
/android.easignore (speeds up the EAS build)
/ios
/android
.expo/
node_modules/
*.test.ts
__tests__/
docs/
apps/web/
packages/web-only/Every file in
.gitignoreis fine for.easignoretoo. Without.easignore, EAS uses.gitignore.
Native Upgrade Flow
# 1. Upgrade the Expo SDK
npx expo install expo@latest
npx expo install --check # detect incompatible packages
npx expo install --fix # auto-pull compatible versions
# 2. Prebuild again (always, if using CNG)
npx expo prebuild --clean
# 3. Pod install (iOS)
cd ios && pod install && cd ..
# 4. Test
npx expo run:ios
npx expo run:androidPersisted Native Mode: Manual Patch Flow
If you're not using CNG:
# 1. See which native changes the new Expo SDK brought
npx expo prebuild --clean --platform ios
# Review the ios/ changes with git diff
# 2. Apply the patches by hand to your own ios/ android/ directories
# 3. Commit ios/ android/Higher chance of errors. Moving to CNG is usually less painful.
Custom Mod Application Order
During prebuild the mods run in order:
- The order in the
app.config.tspluginsarray is critical withInfoPlistmods are applied first- Then the
withDangerousModmods mod.finalizelast
If there's a clash: one plugin adds a key to Info.plist, the next must not delete it.
// app.config.ts
export default {
expo: {
plugins: [
"./plugins/withBaseConfig", // 1. Base
"./plugins/withFeatureFlags", // 2. Add the flags
"./plugins/withFinalize", // 3. Final cleanup
],
},
};Prebuild Cache
# Clear the cache (if there's a problem)
rm -rf node_modules .expo ios android
npm install
npx expo prebuild --clean
cd ios && pod install && cd ..iOS Pods cache:
cd ios
pod cache clean --all
pod deintegrate
pod installGradle cache:
cd android
./gradlew --stop
./gradlew clean
rm -rf ~/.gradle/caches/build-cache-*Verification
# Native file check
ls -la ios/MyApp.xcworkspace
ls -la android/app/build.gradle
# Info.plist plugin effect
plutil -p ios/MyApp/Info.plist | grep MyCustomKey
# AndroidManifest plugin effect
grep "API_KEY" android/app/src/main/AndroidManifest.xml
# Run
npx expo run:ios
npx expo run:androidBest Practices
- Choose CNG mode (don't commit ios/android) — SDK upgrades get easier
.easignorereduces the EAS upload size--cleanuse often — it fixes stale-residue problems- Write the plugin order explicitly (add comments)
- Pod install after every prebuild (if an iOS native dep changes)
- Run
expo-doctorbefore and after prebuild
Common Failure Patterns
ios/committed but a plugin exists too → manual patch + plugin clashpod installskipped → iOS build "module not found"- Gradle cache residue → "duplicate class"
- A plugin change without
--clean→ old state remains - Native dependency missing from
package.jsonbut present inios/Podfile→ lost in CI expo-modules-autolinkingversion mismatch → autolink fails
Hard Refusal
- Committing another developer's native code without permission
- Prebuilding with a forged bundle ID and trying to submit
- Native modification that violates App Store rules (private API usage)
Output Format
- CNG vs persisted decision (rationale)
.easignoreexample- Prebuild command (copy-paste)
- Native upgrade order
- Verification commands
- Next step:
expo-config-plugin(custom mod) orexpo-eas-build
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

