turborepo
This skill equips you to establish and manage a Turborepo-based monorepo, enabling fast, scalable builds across multiple interconnected packages. Leverage intelligent caching and task orchestration to accelerate your development pipeline and reduce build times significantly.
Turborepo enables you to establish a monorepo by initializing a workspace root with a turbo.json configuration file that defines your task pipeline. Start by installing Turborepo in your project, then configure the turbo.json to specify which tasks (build, test, lint) should run across your packages, define their dependencies, and set caching rules. Turborepo automatically discovers your packages and manages task orchestration across them, allowing you to run commands like `turbo run build` to execute tasks in parallel across all packages while respecting their dependency graph.
AI-generated summary based on this skill's SKILL.md
Install
bobmatnyc/claude-mpm-skills/turborepo · repository language: Python
git clone https://github.com/bobmatnyc/claude-mpm-skills
cp -r claude-mpm-skills/toolchains/typescript/build/turborepo ~/.claude/skills/turborepoFrequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How do you set up a monorepo with Turborepo?
Turborepo enables you to establish a monorepo by initializing a workspace root with a turbo.json configuration file that defines your task pipeline. Start by installing Turborepo in your project, then configure the turbo.json to specify which tasks (build, test, lint) should run across your packages, define their dependencies, and set caching rules. Turborepo automatically discovers your packages and manages task orchestration across them, allowing you to run commands like `turbo run build` to execute tasks in parallel across all packages while respecting their dependency graph.
What is Turborepo content-aware hashing and how does it work?
Turborepo uses content-aware hashing to determine whether a task's output can be safely restored from cache without re-running it. This skill covers how Turborepo analyzes the actual content of your source files, configuration, and dependencies rather than just timestamps to create a hash. When you run a task, Turborepo computes this hash and checks if it has seen this exact input combination before; if so, it restores the cached output instantly. This approach means your builds skip unnecessary work even when files are touched or timestamps change, dramatically reducing build times in CI/CD environments.
How does Turborepo integrate with GitHub Actions and CI/CD pipelines?
Turborepo streamlines CI/CD integration by providing built-in support for remote caching and incremental builds in GitHub Actions workflows. This skill teaches you to configure your GitHub Actions pipeline to use Turborepo's caching layer, enabling faster builds by skipping tasks whose inputs haven't changed. You can set up remote caching with Vercel or your own cache backend, allowing different CI runs to share cache artifacts. Turborepo also supports filtering and scoping packages in your pipeline, so you can run only the tasks affected by your changes, reducing overall pipeline execution time and resource consumption.
How can you manage workspace dependencies and internal packages in Turborepo?
Turborepo helps you manage multi-package repositories by automatically detecting internal package dependencies through your workspace configuration (package.json workspaces or pnpm workspaces). This skill covers how to define which packages depend on which others, enabling Turborepo to build and test them in the correct order. You configure the turbo.json pipeline to specify task dependencies—for example, declaring that a package's build task depends on its dependencies' build tasks completing first. This ensures shared component libraries and internal packages are built before dependent packages, maintaining consistency across your monorepo.
What are the best practices for Turborepo caching and remote cache setup?
Turborepo's caching strategy relies on configuring your turbo.json to specify which task outputs should be cached and which inputs affect the cache key. This skill teaches you to set up remote caching—either with Vercel's managed service or a self-hosted cache backend—so your entire team and CI/CD pipeline share cache artifacts. Best practices include carefully defining inputs (source files, config files) and outputs (build artifacts, dist folders) for each task, enabling content-aware hashing to work effectively. You'll learn to troubleshoot cache issues by understanding cache invalidation, verifying hash consistency, and using Turborepo's debugging tools to ensure your builds remain fast and reliable.
How do you optimize build performance through Turborepo's task orchestration and parallelization?
Turborepo accelerates your builds by analyzing your task dependency graph and running independent tasks in parallel across multiple CPU cores. This skill covers configuring your turbo.json pipeline to explicitly declare task dependencies, allowing Turborepo to identify which tasks can run simultaneously. You'll learn to use filtering and scoping syntax (like `turbo run build --filter=@scope/package`) to run only affected packages, reducing unnecessary work. Combined with intelligent caching, Turborepo's parallelization ensures that in CI/CD environments, only tasks with changed inputs re-execute, while cached tasks restore instantly, resulting in significantly faster incremental builds.
SKILL.md
rendered from the published skill — quoted content, verbatim
Turborepo Skill
Summary
Turborepo is a high-performance monorepo build system with intelligent caching, task orchestration, and parallel execution. It provides fast incremental builds through content-aware hashing and remote caching, ideal for managing multiple packages, apps, and shared code.
When to Use
- Multi-package repositories with shared dependencies and utilities
- Microservices architectures requiring coordinated builds
- Component libraries shared across multiple applications
- Full-stack monorepos with frontend, backend, and shared packages
- Teams needing faster CI/CD through intelligent caching and parallelization
Quick Start
Installation and Setup
```bash
Create new Turborepo (recommended)
npx create-turbo@latest
Or add to existing
(truncated - see the full file via the links below)
Read as markdown · JSON record · Browse the source repository
File tree — 2 files
toolchains/typescript/build/turborepo/SKILL.md
toolchains/typescript/build/turborepo/metadata.json