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

- 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-single-dependency-versions.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-single-dependency-versions

## What it does

The rule instructs the coding agent to drop semver ranges like `^` and `~` in favor of exact release numbers. Discrepancies between workspace packages duplicate library code inside distribution builds and cause runtime behavior conflicts.

Enforcing this policy relies on tools such as `syncpack` or root-level `overrides` in `npm` and `pnpm`, as well as `resolutions` in `yarn`. Without pinned root declarations, nested subpackages quickly drift out of alignment.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/rules/monorepo-single-dependency-versions.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-single-dependency-versions.mdc` — Frontmatter: description, globs, alwaysApply

### GitHub Copilot

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

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/rules/monorepo-single-dependency-versions.md`

### Cline

**Manually: put the files in place**
- File: `.clinerules/monorepo-single-dependency-versions.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-single-dependency-versions.md

## When to use it
- prevent duplicate packages in production bundles
- pin exact dependency versions without semver ranges
- align shared module versions across workspace packages
- configure package manager overrides in root package.json

## Example prompts
- Add react-native-reanimated to packages/app and packages/ui with a single pinned version
- Audit all package.json files and strip caret and tilde version prefixes
- Set up root pnpm overrides to enforce uniform dependency releases

## Similar
- [dependency-upgrade](https://affpapa.org/en/nevibecode/skills/secondsky-dependency-upgrade.md) — skill · 422 installs
- [dependency-manager](https://affpapa.org/en/nevibecode/agents/dependency-manager.md) — subagent · 356 installs
- [monorepo-management](https://affpapa.org/en/nevibecode/skills/monorepo-management.md) — skill · 14548 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
- [Monorepo taste](https://affpapa.org/en/nevibecode/prompts/monorepo-taste.md) — prompt · ★ 178201 repo stars

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
