turborepo

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

Updated Jul 24, 2026
One-click install
npx skills add https://github.com/saad-tayyab/lumora --skill turborepo-saad-tayyab
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: turborepo
Source: https://github.com/saad-tayyab/lumora/tree/main/.agents/skills/turborepo
Command: npx skills add https://github.com/saad-tayyab/lumora --skill turborepo-saad-tayyab

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Setting up and maintaining a Turborepo monorepo involves subtle configuration decisions—task dependencies, cache inputs, environment variable hashing, and package filtering—where small mistakes silently break caching or parallelization. This Skill provides decision trees, anti-pattern detection, and reference documentation to configure turbo.json correctly the first time. ## Core Features & Use Cases - Task Pipeline Configuration: Guides creation of package tasks over root tasks, correct dependsOn syntax (^build vs build), outputs declaration, and transit nodes for parallel tasks with cache invalidation. - Cache Debugging & Optimization: Diagnoses cache misses, configures remote caching, and fixes environment variable and .env file hashing issues. - Filtering & CI Setup: Covers --affected and --filter syntax for running only changed packages, plus GitHub Actions and Vercel deployment workflows. - Use Case: Your CI builds every package on every pull request. Use this Skill to switch to turbo run build --affected with remote caching so only changed packages and their dependents rebuild. ## Quick Start Use the turborepo skill to configure my turbo.json build pipeline with proper outputs and dependency ordering.

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

Define a build task with dependsOn set to ["^build"] so dependency packages build first, and declare outputs like ["dist/**"] so results are cached. Add the build script to each package's package.json, and let the root package.json delegate with "turbo run build".

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

Use the --affected flag: turbo run build --affected compares your branch against the default branch and runs tasks only in changed packages and their dependents. For custom comparisons, use --filter with git range syntax like --filter=...[origin/main].

Why is my Turborepo cache not working?

Cache misses usually come from missing outputs declarations, environment variables not listed in the env key, or .env files absent from inputs. Debug with --summarize or --dry to inspect hash inputs, and check that globalDependencies is not overly broad.

Should I use turbo run or the turbo shorthand in package.json?

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 by humans or agents.

What is the difference between ^build and build in dependsOn?

^build runs the build task in dependency packages first, while plain build runs it in the same package. Using "build" without the caret in a build task's dependsOn creates a self-reference and is a common configuration mistake.

Does Turborepo support GitHub Actions CI with remote caching?

Yes, set TURBO_TOKEN as a secret and TURBO_TEAM as a variable in your workflow environment to enable Vercel Remote Cache. Use fetch-depth of at least 2 on checkout so --affected can compute the merge base.