turborepo

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Setting up and maintaining a Turborepo monorepo involves many subtle decisions—task dependencies, cache inputs, environment variable hashing, and CI filtering—where small misconfigurations 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 with correct dependsOn (^build vs build), outputs, inputs, and persistent flags, enforcing the package-tasks-over-root-tasks principle. - Cache Debugging & Optimization: Diagnoses cache misses with --summarize and --dry, configures remote caching, and fixes missing outputs or unhashed environment variables. - Filtering & CI Integration: Sets up --affected runs, --filter syntax, GitHub Actions workflows, Vercel remote cache authentication, and turbo-ignore for skipping unchanged work. - Use Case: A developer's CI builds every package on every PR. Use this Skill to switch to turbo run build --affected with proper fetch-depth and remote cache tokens, cutting CI time to only changed packages and their dependents. ## Quick Start Use the turborepo skill to configure my turbo.json build pipeline with proper caching and set up a GitHub Actions workflow that only builds affected packages.

Frequently Asked Questions about turborepo

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

FAQPage Schema
How do I run only changed packages in Turborepo?

Use `turbo run build --affected` to run tasks only in packages changed since the base branch plus their dependents. Set TURBO_SCM_BASE to compare against a branch other than main, and ensure CI fetches enough git history (fetch-depth: 2 or more).

What is the difference between dependsOn ^build and build in turbo.json?

^build runs the build task in dependency packages first, while plain build runs it in the same package first. Use ^build so packages compile their workspace dependencies before building themselves.

Why is my Turborepo cache not working?

Cache misses usually come from missing outputs keys, environment variables not declared in env, or .env files absent from inputs. Debug with --summarize or --dry to inspect hash inputs and confirm which files and variables affect the cache key.

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 remote caching in GitHub Actions?

Yes, remote caching works in GitHub Actions via Vercel Remote Cache using either OIDC token exchange or a personal access token. Set TURBO_TOKEN and TURBO_TEAM environment variables, or use the vercel/setup-turborepo-remote-cache-action.

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' root test task. Default to package tasks since they enable parallelization, individual caching, and filtering.