monorepo-metro

monorepo-metro is a skill for Claude Code from AnilBurcu/claude-code-react-native. It costs 63 tokens per session (855 once invoked), scanned A, original, MIT.

A reference for running React Native and Expo mobile apps inside a monorepo, a single repository containing multiple projects and shared packages.

In plain words
What is it for?
Use it when an app shows an “Invalid hook call,” duplicate native modules, unresolved workspace packages, or monorepo-only EAS build failures.
Why use it?
It helps diagnose problems caused by multiple copies of React or React Native, packages Metro cannot find, and workspace settings that break cloud builds.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the rn plugin — 18 skills, 4 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/anilburcu/claude-code-react-native/monorepo-metro
Any agent
npx skills add AnilBurcu/claude-code-react-native --skill monorepo-metro
Clone the repo
git clone --depth 1 https://github.com/AnilBurcu/claude-code-react-native

Made for: Claude Code.

Or install rn, the plugin that ships this one along with the rest of its 18 skills, 4 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for monorepo-metro

README.md
[![agentmods](https://agentmods.dev/badge/skills/anilburcu/claude-code-react-native/monorepo-metro.svg)](https://agentmods.dev/skills/anilburcu/claude-code-react-native/monorepo-metro)
Your own site
<a href="https://agentmods.dev/skills/anilburcu/claude-code-react-native/monorepo-metro"><img src="https://agentmods.dev/badge/skills/anilburcu/claude-code-react-native/monorepo-metro.svg" alt="Measured on agentmods" height="20"></a>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 855 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00063 $0.00855
Opus 5 $0.00032 $0.00428
Sonnet 5 $0.00013 $0.00171
Haiku 4.5 $0.00006 $0.00085

Measured 6d ago against content hash 08e0ffc6d2ba, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

monorepo-metro scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/rn/skills/monorepo-metro/SKILL.md · 47 lines

How it starts

The opening of the file, as written. The whole thing — 47 lines — stays where its author put it; the contents beside it link to each section on GitHub.

React Native in a monorepo

First, delete the folklore

Modern expo/metro-config configures Metro for monorepos automatically. If the repo carries a hand-written metro.config.js full of watchFolders, nodeModulesPaths, extraNodeModules or disableHierarchicalLookup copied from an old blog post, that config is now the most likely cause of the problem, not the fix. Strip it down to the default Expo config, run npx expo start --clear once, and re-test before debugging anything else.

The problems that remain after that are real, and they are all below.

Singletons, the actual monorepo disease

react, react-native and the native-module packages must resolve to exactly one copy for the app. Two copies produce the classic signatures:

  • "Invalid hook call" with a perfectly valid component
  • "Tried to register two views with the same name"
  • A native module that works in one workspace app and crashes in another

Diagnose with the package manager, not by staring at code: npm ls react-native (or yarn why react-native, pnpm why react-native) from the repo root. More than one resolved version, or the same version in two physical locations, confirms it.

Fix at the root: pin the singletons with the root manifest's override mechanism (overrides for npm, resolutions for yarn, pnpm's overrides). Then reinstall from the root and re-run the check. If the lockfile seems to hold onto stale resolutions after the override, a full reinstall of node_modules is legitimate here; this is the deliberate-upgrade case, not build-error cache thrashing.

Hoisting strategies decide your failure mode

  • npm and yarn hoist: a package you forgot to declare still resolves because a sibling declared it. Everything works locally and then fails on EAS or on a colleague's machine with a different install order. The bug is the undeclared dependency, not the machine.
  • pnpm and bun isolate: undeclared dependencies fail immediately and loudly. More friction on day one, dramatically fewer ghosts later.

Read the full file on GitHub · 47 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 47 lines · 63 tokens per session scan A 08e0ffc6d2ba

Subscribe to this mod's changes

monorepo-metro is a skill published in the GitHub repository AnilBurcu/claude-code-react-native (3 stars, last pushed 1mo ago), licensed MIT. It adds 63 tokens to every session and 855 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

expo-56

Authoritative, version-pinned reference for Expo SDK 56 and SDK 57 — both postdate your training, so defer to this skill over memory for anything Expo. SDK 57 is the current release (2026-07-08, React Native 0.86); SDK 56 is the previous, still-supported release (React Native 0.85). Use it whenever the user is…

mahdi-salmanzade/expo56-skill · 391 tokens

expo

Use when shipping a React Native app with Expo — EAS Build/Submit/Update, eas.json profiles and channels, config plugins, prebuild/CNG, runtime-version policy, OTA updates that never land, SDK upgrades, the New Architecture. NOT RN UI, navigation or native-module authoring (that is react-native), NOT a Dart app (that…

ericrisco/rsc-harness · 79 tokens

expo-launchpad-evaluator

Phase A, step 6 — skeptical QA. Run the app, watch it, then judge against the contract. Default = functional check; --strict adds quality scoring and an edge-case sweep.

SummerRiversound/expo-launchpad · 45 tokens

expo-launchpad-design

Phase A design — define the ui/designTokens.ts spec (colors, spacing, radius, typography), the visual/component concept (game: code-drawn Skia shapes / app: RN primitives), and the asset plan (icon+splash branding, contrast-safe accessibility). Advances pipeline state to contract.

SummerRiversound/expo-launchpad · 64 tokens

expo-launchpad-plan

Phase A plan — assign app identity (appname/appslug/bundleid/orientation) into config.md, then write the PRD in defaultlanguage with a kind-branched structure (game: core loop/mechanics/content metrics/progression/win-lose; app: purpose/journeys/features/data model/navigation), plus a project structure map, and…

SummerRiversound/expo-launchpad · 82 tokens

expo-launchpad-research

Phase A research — kind-aware market/genre (game) or category/competitor (app) discovery, concept proposal via AskUserQuestion, a store clone-avoidance check (App Store 4.3 / Google Play impersonation), and the research spec write-up.

SummerRiversound/expo-launchpad · 62 tokens