Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

expo-brownfield — Claude Code skill: what it does, how to install

Embeds React Native and Expo into existing native iOS and Android apps. Useful when adding cross-platform screens to SwiftUI, UIKit, or Kotlin hosts.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add expo/skills --skill expo-brownfield -a claude-code
Open on GitHub

What expo-brownfield does

The skill guides an agent through incrementally adopting React Native in native projects. It supports two strategies. The isolated route packages React Native code into prebuilt AAR or XCFramework artifacts, sparing native engineers from installing Node.js or mobile JS tooling. The integrated route plugs React Native sources straight into the existing Gradle and CocoaPods setups.

The core rule is strict: never run prebuild on a manually maintained native host project. Isolated producers may rely on Continuous Native Generation, but their generated ios/ and android/ folders must stay completely decoupled from the consuming app.

The environment building the JavaScript bundle requires Node.js LTS and the repo's original lockfile. Validating the integration demands running a Release build with Metro stopped; testing merely in Expo Go does not count as complete verification.

What it helps with

  • package a React Native feature into an AAR or XCFramework
  • add Expo and React Native to existing Gradle and CocoaPods builds
  • embed React Native views into SwiftUI, UIKit, or Kotlin screens
  • verify native-to-JS lifecycle events and result passing

Example prompts for the agent

  • Show me how to package this React Native module into an XCFramework for our iOS app
  • Help embed an Expo screen into an existing SwiftUI view and pass initial parameters
  • How do we set up an isolated brownfield build so Android devs don't need Node.js?

How to install expo-brownfield

1Skills CLI (Vercel)

npx skills add expo/skills --skill expo-brownfield -a claude-code

2Manually: put the files in place

~/.claude/skills/expo-brownfield/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/expo-brownfield/

From the same set7

The whole set →

Similar

argent-metro-debugger software-mansion A skill that connects a debugger to a JS runtime via CDP. Inspect React components, read console logs, and evaluate code live. Works with React Native (iOS, Android, Vega) and Chromium apps (Electron, browsers). Claude Code CX Codex Cursor +1 26,200installs argent-test-ui-flow software-mansion A skill for autonomous iOS and Android UI testing in Claude Code. Runs interact-screenshot-verify loops through argent MCP tools to check flows and screens. Claude Code CX Codex Cursor +1 26,200installs flutter-expert https://github.com/Jeffallan Skill for building cross-platform apps with Flutter 3+ and Dart. Covers widgets, state management via Riverpod or Bloc, GoRouter navigation, and performance optimization. Claude Code CX Codex Cursor +1 14,300installs argent-screenshot-diff software-mansion Compares before and after screenshots to catch layout shifts, spacing, color and text rendering changes. Claude Code CX Codex Cursor +1 24,900installs swiftui-design nexu-io A skill that guides SwiftUI interface design by clear rules, avoiding typical AI-code mistakes. Directs design decisions, validates brand assets, and reviews layouts across five dimensions. Claude Code CX Codex Cursor +1 2,900installs flutter-animating-apps nexu-io Implements animations and transitions in Flutter apps. Useful for crafting native iOS and Android motion design. Claude Code CX Codex Cursor +1 2,900installs vercel-react-native-skills vercel A rules pack for React Native and Expo work: lists, animations, navigation, native modules. Load it so your agent makes mobile changes the same way every time. Claude Code CX Codex Cursor +1 253,900installs animate-expo emilkowalski Builds React Native and Expo animations using Reanimated and Gesture Handler. Helps keep motion on the UI thread and avoid dropped frames on physical devices. Claude Code CX Codex Cursor +1 135,900installs

Questions about expo-brownfield

How to install expo-brownfield in Claude Code?

Run npx skills add expo/skills --skill expo-brownfield -a claude-code.

What does expo-brownfield do?

It provides workflow instructions to embed React Native and Expo components into existing native iOS and Android projects without rebuilding the host app from scratch.

When should you choose the isolated approach over the integrated one?

Choose isolated when the native mobile team wants to consume artifacts as AAR or XCFramework dependencies without managing Node.js or React Native build tools.

Source text

SKILL.md · MIT
---
name: expo-brownfield
description: Integrate Expo and React Native into an existing native iOS or Android app. Use for brownfield, embedding a React Native screen in SwiftUI/UIKit or Kotlin, or AAR/XCFramework packaging. Covers isolated and integrated approaches. For building or distributing a purely native app with EAS, use eas-app-stores.
---

# Expo Brownfield

A **brownfield** app is an existing native iOS or Android app that adopts React Native incrementally, as opposed to a **greenfield** app that is React Native from day one.

## Inspect the host first

Identify the existing app entry point, navigation owner, native build system, deployment targets, and any React Native runtime already linked. Record the installed Expo, React Native, and brownfield package versions from the lockfile. Adding EAS Build or Submit to a Swift app alone does not require React Native; route that task to `eas-app-stores`.

Preserve the host's SwiftUI `App` / UIKit window and native screens when embedding a feature. **Do not run prebuild in a manually maintained native host**, including during troubleshooting. An isolated Expo producer may use CNG; keep its generated `ios/` and `android/` separate from the consuming app.

Expo supports two distinct ways to add React Native to a brownfield project:

| Approach       | What ships to the native app                                        | When to choose                                                                   |
| -------------- | ------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| **Isolated**   | Prebuilt AAR / XCFramework                                          | Native team doesn't need Node or RN tooling; RN code can live in a separate repo |
| **Integrated** | React Native sources added to the existing Gradle / CocoaPods build | One team owns everything; comfortable with RN tooling; wants a single build      |

For the full decision matrix, see [./references/comparison.md](./references/comparison.md).

## Pick an approach

Use these quick rules — fall through to `comparison.md` for anything ambiguous.

- **Choose isolated** if the iOS/Android team must consume RN as a regular library dependency (AAR or XCFramework), without installing Node, Yarn, or the React Native build toolchain.
- **Choose isolated** if RN code and native code live in separate repositories or release on independent cadences.
- **Choose integrated** if a single team owns both the native and RN code and is willing to add React Native + Expo to the native project's Gradle and CocoaPods setup.
- Both approaches support Metro and Fast Refresh in Debug. Choose integrated for shared build ownership, not because isolated lacks live JS iteration.

## References

- ./references/brownfield-isolated.md -- Build RN as AAR/XCFramework and consume from the native app (BrownfieldActivity, ReactNativeViewController, ReactNativeView)
- ./references/brownfield-integrated.md -- Add RN and Expo directly to existing Gradle and CocoaPods builds, preserving the native app shell
- ./references/feature-integration.md -- Pass input, return results, dismiss, clean up listeners, and forward lifecycle events; includes a SwiftUI host example
- ./references/comparison.md -- Decision criteria, trade-offs, and scenario mapping for choosing an approach
- ./references/troubleshooting.md -- Metro connection, build, signing, and module-resolution issues common to both approaches

More information available at https://docs.expo.dev/brownfield/overview/

## Shared prerequisites

Both approaches require, in the environment that _builds_ the React Native side:

- **Node.js (LTS)** — runs the Expo CLI and JavaScript code.
- The project's package manager and lockfile — npm, Yarn, pnpm, or Bun. Do not switch package managers just to follow an example.

The iOS build environment needs Xcode and CocoaPods (use the project's Gemfile/Bundler setup when present). The isolated consuming app needs Xcode but no CocoaPods or RN tooling just to consume the artifacts.

## Select compatible versions

For an existing Expo/RN project, keep its selected SDK and use `npx expo install` to align dependencies. Do not upgrade it just to follow this skill. For a new producer, use the **current stable SDK** compatible with the host's OS support, dependencies, and build toolchain; confirm the release is stable before selecting it.

Before native setup, read [./references/version-compatibility.md](./references/version-compatibility.md) for matching native templates, toolchain/OS requirements, and build defaults across SDK versions. A purely native consumer has no Expo SDK version to pin, but must satisfy the artifact's requirements.

## Verify the feature in the host

Open the RN screen with input, return a result to native, dismiss, and reopen with fresh input. Check listener cleanup and the host's original navigation. Then build the host in Release with a Release artifact and Metro stopped. Rendering only in Expo Go or the producer's example app does not validate the integration. See [./references/feature-integration.md](./references/feature-integration.md) for the complete acceptance scenario.

## Submitting Feedback
If you encounter errors, misleading or outdated information in this skill, report it so Expo can improve:
```bash
npx --yes @expo/agent-cli@latest feedback --category skills --subject "expo-brownfield" "<actionable feedback>"
```
Only submit when you have something specific and actionable to report. Include as much relevant context as possible.
If an agent repeatedly fails at an Expo task or the user has to step in, submit a brief report of the task, expected result, and what went wrong using `--category evals` and the relevant Expo package or command as `--subject`.

© expo · MIT · expo/skills

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor