Help us improve
Share bugs, ideas, or general feedback.
Intelligent environment reset for React Native projects — diagnoses stale caches before cleaning instead of blindly nuking everything. Triggers on "clean build", "reset caches", "fresh start", "metro won't start", "build is broken", "nuclear clean", "clear derived data".
npx claudepluginhub ryanthedev/react-native-foundations.skillHow this skill is triggered — by the user, by Claude, or both
Slash command
/react-native-foundations:cleanThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
**On load:** Read `../../.claude-plugin/plugin.json` from this skill's base directory. Display `clean v{version}` before proceeding.
Batch-scans Flutter/Android/iOS/Node.js projects for build artifacts, dependencies, and caches; reports sizes; performs tiered cleanup to free disk space on low storage.
Upgrades React Native apps using rn-diff-purge diffs, updates dependencies, migrates iOS/Android configs, resolves CocoaPods/Gradle changes, and handles breaking APIs including Expo SDK.
Upgrades React Native apps to newer versions using rn-diff-purge diffs, updates package.json, migrates iOS/Android config, resolves CocoaPods and Gradle changes, and handles breaking API updates.
Share bugs, ideas, or general feedback.
On load: Read ../../.claude-plugin/plugin.json from this skill's base directory. Display clean v{version} before proceeding.
Diagnose-first environment reset for React Native projects. Checks what is actually stale before cleaning, then executes only the necessary steps.
Run the diagnosis script to check environment state:
bash ${CLAUDE_SKILL_DIR}/scripts/diagnose.sh
This outputs a JSON report covering all cache/state checks. Review the report and summarize findings for the user.
Based on the diagnosis, recommend targeted clean steps. Present only what is needed — do not suggest cleaning things that are healthy.
Run the clean script with flags for the necessary targets:
bash ${CLAUDE_SKILL_DIR}/scripts/clean.sh [flags]
WARNING: Always confirm with the user before running destructive clean operations.
Do not run --all or --node-modules without explicit user approval.
After cleaning, optionally verify the environment works:
npx react-native startios-sim skill if available| Flag | What it removes | When to use |
|---|---|---|
--metro | /tmp/metro-*, /tmp/haste-*, React Native temp caches | Metro bundling errors, stale module resolution |
--watchman | Watchman watches and internal state | File change detection broken, phantom "file not found" errors |
--node-modules | node_modules/ + reinstall | Dependency corruption, version mismatch after branch switch |
--pods | ios/Pods/, ios/Podfile.lock re-install | iOS build errors after native dependency changes |
--derived-data | ~/Library/Developer/Xcode/DerivedData | Xcode build failures, stale Swift/ObjC caches |
--gradle | android/.gradle/, android/app/build/ | Android build failures, stale Gradle caches |
--all | All of the above | True nuclear option — last resort |
| Check | How | Indicates |
|---|---|---|
| Port 8081 | lsof -i :8081 | Metro already running / port conflict |
| Watchman | watchman watch-list | Stale or broken file watches |
| node_modules integrity | Compare .package-lock.json mtime vs package-lock.json | Modules out of sync with lockfile |
| Pods staleness | Compare ios/Pods mtime vs ios/Podfile mtime | Pods need reinstall |
| DerivedData size | du -sh ~/Library/Developer/Xcode/DerivedData | Large DerivedData may cause issues |
| Android build state | Check android/.gradle, android/app/build existence | Stale Android build artifacts |
| Metro cache | Check /tmp/metro-* existence | Stale Metro bundler cache |
--pods will run pod install after removing Pods--node-modules will run npm install (or yarn) after removing node_modulesdocs skill for API/config guidance