turborepo
turborepo is a high-performance build system designed for monorepos that streamlines task orchestration across multiple packages. Configure task dependencies, output handling, and intelligent caching directly in turbo.json to accelerate your build pipeline and reduce redundant work.
turborepo organizes monorepos into a root directory containing a turbo.json configuration file, with subdirectories for packages (reusable libraries) and apps (consumer applications). Each package and app has its own package.json with scripts. Start by creating your workspace root, adding a turbo.json at the top level to define task pipelines, then structure your directories as apps/ and packages/ folders. turborepo automatically discovers and links dependencies between these workspaces, enabling efficient task orchestration across your entire monorepo.
AI-generated summary based on this skill's SKILL.md
Decision gist · record as of 2026-07-28
turborepo organizes monorepos into a root directory containing a turbo.json configuration file, with subdirectories for packages (reusable libraries) and apps (consumer applications). Each package and app has its own package.json with scripts. Start by creating your workspace root, adding a turbo.json at the top level to define task pipelines, then structure your directories as apps/ and packages/ folders. turborepo automatically discovers and links dependencies between these workspaces, enabling efficient task orchestration across your entire monorepo.
Use it when
- turborepo's turbo.json file defines your build pipeline by specifying tasks, their dependencies, and output caching rules.
- turborepo cache misses occur when environment variables affecting your build aren't tracked.
Verify before relying
Read SKILL.md below before installing (26 files). Open directory: indexed for reading, not audited.
Install
module-federation/core/turborepo · repository language: JavaScript
Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.
Frequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How do I set up turborepo monorepo structure with packages and apps?
turborepo organizes monorepos into a root directory containing a turbo.json configuration file, with subdirectories for packages (reusable libraries) and apps (consumer applications). Each package and app has its own package.json with scripts. Start by creating your workspace root, adding a turbo.json at the top level to define task pipelines, then structure your directories as apps/ and packages/ folders. turborepo automatically discovers and links dependencies between these workspaces, enabling efficient task orchestration across your entire monorepo.
What is the turborepo task configuration and dependencies setup in turbo.json?
turborepo's turbo.json file defines your build pipeline by specifying tasks, their dependencies, and output caching rules. In the pipeline object, you declare tasks like build, test, or lint, then configure which tasks must run first using the dependsOn field. For example, a build task might depend on a prebuild task running first. You also define outputs—files and directories turborepo should cache—and set environment variable hashing to invalidate cache when specific variables change. This configuration ensures turborepo executes tasks in the correct order and caches results intelligently.
Why is turborepo caching not working and how do I debug cache misses?
turborepo cache misses occur when environment variables affecting your build aren't tracked, when output paths in turbo.json don't match actual build outputs, or when source files change unexpectedly. Debug by checking that your turbo.json outputs field correctly lists all generated files and directories. Configure globalDependencies to hash files like .env or build config files that affect output. Use the globalEnv field to specify environment variables turborepo should include in cache keys. Run turbo with --verbose to see cache hit/miss reasons, and verify that your scripts produce outputs in the exact paths you've declared.
How do I use the turborepo --affected flag for changed packages in CI/CD workflows?
turborepo's --affected flag runs tasks only on packages that have changed since a baseline commit, dramatically reducing CI/CD time. Use turbo run build --affected to build only modified packages and their dependents. In GitHub Actions or other CI systems, set the baseline using the --since flag to compare against a specific commit or branch. This approach filters packages by name and change detection automatically, so you avoid rebuilding unchanged code. Configure your CI/CD to pass the appropriate baseline (often main or master branch) so turborepo accurately identifies which packages need processing.
What are turborepo best practices for package.json scripts and enforcing package boundaries?
turborepo best practices include defining clear, consistent scripts in each package.json (build, test, lint, dev) that turbo.json references in its pipeline. Avoid prebuild script anti-patterns—instead, declare explicit task dependencies in turbo.json using dependsOn so turborepo orchestrates execution correctly. Enforce architectural boundaries by using turborepo's package isolation rules and dependency constraints to prevent unwanted cross-package imports. Structure your monorepo so apps depend on packages but packages don't depend on apps, maintaining clear separation of concerns and enabling parallel task execution across your workspace.
How do I configure turborepo for parallel task execution and watch mode development?
turborepo executes tasks in parallel by default when there are no task dependencies blocking them, maximizing build speed. For development, use turbo run dev --parallel to run watch-mode scripts across all packages simultaneously, enabling hot-reload workflows. In turbo.json, tasks without dependsOn constraints run concurrently. For CI/CD, turborepo's parallel execution combined with caching and the --affected flag ensures fast, efficient builds. Configure your pipeline so independent tasks have no dependencies, allowing turborepo to distribute work across available CPU cores and complete your build system tasks as quickly as possible.
SKILL.md
Rendered from the published skill. Quoted content, verbatim.
Turborepo Skill
Build system for JavaScript/TypeScript monorepos. Turborepo caches task outputs and runs tasks in parallel based on dependency graph.
IMPORTANT: Package Tasks, Not Root Tasks
DO NOT create Root Tasks. ALWAYS create package tasks.
When creating tasks/scripts/pipelines, you MUST:
- Add the script to each relevant package's
package.json - Register the task in root
turbo.json - Root
package.jsononly delegates viaturbo run <task>
DO NOT put task logic in root package.json. This defeats Turborepo's parallelization.
```json // DO THIS: Scripts in each package // apps/web/package.json { "scripts":
(truncated - see the full file via the links below)
File tree — 15 files
.codex/skills/turborepo/SKILL.md
.codex/skills/turborepo/command/turborepo.md
.codex/skills/turborepo/references/best-practices/RULE.md
.codex/skills/turborepo/references/best-practices/dependencies.md
.codex/skills/turborepo/references/best-practices/packages.md
.codex/skills/turborepo/references/best-practices/structure.md
.codex/skills/turborepo/references/boundaries/RULE.md
.codex/skills/turborepo/references/caching/RULE.md
.codex/skills/turborepo/references/caching/gotchas.md
.codex/skills/turborepo/references/caching/remote-cache.md
.codex/skills/turborepo/references/ci/RULE.md
.codex/skills/turborepo/references/ci/github-actions.md
.codex/skills/turborepo/references/ci/patterns.md
.codex/skills/turborepo/references/ci/vercel.md
.codex/skills/turborepo/references/cli/RULE.md
Let your AI agent find skills like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.
wish › “Configure task dependencies, outputs, and caching in turbo.json”
Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →
Related skills
Turborepo skills enable you to design and fine-tune efficient build pipelines across monorepo projects. Leverage task caching, dependency management, and parallel execution to accelerate your development workflow and reduce build times.
This skill enables you to set up and manage complex task execution flows across monorepo workspaces, handling interdependencies and parallel processing efficiently. Leverage Anthony Fu's vetted approach to orchestrating build systems, tests, and deployments in large-scale projects.
Master Turborepo's task orchestration and caching mechanisms to streamline monorepo workflows. This skill covers pipeline configuration, dependency management, and performance optimization techniques for faster builds and deployments.
Master monorepo architecture by configuring Turborepo to manage multiple packages within a single repository. This skill covers workspace setup, dependency management, and leveraging Turborepo's caching layer to accelerate builds and reduce redundant work across your project structure.
turborepo streamlines development workflows across multiple packages by automating task execution with smart dependency resolution. It accelerates builds through incremental computation and caching, letting teams ship faster without managing complex interdependencies manually.
turborepo is a high-performance build system designed for JavaScript and TypeScript monorepos. It streamlines task execution, manages inter-project dependencies, and leverages advanced caching strategies to dramatically reduce build times. Built in Rust for speed and reliability, it integrates seamlessly into your development workflow.
More skills turborepo (MIT) · turborepo (MIT) · Turborepo (unlicensed) · Turborepo (unlicensed) · turborepo (Apache-2.0) · turborepo-monorepo (MIT) · turbo (MIT)