turborepo

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Monorepo builds become slow and error-prone when tasks run sequentially, caches miss unexpectedly, or environment variables silently break reproducibility. This Skill provides structured guidance for configuring Turborepo correctly so tasks run in parallel, cache reliably, and only rebuild what changed. ## Core Features & Use Cases - Task Pipeline Configuration: Define tasks in turbo.json with correct dependsOn, outputs, inputs, and env declarations, following the package-tasks-over-root-tasks principle. - Cache Debugging and Remote Caching: Diagnose cache misses with --summarize and --dry, and set up Vercel Remote Cache in CI environments. - Filtering and CI Optimization: Run only changed packages with --affected, compose --filter expressions, and integrate with GitHub Actions or Vercel deployments. - Use Case: A team adds a new lint task across apps/web and packages/ui. The Skill guides them to add scripts per package, register the task in turbo.json, use transit nodes for parallel execution with correct cache invalidation, and wire it into CI with turbo run lint --affected. ## Quick Start Ask the assistant to configure a build pipeline in turbo.json for your monorepo with proper caching 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 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 only changed packages in Turborepo CI?

Use turbo run build test lint --affected, which compares your branch against the default branch and runs tasks in changed packages plus their dependents. Ensure your CI fetches enough git history, such as fetch-depth: 2 in GitHub Actions.

Why is my Turborepo cache missing unexpectedly?

Cache misses usually come from undeclared environment variables, .env files not listed in inputs, or overly broad globalDependencies. Debug with --summarize or --dry to inspect hash inputs, and declare variables in the task's env 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 turbo shorthand is intended only for one-off commands typed directly in a terminal.

What is the difference between dependsOn ^build and build?

The caret form ^build runs the build task in dependency packages first, while plain build runs it in the same package. Use ^build for build ordering across packages and plain task names for same-package sequencing like test depending on build.

When should I use Root Tasks instead of package tasks?

Root Tasks (//#taskname) are only for work that cannot live in a package, such as repo-wide release scripts or Vitest Projects' //#test. Everything else should be a package task to get parallelization, per-package caching, and filtering.