turborepo

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

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

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 with correct dependsOn syntax (^build vs build), outputs, inputs, and persistent flags, enforcing the package-tasks-over-root-tasks principle. - Cache Debugging & Optimization: Diagnoses cache misses using --summarize and --dry, configures remote caching, and fixes environment variable hashing issues. - Filtering & CI Setup: Implements --affected workflows, --filter patterns, GitHub Actions pipelines, and turbo-ignore for running only changed packages. - Use Case: A developer notices CI builds re-run everything on every PR. Use this Skill to add --affected flags, fix fetch-depth in GitHub Actions, and configure remote caching so only changed packages and their dependents rebuild. ## Quick Start Ask the assistant to review your turbo.json and package.json scripts for Turborepo best practices and fix any caching or task configuration issues.

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 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.

How do I configure task dependencies in turbo.json?

Use dependsOn with caret syntax: "build": { "dependsOn": ["^build"] } runs build in dependency packages first. Without the caret, it refers to the same package's task. Use pkg#task syntax for specific package tasks.

Why is my Turborepo cache not working?

Common causes include missing outputs keys for file-producing tasks, environment variables not declared in the env key, or .env files absent from inputs. Debug with --summarize or --dry to inspect hash inputs.

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

Does Turborepo support GitHub Actions CI?

Yes. Set TURBO_TOKEN and TURBO_TEAM for remote caching, use fetch-depth of at least 2 in actions/checkout for --affected to work, and run tasks with turbo run build test lint --affected.

When should I use Root Tasks instead of package tasks?

Root Tasks (//#taskname) are only for work that cannot live in packages, such as repo-wide release scripts or Vitest Projects' //#test. Default to package tasks for parallelization, per-package caching, and filtering.