
Brownfield Navigation
- 5 installs
- 541 repo stars
- Updated August 1, 2026
- callstack/react-native-brownfield
brownfield-navigation is a Claude skill that routes React Native navigation calls to existing native screens through a generated brownfield navigation contract.
About
This skill routes React Native navigation calls to existing native screens through a generated brownfield navigation contract. A developer defines brownfield.navigation.ts, runs npx brownfield navigation:codegen, and wires native delegates before making JS calls. It is used when integrating React Native into an existing native app and debugging issues like 'undefined is not a function' or API drift after contract edits. It matters because it keeps the JS-to-native navigation boundary type-safe and code-generated.
- Routes React Native calls to existing native screens via a generated navigation contract
- Three-step flow: define brownfield.navigation.ts, run codegen, wire native delegates
- Ships iOS and Android delegate integration references plus a codegen command reference
Brownfield Navigation by the numbers
- 5 all-time installs (skills.sh)
- Ranked #828 of 1,039 Mobile Development skills by installs in the Skillselion catalog
- Data as of Aug 2, 2026 (Skillselion catalog sync)
brownfield-navigation capabilities & compatibility
- Capabilities
- native navigation · codegen · brownfield integration
- Use cases
- api development
What brownfield-navigation says it does
Route React Native calls to existing native screens through a generated Brownfield navigation contract.
Brownfield navigation has three steps: 1. Define `brownfield.navigation.ts` 2. Run `npx brownfield navigation:codegen` 3. Wire native delegates before JS calls
npx skills add https://github.com/callstack/react-native-brownfield --skill brownfield-navigationAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 5 |
|---|---|
| repo stars | ★ 541 |
| Last updated | August 1, 2026 |
| Repository | callstack/react-native-brownfield ↗ |
What it does
Route React Native navigation calls to existing native iOS and Android screens through a generated brownfield contract.
Who is it for?
Teams embedding React Native into an existing native app who need to call native screens from JS
Skip if: Greenfield React Native apps with no existing native navigation to bridge
When should I use this skill?
defining the navigation contract, running codegen, wiring native delegates, or debugging 'undefined is not a function' or API drift
What you get
A generated navigation contract wiring React Native calls to native iOS and Android screens
- brownfield.navigation.ts contract
- generated navigation artifacts
- native delegate registrations
By the numbers
- 3-step navigation flow
- 4-command minimal reference
Files
Overview
Brownfield navigation has three steps: 1. Define brownfield.navigation.ts 2. Run npx brownfield navigation:codegen 3. Wire native delegates before JS calls
Read only the smallest reference that matches the question.
Routing (concern -> file)
| Concern | Read |
|---|---|
| Contract file location, supported signatures, codegen command, generated artifacts | `references/setup-codegen.md` |
Calling methods from React Native, undefined is not a function, API drift after contract edits | `references/javascript-usage.md` |
| iOS-only delegate implementation and startup registration | `references/native-ios-integration.md` |
| Android-only delegate implementation and startup registration | `references/native-android-integration.md` |
Minimal command reference
npx brownfield navigation:codegen
npx brownfield package:ios
npx brownfield package:android
npx brownfield publish:androidJavaScript Usage
Use this file for React Native call sites and JS-facing failures.
Call pattern
import BrownfieldNavigation from '@callstack/brownfield-navigation';
BrownfieldNavigation.openNativeProfile('user-123');Checklist
- Call generated methods directly from user actions first
- Keep params explicit and stable
- Keep method names aligned with generated API
Fast triage
undefined is not a function:- Usually codegen/rebuild drift after contract edits
- Method exists but opens wrong screen:
- Usually delegate wiring issue (see native docs)
- Crash on first call:
- Often delegate registration order issue (see native docs)
Recovery order
1. Confirm contract shape 2. Run npx brownfield navigation:codegen 3. Rebuild iOS/Android 4. Retest JS call
Native Integration (Android)
Implement delegate
- Implement generated
BrownfieldNavigationDelegate - Route each generated method to intended native destination
- Map params directly (for example through
Intentextras)
Register delegate at startup
- Call:
BrownfieldNavigationManager.setDelegate(...)- Register in startup flow (for example
onCreate) - Ensure registration happens before RN calls
Minimal pattern
class MainActivity : AppCompatActivity(), BrownfieldNavigationDelegate {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
BrownfieldNavigationManager.setDelegate(this)
}
override fun openNativeProfile(userId: String) {
val intent = Intent(this, ProfileActivity::class.java).apply {
putExtra("userId", userId)
}
startActivity(intent)
}
}Native Integration (iOS)
Implement delegate
- Conform to generated
BrownfieldNavigationDelegate - Route each generated method to intended UIKit/SwiftUI destination
- Execute presentation on main thread
Register delegate at startup
- Call:
BrownfieldNavigationManager.shared.setDelegate(navigationDelegate: ...)- Register before RN screens that call Brownfield navigation are shown
- Keep a strong delegate reference for app lifetime
Minimal pattern
final class AppNavigationDelegate: BrownfieldNavigationDelegate {
func openNativeProfile(userId: String) {
DispatchQueue.main.async {
// present native screen
}
}
}
BrownfieldNavigationManager.shared.setDelegate(navigationDelegate: navigationDelegate)Setup and Codegen
Use this file for contract shape and generation behavior.
Contract requirements
- File name:
brownfield.navigation.ts - File location: React Native app root
- Interface name:
BrownfieldNavigationSpecorSpec - Prefer
voidnavigation methods - Promise-returning methods are not supported by generated native implementations
Codegen
- Default command:
npx brownfield navigation:codegen - Explicit path:
npx brownfield navigation:codegen <specPath> - Use explicit path when running outside app root or in monorepos
Artifact location
Generated files are written under resolved @callstack/brownfield-navigation package root.
Typical outputs:
src/NativeBrownfieldNavigation.tssrc/index.tsios/BrownfieldNavigationDelegate.swiftios/NativeBrownfieldNavigation.mmandroid/src/main/java/<generated-package>/BrownfieldNavigationDelegate.ktandroid/src/main/java/<generated-package>/NativeBrownfieldNavigationModule.kt
Regeneration rule
If contract surface changes (method names, params, types, optionality): 1. Update brownfield.navigation.ts 2. Run codegen 3. Rebuild native apps
Related skills
FAQ
What are the steps for brownfield navigation?
Define brownfield.navigation.ts, run npx brownfield navigation:codegen, then wire native delegates before JS calls.
Why do I get 'undefined is not a function'?
It signals API drift or missing native delegate registration; the javascript-usage reference covers this case.