monorepo-management

Configure Turborepo, Nx, and pnpm workspaces for multi-package repositories.

Updated May 20, 2026
One-click install
npx skills add https://github.com/TechCorp25/kingdom --skill monorepo-management-techcorp25
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: monorepo-management
Source: https://github.com/TechCorp25/kingdom/tree/main/.claude/skills/developer-essentials/skills/monorepo-management
Command: npx skills add https://github.com/TechCorp25/kingdom --skill monorepo-management-techcorp25

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Managing multiple packages and applications across separate repositories creates duplicated tooling, inconsistent configurations, and painful cross-project changes. This Skill provides concrete patterns for consolidating code into a monorepo with shared dependencies, cached builds, and atomic commits. ## Core Features & Use Cases - Build System Setup: Configure Turborepo pipelines or Nx workspaces with task caching, dependency graphs, and affected-only builds. - Workspace Dependency Management: Use pnpm workspaces to install, link, and update dependencies across packages with filter commands. - Shared Configurations: Centralize TypeScript, ESLint, and Prettier configs so every package follows identical standards. - Use Case: A team migrating three separate React apps and a shared component library into one repository can use this Skill to scaffold a Turborepo with pnpm workspaces, share UI components via workspace packages, and set up CI that only builds affected projects. ## Quick Start Set up a Turborepo monorepo with pnpm workspaces containing a Next.js app and a shared UI component package.

Frequently Asked Questions about monorepo-management

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up a Turborepo monorepo with pnpm workspaces?▼

Run npx create-turbo@latest to scaffold the project, then define workspace globs in pnpm-workspace.yaml for apps and packages directories. Configure the build pipeline in turbo.json with dependsOn and outputs, and set the packageManager field in the root package.json.

Turborepo vs Nx for monorepo management?▼

Turborepo is recommended for most teams due to its simpler configuration focused on task pipelines and caching. Nx offers more features like code generators and dependency graph visualization but adds complexity, while Lerna is in maintenance mode.

How do I install a dependency in one pnpm workspace package?▼

Use pnpm add with the --filter flag, for example pnpm add react --filter @repo/ui. To link a workspace package as a dependency, run pnpm add @repo/ui --filter web, and use -w to install at the workspace root.

How do I run builds only for changed packages in CI?▼

Use Nx affected commands like nx affected:build --base=main, which compare the current branch against a base ref to identify impacted projects. This requires fetching full git history in CI with fetch-depth: 0 in the checkout action.

Why does my monorepo have circular dependency errors?▼

Circular dependencies occur when package A depends on package B and B depends back on A, breaking the build graph. Keep the dependency graph acyclic by extracting shared code into a lower-level package that both can depend on.

How do I publish packages from a monorepo to npm?▼

Use Changesets by installing @changesets/cli, running pnpm changeset to record version bumps, then pnpm changeset version and pnpm changeset publish. The changesets GitHub Action can automate release pull requests and publishing in CI.