monorepo-management

Configure and optimize monorepos using Turborepo, Nx, and pnpm workspaces.

Updated Nov 30, 2025
One-click install
npx skills add https://github.com/Amakaflow/amakaflow-dev-workspace --skill monorepo-management-amakaflow
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: monorepo-management
Source: https://github.com/Amakaflow/amakaflow-dev-workspace/tree/main/.claude/skills/monorepo-management
Command: npx skills add https://github.com/Amakaflow/amakaflow-dev-workspace --skill monorepo-management-amakaflow

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Managing multiple packages and applications across separate repositories creates dependency drift, duplicated tooling, and slow builds. This Skill provides concrete patterns for consolidating code into a monorepo with shared configurations, cached builds, and coordinated CI/CD. ## Core Features & Use Cases - Monorepo Tooling Setup: Step-by-step configuration for Turborepo, Nx, and pnpm workspaces including turbo.json pipelines, nx.json caching, and workspace manifests. - Code Sharing Patterns: Ready-to-use templates for shared UI components, utilities, and TypeScript types consumed across apps and packages. - Build Optimization & CI/CD: Remote caching configuration, affected-only builds, GitHub Actions workflows, and Changesets-based versioning and publishing. - Use Case: A team migrating three separate React and Node repositories into one pnpm workspace can follow the Turborepo setup, share ESLint and TypeScript configs, and deploy only affected apps on each pull request. ## Quick Start Set up a Turborepo monorepo with pnpm workspaces containing a web app and a shared UI package with build caching enabled.

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 focuses on fast task orchestration and caching with minimal configuration, suiting most JavaScript projects. Nx offers richer code generation, dependency graph visualization, and affected-project commands but adds complexity and a steeper learning curve.

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

Use pnpm add with the --filter flag, for example pnpm add react --filter @repo/ui. Add -w to install at the workspace root, or use -r to run commands across all packages.

Why is my Turborepo build cache not working?

Cache misses usually come from incorrect inputs or outputs in turbo.json. Ensure outputs lists all build artifacts like dist/** and .next/**, and that inputs cover every source file affecting the build, including environment files in globalDependencies.

How do I publish packages from a monorepo to npm?

Use Changesets: run pnpm changeset to record version bumps, pnpm changeset version to update package versions, and pnpm changeset publish to release. Automate this in GitHub Actions with the changesets/action workflow.

What are common monorepo pitfalls to avoid?

Watch for circular dependencies between packages, phantom dependencies not declared in package.json, and incorrect cache inputs causing stale builds. Also avoid over-sharing code that should stay separate and under-sharing that duplicates logic across packages.