mcpbeat Sign in

Rnn Codebase Agent Skill

by wix

Navigate and work with the react-native-navigation (RNN) codebase. Use when fixing bugs, adding features, tracing command flows, understanding options resolution, or working across JS/iOS/Android layers in this repo.

2k tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
13178
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/wix/react-native-navigation --skill rnn-codebase

The instruction itself

18 sections, as written by the author

React Native Navigation Codebase

Architecture Overview

RNN has three layers that mirror each other:

JS/TS (src/)  →  TurboModule bridge  →  iOS native (ios/)
                                     →  Android native (android/)

A navigation command (e.g. push) flows:

  • Navigation.push()Commands.ts → processing pipeline → NativeCommandsSender.ts
  • TurboModule: RNNTurboModule (iOS) / NavigationTurboModule.kt (Android)
  • iOS: RNNCommandsHandlerRNNViewControllerFactory → UIKit controllers
  • Android: NavigatorLayoutFactory → View-based controllers (no Fragments)

Read ARCHITECTURE.md for the full overview.

Key Cross-Layer Mappings

Layout Types → Native Controllers

| JS Layout Type | iOS Controller | Android Controller |

|----------------|---------------|-------------------|

| component | RNNComponentViewController | ComponentViewController |

| stack | RNNStackController (UINavigationController) | StackController |

| bottomTabs | RNNBottomTabsController (UITabBarController) | BottomTabsController |

| sideMenu | RNNSideMenuViewController (MMDrawerController) | SideMenuController (DrawerLayout) |

| topTabs | RNNTopTabsViewController | TopTabsController (ViewPager) |

| splitView | RNNSplitViewController | N/A (iOS only) |

| externalComponent | RNNExternalViewController | ExternalComponentViewController |

Options → Presenters

Each controller type has a Presenter that applies options to views:

| iOS Controller | iOS Presenter | Android Presenter |

|----------------|--------------|-------------------|

| RNNComponentViewController | RNNComponentPresenter | ComponentPresenter |

| RNNStackController | RNNStackPresenter + TopBarPresenter | StackPresenter |

| RNNBottomTabsController | RNNBottomTabsPresenter | BottomTabsPresenter |

| RNNSideMenuViewController | RNNSideMenuPresenter | SideMenuPresenter |

Events (same names both platforms)

| Event | Trigger |

|-------|---------|

| RNN.ComponentDidAppear | Screen becomes visible |

| RNN.ComponentDidDisappear | Screen hidden |

| RNN.NavigationButtonPressed | TopBar button tap |

| RNN.BottomTabSelected | Tab changed |

| RNN.ModalDismissed | Modal dismissed |

| RNN.ScreenPopped | Screen popped from stack |

| RNN.CommandCompleted | Any command finished |

Where to Find Things

By task: "I need to fix/change X"

| Task | JS File(s) | iOS File(s) | Android File(s) |

|------|-----------|------------|----------------|

| Command execution | src/commands/Commands.ts | ios/RNNCommandsHandler.mm | react/NavigationTurboModule.kt |

| Layout creation | src/commands/LayoutTreeParser.ts | ios/RNNViewControllerFactory.mm | options/LayoutFactory.java |

| Options processing | src/commands/OptionsProcessor.ts | ios/RNNNavigationOptions.mm | options/Options.java |

| Options application | — | ios/*Presenter.mm | viewcontrollers/*Presenter.java |

| TopBar | src/interfaces/Options.ts (TopBarOptions) | ios/TopBarPresenter.mm, ios/RNNUIBarButtonItem.mm | views/stack/topbar/ |

| Bottom tabs | src/interfaces/Options.ts (BottomTabsOptions) | ios/RNNBottomTabsPresenter.mm | viewcontrollers/bottomtabs/ |

| Modals | src/commands/Commands.ts | ios/RNNModalManager.mm | viewcontrollers/modal/ModalStack.java |

| Overlays | src/commands/Commands.ts | ios/RNNOverlayManager.mm | viewcontrollers/overlay/OverlayManager.kt |

| Animations | src/interfaces/Options.ts (AnimationOptions) | ios/ScreenAnimationController.mm | viewcontrollers/stack/StackAnimator.kt |

| React view rendering | — | ios/RNNReactView.mm | react/ReactView.java |

| Events to JS | src/adapters/NativeEventsReceiver.ts | ios/RNNEventEmitter.mm | react/events/EventEmitter.java |

| Component registration | src/components/ComponentRegistry.ts | — | — |

By directory

  • src/ — JS public API, commands, processing pipeline. See src/ARCHITECTURE.md
  • ios/ — All Obj-C/C++ native code. See ios/ARCHITECTURE.md
  • ios/TurboModules/ — New architecture entry points (RNNTurboModule, RNNTurboManager, RNNTurboCommandsHandler)
  • android/src/main/java/com/reactnativenavigation/ — All Java/Kotlin native code. See android/ARCHITECTURE.md
  • playground/ — Demo app for development and E2E tests
  • playground/src/screens/ — Test screens exercising every feature
  • playground/e2e/ — Detox E2E tests

Options Resolution Order

Options are applied in ascending priority:

  • Default options (from Navigation.setDefaultOptions()) — lowest priority
  • Static options (from component class or Navigation.registerComponent)
  • Options passed in the layout call (e.g. push, setRoot)
  • mergeOptions() — runtime override, highest priority

JS Processing Pipeline (exact order)

API layout → OptionsCrawler.crawl() → LayoutProcessor.process()
  → LayoutTreeParser.parse() → LayoutTreeCrawler.crawl()
  → OptionsProcessor (colors, assets, custom) → NativeCommandsSender

iOS Patterns

  • All controllers conform to RNNLayoutProtocol
  • RNNBasePresenter subclasses apply options — applyOptionsOnInit:, applyOptions:, mergeOptions:resolvedOptions:
  • Commands run on main thread (RCTExecuteOnMainQueue)
  • React views: RNNReactView wraps RCTSurfaceHostingView (new arch)
  • Overlays use separate UIWindow instances (RNNOverlayWindow)
  • RNNReactComponentRegistry caches React component instances

Android Patterns

  • View-based, NOT Fragment-based
  • All commands dispatched via UiThread.post()
  • ViewController<T extends ViewGroup> is the base — createView() is abstract
  • ParentController extends ChildController extends ViewController
  • Bottom tabs use AHBottomNavigation library
  • Three root layouts in NavigationActivity: rootLayout, modalsLayout, overlaysLayout
  • Tab attachment modes: Together, OnSwitchToTab, AfterInitialTab

Development Workflow

Playground app

  • yarn start — Metro bundler
  • yarn xcode — Open iOS project
  • yarn studio — Open Android project
  • yarn pod-install — Install iOS pods

Testing

  • yarn test-js — Jest unit tests
  • yarn test-unit-ios — iOS native unit tests (XCTest)
  • yarn test-unit-android — Android native unit tests (JUnit + Robolectric)
  • yarn test-e2e-ios-ci / yarn test-e2e-android-ci — Detox E2E tests

Building

  • yarn prepare — Builds src/lib/ (ESM + types)
  • Codegen config: rnnavigation in package.json

Common Gotchas

  • iOS uses UIKit subclasses (UINavigationController, UITabBarController); Android uses custom View hierarchy
  • splitView is iOS-only
  • Side menu: iOS uses MMDrawerController (3rd party); Android uses DrawerLayout (native)
  • Options that exist in JS types may not be implemented on both platforms — check the presenter
  • passProps are stored in JS Store, not sent to native (cleared before bridge crossing)
  • The lib/ folder is generated — never edit it, edit src/ instead

Other skills for the same job

different authors, same section of the catalogue
MCP Builder
by anthropics
vendor ×13

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

30k tokens scripts
Changelog Generator
by frostant
×9

Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.

774 tokens
Finishing A Development Branch
by ZhanlinCui
×7

Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup

1k tokens
MCP Builder
by JayZeeDesign
×7

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

37k tokens scripts
Vercel React Native Skills
by vercel-labs
vendor ×6

React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.

39k tokens
Vercel React Best Practices
by ratacat
×5

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

34k tokens
Next Best Practices
by vercel-labs
vendor ×4

Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling

20k tokens
Using Git Worktrees
by ZhanlinCui
×4

Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification

1k tokens

How to use it

Copy the folder

Take wix/react-native-navigation-.github-rnn-codebase from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.