turborepo

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

Updated Mar 22, 2026
One-click install
npx skills add https://github.com/Ahmed-Eldalatony/airbnb-clone-bench --skill turborepo-ahmed-eldalatony
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: turborepo
Source: https://github.com/Ahmed-Eldalatony/airbnb-clone-bench/tree/main/.agents/skills/turborepo
Command: npx skills add https://github.com/Ahmed-Eldalatony/airbnb-clone-bench --skill turborepo-ahmed-eldalatony

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Setting up and maintaining a Turborepo monorepo involves many subtle configuration decisions—task dependencies, cache outputs, environment variable hashing, and CI 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 (never root tasks) with correct dependsOn, outputs, inputs, and env declarations in turbo.json. - Cache Debugging & Optimization: Diagnoses cache misses, configures remote caching, and explains hash inputs including the globalConfiguration future flag behavior. - Filtering & CI Setup: Covers --affected, --filter syntax, GitHub Actions workflows, Vercel deployment, and turbo-ignore for running only changed packages. - Use Case: A developer adds a new lint task across apps/web and packages/ui. The Skill ensures scripts live in each package.json, the task is registered in root turbo.json, and root scripts only delegate via turbo run. ## Quick Start Ask the assistant to set up a build and test pipeline in your Turborepo monorepo with proper caching and affected-package filtering for CI.

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 Turborepo?

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

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

Use the --affected flag: turbo run build test lint --affected. It 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, or use --force to bypass cache entirely.

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 only intended for one-off interactive terminal commands typed directly by humans.

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. Use pkg#task syntax to depend on a specific package's task, such as "deploy": { "dependsOn": ["web#build"] }.

Does Turborepo support GitHub Actions CI?

Yes, Turborepo works with GitHub Actions using checkout with fetch-depth of at least 2 for --affected. Set TURBO_TOKEN and TURBO_TEAM secrets for remote caching, and run turbo run build test lint --affected for efficient PR builds.