monorepo-navigator
What it does
This skill helps organize many related code packages in one repository and speed up builds. It is for teams with shared code across several apps who want to avoid rebuilding everything.
When to use it
- βWhen several apps or packages share code and builds are slow.
- βWhen you want to build and test only the packages affected by a change.
- βWhen you are moving several separate repositories into one monorepo.
Skill link
https://github.com/alirezarezvani/claude-skills/blob/main/engineering/skills/monorepo-navigator/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βSet up Turborepo for our three apps and one shared UI package so only the changed parts rebuild.β
5 new skills a week. 1 minute to read.
How it works
It maps which packages depend on which, finds what a change affects, and sets up commands that run only on those packages, plus optional build caching.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Monorepo Navigator
Tier: POWERFUL
Category: Engineering
Domain: Monorepo Architecture / Build Systems
Overview
Navigate, manage, and optimize monorepos. Covers Turborepo, Nx, pnpm workspaces, and Lerna. Enables cross-package impact analysis, selective builds/tests on affected packages only, remote caching, dependency graph visualization, and structured migrations from multi-repo to monorepo. Includes Claude Code configuration for workspace-aware development.
Core Capabilities
- Cross-package impact analysis β determine which apps break when a shared package changes
- Selective commands β run tests/builds only for affected packages (not everything)
- Dependency graph β visualize package relationships as Mermaid diagrams
- Build optimization β remote caching, incremental builds, parallel execution
- Migration β step-by-step multi-repo β monorepo with zero history loss
- Publishing β changesets for versioning, pre-release channels, npm publish workflows
- Claude Code config β workspace-aware CLAUDE.md with per-package instructions
When to Use
Use when:
- Multiple packages/apps share code (UI components, utils, types, API clients)
- Build times are slow because everything rebuilds when anything changes
- Migrating from multiple repos to a single repo
- Need to publish packages to npm with coordinated versioning
- Teams work across multiple packages and need unified tooling
Skip when:
- Single-app project with no shared packages
- Team/project boundaries are completely isolated (polyrepo is fine)
- Shared code is minimal and copy-paste overhead is acceptable
Tool Selection
| Tool | Best For | Key Feature |
|---|---|---|
| Turborepo | JS/TS monorepos, simple pipeline config | Best-in-class remote caching, minimal config |
| Nx | Large enterprises, plugin ecosystem | Project graph, code generation, affected commands |
| pnpm workspaces | Workspace protocol, disk efficiency | workspace:* for local package refs |
| Lerna | npm publishing, versioning | Batch publishing, conventional commits |
| Changesets | Modern versioning (preferred over Lerna) | Changelog generation, pre-release channels |
Most modern setups: pnpm workspaces + Turborepo + Changesets
Turborepo
β See references/monorepo-tooling-reference.md for details
Workspace Analyzer
python3 scripts/monorepo_analyzer.py /path/to/monorepo
python3 scripts/monorepo_analyzer.py /path/to/monorepo --json
Also see references/monorepo-patterns.md for common architecture and CI patterns.
Common Pitfalls
| Pitfall | Fix |
|---|---|
Running turbo run build without --filter on every PR |
Always use --filter=...[origin/main] in CI |
workspace:* refs cause publish failures |
Use pnpm changeset publish β it replaces workspace:* with real versions automatically |
| All packages rebuild when unrelated file changes | Tune inputs in turbo.json to exclude docs, config files from cache keys |
| Shared tsconfig causes one package to break all type-checks | Use extends properly β each package extends root but overrides rootDir / outDir |
| git history lost during migration | Use git filter-repo --to-subdirectory-filter before merging β never move files manually |
| Remote cache not working in CI | Check TURBO_TOKEN and TURBO_TEAM env vars; verify with turbo run build --summarize |
| CLAUDE.md too generic β Claude modifies wrong package | Add explicit "When working on X, only touch files in apps/X" rules per package CLAUDE.md |
Best Practices
- Root CLAUDE.md defines the map β document every package, its purpose, and dependency rules
- Per-package CLAUDE.md defines the rules β what's allowed, what's forbidden, testing commands
- Always scope commands with --filter β running everything on every change defeats the purpose
- Remote cache is not optional β without it, monorepo CI is slower than multi-repo CI
- Changesets over manual versioning β never hand-edit package.json versions in a monorepo
- Shared configs in root, extended in packages β tsconfig.base.json, .eslintrc.base.js, jest.base.config.js
- Impact analysis before merging shared package changes β run affected check, communicate blast radius
- Keep packages/types as pure TypeScript β no runtime code, no dependencies, fast to build and type-check
FAQ
Which tools does it support?
It covers Turborepo, Nx, pnpm workspaces and Lerna.
Can it show how packages depend on each other?
Yes, it can draw the package dependency graph as a diagram.
Does it help publish packages?
Yes, it covers versioning and publishing workflows with changesets.
Details
Original description by the author
Use for Turborepo, Nx, pnpm-workspace or Lerna setup, affected-only builds, remote caching or a multi-repo to monorepo move. Maps packages and the dependency graph with monorepo_analyzer.py.
Popularity
- GitHub stars
- 29k
- Ranking position
- #9593
- License
- MIT
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
agent-launcher-orchestrator
29kHelps your agent plan, build, test and schedule a Claude managed agent in your own account, step by step, starting from one clear goal.
grade-iterate
29kLets your agent grade a managed AI agent's work against a rubric and improve it in a fixed number of rounds, so it never loops forever.
interview
29kLets your agent interview you about an AI agent idea and turn your answers into a simple build plan before anything is launched.
run-without-you
29kHelps your agent set up a managed AI agent to run on a schedule or when an event happens, with the cron timing checked before launch.
Similar skills
openclaw-update
394kHelps your agent update an existing OpenClaw Gateway, choosing the update method that fits how it was installed and keeping your session working.
diagnose-gateway
394kHelps your agent find out why your OpenClaw Gateway is failing by checking settings, channels, and ports without changing anything.
crabbox-apps
394kHelps your agent open and run an app on a temporary cloud machine, then show its view in your chat side panel.