turborepo

Configure and optimize Turborepo task pipelines, caching, and monorepo structure.

1|Updated Aug 11, 2026
One-click install
npx skills add https://github.com/Chia1104/agent-air --skill turborepo-chia1104
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: turborepo
Source: https://github.com/Chia1104/agent-air/tree/main/skills/shared/turborepo
Command: npx skills add https://github.com/Chia1104/agent-air --skill turborepo-chia1104

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Setting up and maintaining a JavaScript/TypeScript monorepo build system involves tricky decisions about task dependencies, cache invalidation, environment variables, and CI optimization. This Skill provides structured guidance and decision trees for configuring Turborepo correctly and avoiding common anti-patterns. ## Core Features & Use Cases - Task Pipeline Configuration: Guidance on turbo.json tasks, dependsOn syntax, outputs, inputs, and Package Configurations, with a strong preference for package tasks over root tasks. - Caching & Filtering: Explains cache hash inputs, remote cache setup, the --affected flag, and --filter syntax for running only changed packages. - CI/CD & Best Practices: Covers GitHub Actions and Vercel setups, environment variable handling (env, globalEnv, passThroughEnv), watch mode, boundaries enforcement, and monorepo structure conventions. - Use Case: When a user asks to set up a build pipeline in a monorepo, the Skill walks through adding scripts to each package's package.json, registering tasks in turbo.json, and ensuring root scripts only delegate via turbo run. ## Quick Start Ask the AI to configure a build and test pipeline for your Turborepo monorepo with caching and affected-package filtering in CI.

Frequently Asked Questions about turborepo

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

FAQPage Schema
How do I configure tasks in turbo.json for a monorepo?▼

Add scripts to each package's package.json, then register tasks in root turbo.json with dependsOn and outputs. Root package.json should only delegate via turbo run <task>, keeping task logic in packages for parallelization.

How do I run only changed packages with Turborepo?▼

Use turbo run build --affected, which compares against main and includes dependents of changed packages. Set TURBO_SCM_BASE to compare against a different base branch, or use --filter with git range syntax for manual control.

Why is my Turborepo cache not working?▼

Cache misses usually come from a missing outputs key, undeclared environment variables, or .env files not listed in inputs. Use --summarize or --dry to debug hash inputs and verify 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, CI workflows, and scripts. The turbo <task> shorthand is intended only for one-off terminal commands typed directly by humans or agents.

How do I set up Turborepo remote caching in GitHub Actions?▼

Provide TURBO_TOKEN and TURBO_TEAM environment variables, either via a Personal Access Token secret or OIDC using the vercel/setup-turborepo-remote-cache-action. Also set fetch-depth to at least 2 so --affected can compute the merge base.

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

^build runs the build task in dependency packages first, while build without the caret runs build in the same package first. The pkg#task syntax targets a specific package's task.