# monorepo-native-deps-in-app

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.

- rule · `type=rule` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline · ★ 88 repo stars
- Author: alexj11324
- License: AGPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/alexj11324/Mikka/tree/HEAD/.claude/skills/react-native-skills/rules/monorepo-native-deps-in-app.md
- Updated: 2026-11-17
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/rules/monorepo-native-deps-in-app

## What it 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.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/rules/monorepo-native-deps-in-app.md` — The paths frontmatter field limits the files

### Codex

**AGENTS.md**
- Codex reads AGENTS.md: paste the rule text there

### Cursor

**Manually: put the files in place**
- File: `.cursor/rules/monorepo-native-deps-in-app.mdc` — Frontmatter: description, globs, alwaysApply

### GitHub Copilot

**Manually: put the files in place**
- File: `.github/instructions/monorepo-native-deps-in-app.instructions.md` — The applyTo field sets which files it applies to

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/rules/monorepo-native-deps-in-app.md`

### Cline

**Manually: put the files in place**
- File: `.clinerules/monorepo-native-deps-in-app.md`

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/alexj11324/Mikka/tree/HEAD/.claude/skills/react-native-skills/rules/monorepo-native-deps-in-app.md

## When to use it
- 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
- 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

## Similar
- [react-native-app](https://affpapa.org/en/nevibecode/skills/react-native-app.md) — skill · 510 installs
- [argent-react-native-app-workflow](https://affpapa.org/en/nevibecode/skills/argent-react-native-app-workflow.md) — skill · 32600 installs
- [monorepo-tamagui](https://affpapa.org/en/nevibecode/skills/monorepo-tamagui.md) — skill · 717 installs
- [monorepo](https://affpapa.org/en/nevibecode/skills/monorepo.md) — skill · 741 installs
- [monorepo-navigator](https://affpapa.org/en/nevibecode/skills/monorepo-navigator.md) — skill · 591 installs
- [monorepo-setup](https://affpapa.org/en/nevibecode/skills/monorepo-setup.md) — skill · 283 installs

From the same set: [alexj11324/mikka](https://affpapa.org/en/nevibecode/by/alexj11324/mikka.md) — 47 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
