turborepo-caching

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

1|Updated Aug 17, 2025
One-click install
npx skills add https://github.com/ratnesh-maurya/mdconverter --skill turborepo-caching-ratnesh-maurya
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: turborepo-caching
Source: https://github.com/ratnesh-maurya/mdconverter/tree/main/.claude/skills/turborepo-caching
Command: npx skills add https://github.com/ratnesh-maurya/mdconverter --skill turborepo-caching-ratnesh-maurya

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Monorepo builds become slow and wasteful when every task re-runs on every change. This Skill provides production-ready Turborepo configuration patterns so builds, tests, and CI pipelines reuse cached outputs instead of repeating work. ## Core Features & Use Cases - Pipeline Configuration: Ready-to-use turbo.json templates covering build, test, lint, typecheck, dev, and deploy tasks with correct dependsOn, inputs, outputs, and env declarations. - Remote Caching: Setup for Vercel remote cache in GitHub Actions CI, plus a self-hosted Express cache server implementing the Turborepo artifacts API. - Filtering and Debugging: Commands for scoping builds to changed packages (--filter), dry runs, cache summaries, and verbose hash inspection to diagnose cache misses. - Use Case: A team migrating to a monorepo uses the root turbo.json template and CI workflow to build only packages changed since origin/main, cutting CI time by reusing remote cache artifacts. ## Quick Start Ask the AI to generate a turbo.json pipeline configuration with build, test, and lint tasks plus remote caching for your monorepo.

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 a Turborepo monorepo?

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 dependents using patterns like @myorg/web... or ./apps/*.

Why is my Turborepo cache being invalidated unexpectedly?

Cache misses usually come from undeclared inputs, environment variables not listed in the env key, or global dependencies like .env files changing. Run turbo build --dry-run or --summarize to inspect which files and hashes affect each task's cache key.

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 because they never produce final outputs.

Can I use a self-hosted cache server instead of Vercel?

Yes. Turborepo's remote cache is an HTTP API with GET, PUT, and HEAD endpoints under /v8/artifacts. A minimal Express server can store artifacts on disk, and you point turbo at it with the --api flag and a token.