$npx skillfedfor your agent

turborepo

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.

Turborepo enables you to establish a JavaScript/TypeScript monorepo by creating a root `turbo.json` configuration file that defines your task pipeline. Start by installing turborepo as a dev dependency, then structure your workspace with multiple packages under a common directory (typically `packages/`). Each package maintains its own `package.json`, and turborepo orchestrates tasks across all of them using the `turbo run` command. The root `turbo.json` specifies which tasks exist, their dependencies, and caching rules—allowing turborepo to understand your entire build graph and execute tasks in the correct order.

AI-generated summary based on this skill's SKILL.md

5,665 313 MITupdated by antfu

Decision gist · record as of 2026-06-23

Turborepo enables you to establish a JavaScript/TypeScript monorepo by creating a root `turbo.json` configuration file that defines your task pipeline. Start by installing turborepo as a dev dependency, then structure your workspace with multiple packages under a common directory (typically `packages/`). Each package maintains its own `package.json`, and turborepo orchestrates tasks across all of them using the `turbo run` command. The root `turbo.json` specifies which tasks exist, their dependencies, and caching rules—allowing turborepo to understand your entire build graph and execute tasks in the correct order.

manual: git clone https://github.com/antfu/skills → cp -r skills/skills/turborepo ~/.claude/skills/turborepo
skills/turborepo/SKILL.md · version 559353fa

Use it when

  • Turborepo's --affected flag (used as `turbo run build --affected`) runs tasks only on packages that have changed since a specified baseline.
  • Turborepo's `turbo.json` configuration uses the `dependsOn` field to declare task relationships.

Verify before relying

Read SKILL.md below before installing (28 files). Open directory: indexed for reading, not audited.

Same gist for agents: .md · .json

Install

antfu/skills/turborepo · repository language: TypeScript

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 from scratch?

Turborepo enables you to establish a JavaScript/TypeScript monorepo by creating a root `turbo.json` configuration file that defines your task pipeline. Start by installing turborepo as a dev dependency, then structure your workspace with multiple packages under a common directory (typically `packages/`). Each package maintains its own `package.json`, and turborepo orchestrates tasks across all of them using the `turbo run` command. The root `turbo.json` specifies which tasks exist, their dependencies, and caching rules—allowing turborepo to understand your entire build graph and execute tasks in the correct order.

What does the turborepo --affected flag do and when should I use it?

Turborepo's --affected flag (used as `turbo run build --affected`) runs tasks only on packages that have changed since a specified baseline, plus any packages that depend on them. This is invaluable in CI/CD pipelines where you want to skip unnecessary work: if you modify a utility package, turborepo detects which downstream packages depend on it and runs their tasks too. This dramatically reduces build time in large monorepos by avoiding redundant task execution on unrelated packages.

How do I configure task dependencies and the dependsOn field in turbo.json?

Turborepo's `turbo.json` configuration uses the `dependsOn` field to declare task relationships. For example, you can specify that a `build` task depends on `^build` (meaning the same task must complete in all dependencies first) or on other tasks like `lint`. The `dependsOn` configuration tells turborepo how to order task execution across your monorepo, ensuring that if package A depends on package B, B's build completes before A's build starts. This prevents race conditions and enforces the correct execution sequence.

Why is turborepo caching not working and how do I debug it?

Turborepo caching relies on consistent task outputs and proper `outputs` configuration in `turbo.json`. If caching isn't working, verify that: your `outputs` array correctly specifies where task artifacts are written (e.g., `dist/`, `build/`), your tasks are deterministic (same inputs always produce same outputs), and you haven't disabled caching with environment variables. Use `turbo run build --verbose` to see cache hit/miss details. Remote cache setup via `turborepo remote cache` can also improve cache effectiveness across CI environments.

How can I run only changed packages and their affected dependents in a monorepo?

Turborepo enables efficient incremental builds by combining the `--affected` flag with `--filter` options. Use `turbo run build --affected` to run tasks only on packages with changes plus their dependents, or use `turbo run build --filter='./packages/my-package'` to target specific packages. This approach leverages turborepo's dependency graph understanding to skip unaffected work, making development cycles faster and CI pipelines more efficient in large JavaScript/TypeScript monorepos.

How do I integrate turborepo with CI/CD pipelines like GitHub Actions?

Turborepo integrates with CI/CD by using the `--affected` flag to run only changed packages, combined with remote caching for faster builds across workflow runs. In GitHub Actions, configure turborepo to connect to a remote cache (via `TURBO_TOKEN` and `TURBO_TEAM` environment variables), then use `turbo run build --affected` in your workflow. This ensures each CI run benefits from cached outputs from previous runs, significantly reducing build time. Turborepo's MIT license and monorepo-focused design make it ideal for orchestrating complex deployment pipelines.

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

Prefer package tasks over Root Tasks.

When creating tasks/scripts/pipelines, you MUST default to package tasks:

  1. Add the script to each relevant package's package.json
  2. Register the task in root turbo.json
  3. Root package.json only delegates via turbo run <task>

DO NOT put task logic in root package.json when it can live in packages. This defeats Turborepo's parallelization.

```json // DO THIS: Scripts in each

(truncated - see the full file via the links below)

File tree — 15 files
skills/turborepo/LICENSE.md
skills/turborepo/SKILL.md
skills/turborepo/SYNC.md
skills/turborepo/command/turborepo.md
skills/turborepo/references/best-practices/RULE.md
skills/turborepo/references/best-practices/dependencies.md
skills/turborepo/references/best-practices/packages.md
skills/turborepo/references/best-practices/structure.md
skills/turborepo/references/boundaries/RULE.md
skills/turborepo/references/caching/RULE.md
skills/turborepo/references/caching/gotchas.md
skills/turborepo/references/caching/remote-cache.md
skills/turborepo/references/ci/RULE.md
skills/turborepo/references/ci/github-actions.md
skills/turborepo/references/ci/patterns.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 pipelines and dependencies in a monorepo”

Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →

Related skills

turborepo
by secondsky · secondsky/claude-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.

MITupdated Jul 2026
★ 196repo stars
Turborepo
by langfuse · langfuse/langfuse

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.

no license declared → metadata onlyupdated Jul 2026
★ 31,975repo stars
turborepo
by vercel · vercel/turborepo

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.

MITupdated Jul 2026
★ 30,803repo stars
turborepo
by saffron-health · saffron-health/libretto

turborepo streamlines development workflows by orchestrating tasks and managing dependencies across monorepo projects. Configure build pipelines, cache strategies, and parallel execution to accelerate your development cycle and reduce redundant work.

MITupdated Jul 2026
★ 841repo stars
turborepo
by module-federation · module-federation/core

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.

MITfor codexupdated Jul 2026
★ 2,603repo stars
turborepo
by sanity-io · sanity-io/next-sanity

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.

MITupdated Jul 2026
★ 951repo stars

More skills turborepo (MIT) · turborepo-monorepo (MIT) · turborepo (MIT) · Turborepo (unlicensed)

Tags
build-orchestrationworkspace-managementtask-parallelizationdependency-graphcache-invalidationmonorepo-structureci-optimizationpackage-isolationincremental-buildsartifact-caching