wshobson avatar

Monorepo Management

This is a comprehensive guide for setting up and managing monorepos using Turborepo, Nx, and pnpm workspaces. It covers the practical stuff you'll actually need: configuring turbo.json for build caching, setting up shared TypeScript and ESLint configs, managing workspace dependencies with pnpm filters, and organizing packages for code sharing. The examples show real project structures with proper package.json exports, dependency graphs, and CI optimization strategies. If you're migrating from multiple repositories or starting a new multi-package project, this walks through the tooling decisions and configuration patterns that actually work at scale.

skills.sh installs
15K
GitHub stars
42.4K
last updated
Aug 21, 2026

Install

$ npx -y skills add wshobson/agents --skill monorepo-management --agent claude-code

Installs into .claude/skills of the current project.

Files

Monorepo Management

Build efficient, scalable monorepos that enable code sharing, consistent tooling, and atomic changes across multiple packages and applications.

When to Use This Skill

  • Setting up new monorepo projects
  • Migrating from multi-repo to monorepo
  • Optimizing build and test performance
  • Managing shared dependencies
  • Implementing code sharing strategies
  • Setting up CI/CD for monorepos
  • Versioning and publishing packages
  • Debugging monorepo-specific issues

Core Concepts

1. Why Monorepos?

Advantages:

  • Shared code and dependencies
  • Atomic commits across projects
  • Consistent tooling and standards
  • Easier refactoring
  • Simplified dependency management
  • Better code visibility

Challenges:

  • Build performance at scale
  • CI/CD complexity
  • Access control
  • Large Git repository

2. Monorepo Tools

Package Managers:

  • pnpm workspaces (recommended)
  • npm workspaces
  • Yarn workspaces

Build Systems:

  • Turborepo (recommended for most)
  • Nx (feature-rich, complex)
  • Lerna (older, maintenance mode)

Turborepo Setup

Initial Setup

# Create new monorepo
npx create-turbo@latest my-monorepo
cd my-monorepo

Sponsors

Details

Repository
github.com/wshobson/agents
Category
DevOps & CI/CD

More from wshobson/agents

All 174
1bmad-code-org avatarbmad-party-modebmad-code-org/bmad-methodOrchestrates lively group discussions between installed BMAD agents or custom personas, and helps author custom parties. Use when the user requests party mode, 14.5Kskills.sh installs
2wshobson avatarrag-implementationwshobson/agentsBuild Retrieval-Augmented Generation (RAG) systems for LLM applications with vector databases and semantic search. Use when implementing knowledge-grounded AI, 14.4Kskills.sh installs
3resend avatarresend-cliresend/resend-skillsOperate the Resend platform from the terminal — send emails (including React Email .tsx templates via --react-email), manage domains, contacts, broadcasts, temp14Kskills.sh installs
4kylezantos avatardesign-motion-principleskylezantos/design-motion-principlesMotion and interaction design expert based on Emil Kowalski, Jakub Krehel, and Jhey Tompkins' techniques. Two modes — build interactive components with purposef13.8Kskills.sh installs
5tw93 avatarkamitw93/kamiTypeset professional documents and product landing pages: resumes, one-pagers, white papers, letters, portfolios, slide decks, landing pages. Warm parchment, in13.8Kskills.sh installs
6github avatargame-enginegithub/awesome-copilotExpert skill for building web-based game engines and games using HTML5, Canvas, WebGL, and JavaScript. Use when asked to create games, build game engines, imple13.4Kskills.sh installs