Skip to main content
rule CX Codex

monorepo-native-deps-in-app — Claude Code rule: setup guide

monorepo-native-deps-in-app is a Claude Code rule that enforces adding native packages directly to the mobile app manifest. It prevents build failures caused by missed autolinking in monorepos.

AGPL-3.0 ★ 88 updated 2026-11-17

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/rules/monorepo-native-deps-in-app.md
Open on GitHub

What monorepo-native-deps-in-app does

React Native autolinking only inspects the app's own node_modules folder. When a package containing platform-specific code sits solely inside a shared workspace module, the build pipeline overlooks it and skips compilation.

This rule directs coding agents to declare every native library inside the target app's package.json. Even if shared UI packages consume the dependency, the root mobile package must declare it too.

What it helps with

  • prevent autolinking failures for native libraries across workspace packages
  • add native dependencies like react-native-reanimated to the application manifest
  • synchronize platform-specific packages between shared modules and the host app

Example prompts for the agent

  • Add react-native-reanimated to packages/ui and configure the mobile app dependencies
  • Audit workspace package.json files for unlinked native libraries
  • Set up a native module inside the shared package and link it into the mobile client

How to install monorepo-native-deps-in-app

Manually: put the files in place

.claude/rules/monorepo-native-deps-in-app.md

The paths frontmatter field limits the files

Step by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use

Questions about monorepo-native-deps-in-app

How to install monorepo-native-deps-in-app in Claude Code?

Place the rule markdown file at .claude/rules/monorepo-native-deps-in-app.md. Claude Code reads project rules from this folder automatically.

What does monorepo-native-deps-in-app do?

It instructs the AI assistant to list native dependencies in the application package manifest even if they are only imported by shared monorepo packages.

Why does autolinking miss dependencies in shared packages?

Autolinking discovery routines only search the host application's node_modules directory, ignoring native code nestled inside separate workspace folders.

Similar IDE rules

All IDE rules for Mobile →

From the same set47

The whole set →
design-deslop design-deslop is a Claude Code command that strips machine-generated visual tells from UI. It runs against new branch diffs before frontend changes get merged. CX Codex +1 ★ 88repo stars design-review design-review is a Claude Code command that reviews a UI build for visual hierarchy and craft. It rates findings by severity and returns a verdict. CX Codex +1 ★ 88repo stars rendering-text-in-text-component rendering-text-in-text-component is a Claude Code rule that enforces wrapping strings in React Native Text elements. It prevents runtime crashes in mobile interfaces. CX Codex +1 ★ 88repo stars list-performance-callbacks list-performance-callbacks is a Claude Code rule for passing event handlers to list items. It applies when callbacks are used inside a list. CX Codex +1 ★ 88repo stars react-compiler-reanimated-shared-values react-compiler-reanimated-shared-values is a Claude Code rule for handling Reanimated shared values with React Compiler enabled. It directs code to use .get() and .set() rather than .value. CX Codex +1 ★ 88repo stars react-compiler-destructure-functions react-compiler-destructure-functions is a Claude Code rule that enforces extracting hook functions early in render scope. It targets projects running the React Compiler. CX Codex +1 ★ 88repo stars ui-scrollview-content-inset ui-scrollview-content-inset is a Claude Code rule for changing ScrollView spacing when keyboards, toolbars, or content alter the available space. CX Codex +1 ★ 88repo stars monorepo-single-dependency-versions monorepo-single-dependency-versions is a Claude Code rule that pins identical dependency versions across monorepo packages. It stops bundle bloat and runtime version clashes. CX Codex +1 ★ 88repo stars

Project sponsors

Companies that keep this analytics open