turborepo-caching

Configure Turborepo pipelines with local and remote caching for monorepo builds.

1|Updated May 10, 2026
One-click install
npx skills add https://github.com/Tgoldi/claude-skills --skill turborepo-caching-tgoldi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: turborepo-caching
Source: https://github.com/Tgoldi/claude-skills/tree/main/turborepo-caching
Command: npx skills add https://github.com/Tgoldi/claude-skills --skill turborepo-caching-tgoldi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Monorepo builds become slow and wasteful when every task re-runs on every change, and teams struggle to configure Turborepo pipelines, cache keys, and remote caching correctly across local development and CI. ## Core Features & Use Cases - Pipeline Configuration: Ready-to-use turbo.json templates covering build, test, lint, typecheck, dev, and deploy tasks with proper dependsOn, inputs, outputs, and env declarations. - Remote Caching Setup: Instructions for Vercel remote caching (TURBO_TOKEN/TURBO_TEAM) plus a self-hosted Express cache server implementing the Turborepo artifacts API. - Filtering and CI Integration: Filter syntax for building only affected packages and a GitHub Actions workflow that builds and tests only what changed since origin/main. - Use Case: A team migrating to a monorepo uses the templates to define their pipeline, enable remote caching in CI, and debug cache misses with dry-run and verbosity flags. ## Quick Start Ask the AI to set up a turbo.json pipeline with remote caching and a CI workflow that only builds packages changed since the main branch.

Frequently Asked Questions about turborepo-caching

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

FAQPage Schema
How do I configure remote caching in Turborepo?

Run npx turbo login and npx turbo link to connect to Vercel's remote cache, then set TURBO_TOKEN and TURBO_TEAM environment variables in CI. For self-hosting, implement the /v8/artifacts HTTP API and pass --api, --token, and --team flags to turbo commands.

How do I build only changed packages in Turborepo?

Use the filter flag with a git range, such as turbo build --filter='...[origin/main]', to build only packages changed since the main branch. You can also filter by package name, directory, or combine and exclude filters.

Why is my Turborepo cache being invalidated unexpectedly?

Cache invalidation usually comes from overly broad inputs or undeclared environment variables. Define explicit inputs in turbo.json, exclude files like markdown and tests with negation patterns, and declare env vars so cache keys stay stable.

Should dev servers be cached in Turborepo?

No, long-running tasks like dev servers should set cache to false and persistent to true in turbo.json. Caching persistent tasks produces incorrect behavior since they never produce final outputs.

How do I debug Turborepo cache misses?

Run turbo build --dry-run to see planned tasks, --verbosity=2 to inspect hashes, --summarize for cache status, or --force to bypass the cache entirely. TURBO_LOG_VERBOSITY=debug gives detailed per-task logging.