
Monorepo Setup Assistant
Set up and manage Turborepo or Nx monorepos with shared packages and CI/CD pipelines
What You Can Do
This skill guides you through designing and implementing monorepo architectures that centralize multiple related projects into a single repository with unified tooling. You'll configure workspace structure, establish shared package libraries, orchestrate build pipelines with caching, manage cross-package dependencies, and integrate CI/CD workflows—enabling teams to maintain consistency while scaling development across related codebases.
Features
Choose between Turborepo (lightweight, JS/TS-focused) or Nx (language-agnostic, feature-rich) and generate initial workspace structure
Set up package.json/nx.json with root-level and package-specific settings, dependency constraints, and workspace paths
Create internal libraries with proper isolation, versioning strategies, and dependency exports for reuse across packages
Configure incremental builds, task caching, parallel execution, and dependency-aware execution order
Visualize and validate workspace dependency graphs, detect circular dependencies, and enforce architectural constraints
Implement caching strategies, affected-package detection, and automated testing/deployment workflows for monorepo environments
Plan and execute consolidation of existing separate repositories into unified workspace structure
Standardize linting, formatting, testing, and versioning tools across all packages
Example Output
Example 1: Turborepo Setup
Root workspace configured with:
- Root tsconfig.json and shared dependencies
- Apps folder: web, mobile, admin-dashboard
- Packages folder: ui-components, utilities, api-client
- turbo.json with build pipeline: lint → type-check → build → test
- GitHub Actions workflow caching compiled outputs and artifacts
Example 2: Nx Monorepo with Libraries
Workspace structure:
- libs/shared-ui (shared component library)
- libs/auth (authentication utilities)
- apps/web-app, apps/admin-app
- nx.json configured with:
- Dependency constraints (apps cannot import from other apps)
- Task caching for build, test, lint
- Automated deployment targets per app
- Workspace library versioning: independent
Example 3: CI/CD Pipeline
GitHub Actions workflow:
1. Detect changed packages using affected:* commands
2. Run lint, test, build only for affected packages + dependencies
3. Cache dependencies and build outputs (3+ minute savings per run)
4. Deploy only modified apps to staging/production
What's Included
- SKILL.md instruction file with setup workflows for Turborepo and Nx:
- Turborepo configuration template with tsconfig, turbo.json, and GitHub Actions pipeline:
- Nx workspace setup checklist including nx.json configuration and library constraints:
- CI/CD integration guide with caching strategies and affected-package detection workflows:
- Polyrepo migration playbook with step-by-step consolidation patterns and dependency resolution:
- Dependency graph validation framework for detecting circular dependencies and architectural violations:
Who It's For
- Full-stack engineers building applications with shared component libraries and multiple services
- DevOps/platform engineers implementing standardized build and deployment workflows across product teams
- Tech leads scaling teams by establishing monorepo governance and architectural constraints
- Frontend teams maintaining design systems and consuming shared UI component packages
- Backend/infrastructure teams managing multiple related services with coordinated releases
Best For
- Consolidating 3+ related repositories into a single monorepo workspace
- Creating and maintaining internal shared libraries (UI components, utilities, SDKs) consumed by multiple apps
- Setting up workspace-wide build pipelines with incremental builds and task caching
- Implementing CI/CD workflows that detect and test only affected packages
- Migrating from polyrepo to monorepo architecture with dependency graph validation
- Establishing workspace-level linting, testing, and formatting standards across teams







