turborepo

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

Updated Aug 3, 2026
One-click install
npx skills add https://github.com/Mark-Atef/Nebu --skill turborepo-mark-atef
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: turborepo
Source: https://github.com/Mark-Atef/Nebu/tree/main/.agents/skills/turborepo
Command: npx skills add https://github.com/Mark-Atef/Nebu --skill turborepo-mark-atef

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 dependencies, cache invalidation, environment variables, and filtering, and misconfiguration silently defeats 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 changed-package builds. - Use Case: When adding a lint task to a monorepo, the Skill ensures scripts live in each package's package.json, the task is registered in turbo.json, and root scripts only delegate via turbo run. ## Quick Start Ask the assistant to configure a build and test pipeline in turbo.json for your monorepo using the turborepo skill.

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/**"]. 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 env, or .env files absent from inputs. Debug with --summarize or --dry to inspect hash inputs.

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 intended only 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 cannot exist in packages, such as repo-wide release scripts or Vitest Projects' //#test. Everything else should be package tasks to preserve parallelization and per-package caching.