turborepo

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Setting up and debugging Turborepo monorepos involves many subtle configuration decisions—task dependencies, cache invalidation, 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 unexpected cache misses and stale hits using --summarize, --dry, and proper env/inputs configuration, plus remote cache setup. - Filtering & CI Integration: 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 to a monorepo. The Skill ensures scripts go in each package's package.json, the task registers in root turbo.json, root scripts delegate via turbo run, and transit nodes are used if parallel execution with cache invalidation is needed. ## Quick Start Ask the assistant to configure a build and test 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: ["^build"] and outputs like ["dist/**"]. Root package.json should only delegate via "turbo run build".

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

Use turbo run build --affected, which 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 missing unexpectedly?

Cache misses usually come from changed environment variables in the env key, .env files not listed in inputs, lockfile changes, or modified turbo.json config. Run turbo build --summarize and compare run JSON files to find the differing hash input.

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 interactive terminal commands.

What is the difference between dependsOn ^build and build in Turborepo?

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

Why are CI environment variables not available to my turbo tasks?

Turborepo's default strict mode filters environment variables to only those declared in env or globalEnv. Add CI variables like GITHUB_TOKEN to globalPassThroughEnv so they reach tasks without affecting cache hashes.