turborepo-caching

Configure and debug Turborepo 2.x local and remote caching in pnpm monorepos.

Updated Apr 4, 2026
One-click install
npx skills add https://github.com/SleyiW/iWana-neXt --skill turborepo-caching-sleyiw
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: turborepo-caching
Source: https://github.com/SleyiW/iWana-neXt/tree/main/.agents/skills/turborepo-caching
Command: npx skills add https://github.com/SleyiW/iWana-neXt --skill turborepo-caching-sleyiw

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Slow builds and unpredictable cache misses in a Turborepo 2.x monorepo waste CI time and developer hours. This Skill governs the configuration of turbo.json pipelines, cache inputs/outputs, and remote caching so builds reuse prior results correctly. ## Core Features & Use Cases - Pipeline Configuration: Defines correct Turborepo 2.x tasks syntax (not the deprecated v1 pipeline key) with proper dependsOn, inputs, outputs, and env declarations. - Cache Miss Debugging: Diagnoses the three most common causes of cache misses—overly broad inputs, undeclared environment variables, and missing outputs—and provides fixes. - On-Prem Remote Caching: Sets up self-hosted remote caching via turbo-remote-cache or a shared Docker volume, without relying on Vercel. - Use Case: Your CI builds take 20 minutes because every run is a cache miss. Use this Skill to audit turbo.json, scope the inputs globs, declare the env variables, and enable a self-hosted remote cache so unchanged packages skip rebuilding. ## Quick Start Ask the AI to review the repo's turbo.json for Turborepo 2.x cache misconfigurations and explain why the build task keeps missing the cache in CI.

Frequently Asked Questions about turborepo-caching

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

FAQPage Schema
How do I configure Turborepo 2.x caching in turbo.json?

Define tasks under the "tasks" key with explicit outputs, dependsOn, and inputs. Turborepo 2.x ignores the legacy "pipeline" key silently, so using "tasks" is mandatory for caching to work.

Why does Turborepo keep missing the cache in CI?

Cache misses usually come from overly broad inputs like "**/*", undeclared environment variables, or missing outputs. Scope inputs to relevant source files and declare env vars that affect the build output.

How do I set up Turborepo remote caching without Vercel?

Use the self-hosted turbo-remote-cache server and set TURBO_TOKEN, TURBO_TEAM, and TURBO_API environment variables in CI. Alternatively, mount the .turbo directory as a persistent Docker volume between CI runs.

Does Turborepo 2.x still support the pipeline key?

No. Turborepo 2.x replaced "pipeline" with "tasks" and silently ignores the v1 syntax. Any configuration under "pipeline" will not apply, which is a common source of broken caching.

Which tasks should have cache disabled in Turborepo?

Long-running or side-effect tasks like dev servers and clean should set "cache": false, and dev should also be marked persistent. Build, test, lint, and typecheck tasks benefit from caching.