turborepo

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

1|2|Updated Mar 14, 2026
One-click install
npx skills add https://github.com/Odonno/cleanmail --skill turborepo-odonno
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: turborepo
Source: https://github.com/Odonno/cleanmail/tree/main/.agents/skills/turborepo
Command: npx skills add https://github.com/Odonno/cleanmail --skill turborepo-odonno

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, caching, environment variables, and filtering, and misconfigurations silently break parallelization or cache correctness. ## Core Features & Use Cases - Task Pipeline Configuration: Guides creation of package-level tasks in turbo.json with correct dependsOn, outputs, and inputs, avoiding root-task anti-patterns. - Cache Debugging & Optimization: Diagnoses cache misses with --summarize and --dry, configures remote caching, and fixes environment variable hashing issues. - Filtering & CI Setup: Applies --affected and --filter syntax to run only changed packages, and sets up GitHub Actions or Vercel CI workflows. - Use Case: When adding a new lint task to a monorepo, the skill ensures scripts live in each package's package.json, registers the task in turbo.json, and uses transit nodes for parallel execution with correct cache invalidation. ## Quick Start Use the turborepo skill to configure a build and test pipeline in my turbo.json that only runs tasks for packages changed since the main branch.

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 task in turbo.json?

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 for changed packages in Turborepo?

Use the --affected flag, for example "turbo run build --affected", which compares against the default branch and includes dependents. Customize the base with --affected-base=origin/develop.

Why is my Turborepo cache missing unexpectedly?

Cache misses usually come from changed environment variables, untracked .env files, lockfile updates, or turbo.json edits. Run with --summarize and compare two run summaries to identify which hash input changed.

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 shorthand "turbo <task>" is intended only for one-off commands typed directly in a terminal.

Does Turborepo support environment variables from .env files?

Turborepo does not load .env files itself; your framework does. To keep caching correct, list the variables in the task's env key and add the .env files to the task's inputs array.

When should I avoid using the --parallel flag in Turborepo?

Avoid --parallel because it bypasses the dependency graph and can cause race conditions. Instead configure dependsOn correctly, or use transit nodes for tasks that need parallel execution with proper cache invalidation.