turborepo

Configure Turborepo task pipelines, caching, and filtering for JavaScript monorepos.

Updated Jun 12, 2026
One-click install
npx skills add https://github.com/taylorelley/skills --skill turborepo-taylorelley
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: turborepo
Source: https://github.com/taylorelley/skills/tree/main/skills/framework/turborepo
Command: npx skills add https://github.com/taylorelley/skills --skill turborepo-taylorelley

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Setting up and debugging Turborepo monorepo builds involves many subtle rules around task pipelines, cache invalidation, environment variables, and package filtering, and misconfigurations silently defeat parallelization and caching. ## Core Features & Use Cases - Task Pipeline Configuration: Guides correct turbo.json setup with dependsOn, outputs, inputs, and env keys, enforcing package tasks over root tasks. - Cache Debugging & Optimization: Diagnoses cache misses, configures remote caching, and explains hash inputs including the globalConfiguration future flag. - Filtering & CI Setup: Covers --affected, --filter syntax, GitHub Actions workflows, Vercel deployment, and turbo-ignore for skipping unchanged work. - Use Case: When a user asks to set up a build pipeline in a pnpm monorepo, the skill produces package-level scripts, a root turbo.json with proper dependsOn and outputs, and a CI workflow using turbo run build --affected. ## Quick Start Use the turborepo skill to configure a build, lint, and test pipeline for my monorepo with apps and packages directories.

Frequently Asked Questions about turborepo

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure a build pipeline in Turborepo?

Add the build script to each package's package.json, then register the task in root turbo.json with dependsOn set to ["^build"] and outputs like ["dist/**"]. The root package.json should only delegate via turbo run build.

How do I run tasks only in changed packages with Turborepo?

Use turbo run build --affected, which compares your branch against the default branch and runs tasks in changed packages plus their dependents. Customize the base with --affected-base=origin/develop.

Why is my Turborepo cache not working?

Common causes include missing outputs keys for file-producing tasks, environment variables not declared in the env key, or .env files absent from inputs. Use --summarize or --dry to inspect hash inputs and debug misses.

Should I use turbo or turbo run in package.json scripts?

Always use turbo run in package.json scripts, CI workflows, and any committed code. The turbo shorthand is only intended for one-off commands typed directly in a terminal.

Does Turborepo support environment variables in caching?

Yes, declare variables in a task's env key or globalEnv so changes invalidate the cache. Use passThroughEnv for runtime-only variables like credentials that should not affect cache keys.

When should I use Root Tasks instead of package tasks?

Root Tasks (//#taskname) are only for work that truly cannot live in packages, such as repo-wide release scripts or Vitest Projects' //#test. Package tasks are preferred because they enable parallelization, per-package caching, and filtering.