Agent skill

Turborepo Caching

by wshobson in wshobson/agents

Configures Turborepo pipelines and local or remote caching for monorepo builds, including Vercel remote cache, a self-hosted cache and cache-miss debugging.

MITAuto-check: notesDevelopment

Install Turborepo Caching

skills CLI
$ npx skills add wshobson/agents --skill turborepo-caching -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install wshobson/agents turborepo-caching --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/wshobson/agents.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/developer-essentials/skills/turborepo-caching .claude/skills/turborepo-caching && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
turborepo-caching
GitHub stars
40k
Used in
9 other repos
Token cost
~2k tokens
SKILL.md length
171 words
Files
1
Skills in repo
142
Repo updated
First seen
Licence
MIT

At a glance

Configures Turborepo pipelines and local or remote caching for monorepo builds, including Vercel remote cache, a self-hosted cache and cache-miss debugging.

  • Works in 2 steps: Turborepo Architecture → Pipeline Concepts
  • Setting up Turborepo in a new monorepo
  • SKILL.md covers When to Use This Skill, Core Concepts, Templates and Debugging Cache, plus 1 more section
  • Calls turbo and npx; reaches turbo.build; needs TURBO_TOKEN

What it does

A set of Turborepo concepts and templates. It explains the pipeline settings dependsOn, cache, outputs, inputs and persistent, then supplies seven templates: a root turbo.json, a package-specific pipeline, remote caching with Vercel, a self-hosted cache server, filtering and scoping, an advanced pipeline configuration and a root package.json.

Remote caching on Vercel starts with npx turbo login and comes with a CI workflow example. The self-hosted option is a small local server, and the skill warns that its demo does not authenticate the dummy token, so it should hold only disposable artifacts on a trusted machine and must not be exposed. A debugging section uses turbo build --dry-run to see what would run, and the best-practice list opens with defining explicit inputs.

When your agent uses it

  • Setting up Turborepo in a new monorepo
  • Debugging cache misses in turbo builds
  • Adding remote caching, either Vercel-hosted or self-hosted
  • Shortening CI build times for a monorepo
  • Moving a repository from another monorepo tool to Turborepo

Example prompts

  • “Write a turbo.json for our apps/web and packages workspaces with build outputs cached.”
  • “Why does turbo build keep missing the cache on CI? Check the inputs.”
  • “Turn on Vercel remote caching for our Turborepo and update the CI workflow.”
  • “Build only the web app and what it depends on using a Turborepo filter.”

Requirements

  • A monorepo managed with Turborepo
  • A Vercel account for the Vercel remote cache option

Workflow steps

2 steps, taken from the step headings in SKILL.md.

  1. Turborepo Architecture
  2. Pipeline Concepts

What it can do on your machine

Read from SKILL.md and the folder at commit 46891e7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • turbo
    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • turbo.build

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • TURBO_TOKEN

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Turborepo Caching loads about 2k tokens when it runs. Until then it costs about 49 tokens; SKILL.md has 171 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~49
When it runs · the whole SKILL.md, loaded when a task matches
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:56
    "globalDependencies": [".env", ".env.local"],

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from wshobson/agents at commit 46891e7, republished under its MIT licence (© wshobson). 171 words, ~2,028 tokens.

Download SKILL.mdSave it as .claude/skills/turborepo-caching/SKILL.md (or your agent's skills folder).
name
turborepo-caching
description
Configure Turborepo for efficient monorepo builds with local and remote caching. Use when setting up Turborepo, optimizing build pipelines, or implementing distributed caching.

Turborepo Caching

Production patterns for Turborepo build optimization.

When to Use This Skill

  • Setting up new Turborepo projects
  • Configuring build pipelines
  • Implementing remote caching
  • Optimizing CI/CD performance
  • Migrating from other monorepo tools
  • Debugging cache misses

Core Concepts

1. Turborepo Architecture
Workspace Root/
├── apps/
│   ├── web/
│   │   └── package.json
│   └── docs/
│       └── package.json
├── packages/
│   ├── ui/
│   │   └── package.json
│   └── config/
│       └── package.json
├── turbo.json
└── package.json
2. Pipeline Concepts
ConceptDescription
dependsOnTasks that must complete first
cacheWhether to cache outputs
outputsFiles to cache
inputsFiles that affect cache key
persistentLong-running tasks (dev servers)

Templates

Template 1: turbo.json Configuration
json
{
  "$schema": "https://turbo.build/schema.json",
  "globalDependencies": [".env", ".env.local"],
  "globalEnv": ["NODE_ENV", "VERCEL_URL"],
  "pipeline": {
    "build": {
      "dependsOn": ["^build"],
      "outputs": ["dist/**", ".next/**", "!.next/cache/**"],
      "env": ["API_URL", "NEXT_PUBLIC_*"]
    },
    "test": {
      "dependsOn": ["build"],
      "outputs": ["coverage/**"],
      "inputs": ["src/**/*.tsx", "src/**/*.ts", "test/**/*.ts"]
    },
    "lint": {
      "outputs": [],
      "cache": true
    },
    "typecheck": {
      "dependsOn": ["^build"],
      "outputs": []
    },
    "dev": {
      "cache": false,
      "persistent": true
    },
    "clean": {
      "cache": false
    }
  }
}
Template 2: Package-Specific Pipeline
json
// apps/web/turbo.json
{
  "$schema": "https://turbo.build/schema.json",
  "extends": ["//"],
  "pipeline": {
    "build": {
      "outputs": [".next/**", "!.next/cache/**"],
      "env": ["NEXT_PUBLIC_API_URL", "NEXT_PUBLIC_ANALYTICS_ID"]
    },
    "test": {
      "outputs": ["coverage/**"],
      "inputs": ["src/**", "tests/**", "jest.config.js"]
    }
  }
}
Template 3: Remote Caching with Vercel
bash
# Login to Vercel
npx turbo login

# Link to Vercel project
npx turbo link

# Run with remote cache
turbo build --remote-only

# CI environment variables
TURBO_TOKEN=your-token
TURBO_TEAM=your-team
yaml
# .github/workflows/ci.yml
name: CI

on:
  push:
    branches: [main]
  pull_request:

env:
  TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
  TURBO_TEAM: ${{ vars.TURBO_TEAM }}

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - uses: actions/setup-node@v4
        with:
          node-version: 20
          cache: "npm"

      - name: Install dependencies
        run: npm ci

      - name: Build
        run: npx turbo build --filter='...[origin/main]'

      - name: Test
        run: npx turbo test --filter='...[origin/main]'
Template 4: Self-Hosted Remote Cache
typescript
// Custom remote cache server (Express)
import express from "express";
import { createReadStream, createWriteStream } from "fs";
import { mkdir } from "fs/promises";
import { join } from "path";

const app = express();
const CACHE_DIR = "./cache";

// Get artifact
app.get("/v8/artifacts/:hash", async (req, res) => {
  const { hash } = req.params;
  const team = req.query.teamId || "default";
  const filePath = join(CACHE_DIR, team, hash);

  try {
    const stream = createReadStream(filePath);
    stream.pipe(res);
  } catch {
    res.status(404).send("Not found");
  }
});

// Put artifact
app.put("/v8/artifacts/:hash", async (req, res) => {
  const { hash } = req.params;
  const team = req.query.teamId || "default";
  const dir = join(CACHE_DIR, team);
  const filePath = join(dir, hash);

  await mkdir(dir, { recursive: true });

  const stream = createWriteStream(filePath);
  req.pipe(stream);

  stream.on("finish", () => {
    res.json({
      urls: [`${req.protocol}://${req.get("host")}/v8/artifacts/${hash}`],
    });
  });
});

// Check artifact exists
app.head("/v8/artifacts/:hash", async (req, res) => {
  const { hash } = req.params;
  const team = req.query.teamId || "default";
  const filePath = join(CACHE_DIR, team, hash);

  try {
    await fs.access(filePath);
    res.status(200).end();
  } catch {
    res.status(404).end();
  }
});

app.listen(3000, "127.0.0.1");
json
// turbo.json for the local cache demo
{
  "remoteCache": {
    "signature": false
  }
}
bash
# This local demo does not authenticate the dummy token.
# Use only disposable artifacts on a trusted machine; do not expose the server.
turbo build --api="http://127.0.0.1:3000" --token="my-token" --team="my-team"
Template 5: Filtering and Scoping
bash
# Build specific package
turbo build --filter=@myorg/web

# Build package and its dependencies
turbo build --filter=@myorg/web...

# Build package and its dependents
turbo build --filter=...@myorg/ui

# Build changed packages since main
turbo build --filter='...[origin/main]'

# Build packages in directory
turbo build --filter='./apps/*'

# Combine filters
turbo build --filter=@myorg/web --filter=@myorg/docs

# Exclude package
turbo build --filter='!@myorg/docs'

# Include dependencies of changed
turbo build --filter='...[HEAD^1]...'
Template 6: Advanced Pipeline Configuration
json
{
  "$schema": "https://turbo.build/schema.json",
  "pipeline": {
    "build": {
      "dependsOn": ["^build"],
      "outputs": ["dist/**"],
      "inputs": ["$TURBO_DEFAULT$", "!**/*.md", "!**/*.test.*"]
    },
    "test": {
      "dependsOn": ["^build"],
      "outputs": ["coverage/**"],
      "inputs": ["src/**", "tests/**", "*.config.*"],
      "env": ["CI", "NODE_ENV"]
    },
    "test:e2e": {
      "dependsOn": ["build"],
      "outputs": [],
      "cache": false
    },
    "deploy": {
      "dependsOn": ["build", "test", "lint"],
      "outputs": [],
      "cache": false
    },
    "db:generate": {
      "cache": false
    },
    "db:push": {
      "cache": false,
      "dependsOn": ["db:generate"]
    },
    "@myorg/web#build": {
      "dependsOn": ["^build", "@myorg/db#db:generate"],
      "outputs": [".next/**"],
      "env": ["NEXT_PUBLIC_*"]
    }
  }
}
Template 7: Root package.json Setup
json
{
  "name": "my-turborepo",
  "private": true,
  "workspaces": ["apps/*", "packages/*"],
  "scripts": {
    "build": "turbo build",
    "dev": "turbo dev",
    "lint": "turbo lint",
    "test": "turbo test",
    "clean": "turbo clean && rm -rf node_modules",
    "format": "prettier --write \"**/*.{ts,tsx,md}\"",
    "changeset": "changeset",
    "version-packages": "changeset version",
    "release": "turbo build --filter=./packages/* && changeset publish"
  },
  "devDependencies": {
    "turbo": "^1.10.0",
    "prettier": "^3.0.0",
    "@changesets/cli": "^2.26.0"
  },
  "packageManager": "npm@10.0.0"
}

Debugging Cache

bash
# Dry run to see what would run
turbo build --dry-run

# Verbose output with hashes
turbo build --verbosity=2

# Show task graph
turbo build --graph

# Force no cache
turbo build --force

# Show cache status
turbo build --summarize

# Debug specific task
TURBO_LOG_VERBOSITY=debug turbo build --filter=@myorg/web

Best Practices

Do's
  • Define explicit inputs - Avoid cache invalidation
  • Use workspace protocol - "@myorg/ui": "workspace:*"
  • Enable remote caching - Share across CI and local
  • Filter in CI - Build only affected packages
  • Cache build outputs - Not source files
Don'ts
  • Don't cache dev servers - Use persistent: true
  • Don't include secrets in env - Use runtime env vars
  • Don't ignore dependsOn - Causes race conditions
  • Don't over-filter - May miss dependencies

© wshobson, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/developer-essentials/skills/turborepo-caching of wshobson/agents.

Open the folder on GitHubat commit 46891e7

Used in 9 other repositories

We found 19 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 9 other GitHub owners. This page covers the copy in wshobson/agents, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Turborepo Caching next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Turborepo Caching compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Turborepo Caching this skillwshobson/agents40k9 repos~2kAutomated safety check: NotesMIT
Scaffold Nextjsmblode/agent-skills144—~2.8kAutomated safety check: PassMIT
Linea Dependency MaintenanceConsensys-Incorporated/linea-attestation-registry1771 repos~3.7kAutomated safety check: WarnMIT
ReleaseWebMCP-org/npm-packages104—~1.6kAutomated safety check: NotesMIT
Nx Workspacetech-leads-club/agent-skills7k—~992Automated safety check: PassCustom licence
Authoring CI WorkflowsPostHog/posthog40k—~12kAutomated safety check: PassCustom licence

Similar skills

  • Scaffold Nextjs

    mblode/agent-skills

    Scaffolds a Next.js turborepo with Blode UI, icons, Ultracite (oxlint/shadcn), workspace hooks, and GitHub/Vercel setup.

    144 GitHub stars~2.8k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Linea Dependency Maintenance

    Consensys-Incorporated/linea-attestation-registry

    Safely plan and execute dependency maintenance for JavaScript/TypeScript (npm, pnpm) and GitHub Actions, including npm lockfiles, pnpm workspaces, catalogs, overrides, SHA-pinned action versions…

    177 GitHub starsUsed in 1 repo~3.7k tokens
    DevelopmentAuto-check: warnings
  • Release

    WebMCP-org/npm-packages

    Release the @mcp-b monorepo with Changesets and pnpm, using npm trusted publishing in GitHub Actions.

    104 GitHub stars~1.6k tokensUpdated yesterday
    DevelopmentAuto-check: notes
  • Nx Workspace

    tech-leads-club/agent-skills

    Configure, explore, and optimize Nx monorepo workspaces. An agent skill from tech-leads-club/agent-skills.

    7k GitHub stars~992 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Authoring CI Workflows

    PostHog/posthog

    Official

    A skill your agent uses when adding or editing a GitHub Actions workflow, composite action, or reusable workflow under .github/ — new CI jobs, triggers, matrices, checkout/clone tuning, action…

    40k GitHub stars~12k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Monorepo Management

    gluestack/gluestack-ui

    Master monorepo management with Turborepo, Nx, and pnpm workspaces to build efficient, scalable multi-package repositories with optimized builds and dependency management.

    5.3k GitHub starsUsed in 12 repos~3.2k tokens
    DevelopmentAuto-check: warnings

More from wshobson/agents

All 142 skills in this repo
  • Cuts cloud spend across AWS, Azure, GCP and OCI with cost tagging, rightsizing, commitment and spot pricing models, and architecture changes.

    40k GitHub starsUsed in 14 repos~1.7k tokens
    Auto-check passed
  • Billing Automation

    wshobson/agents

    Covers building subscription billing: billing cycles, subscription states, invoice generation, proration, tax handling and dunning for failed payments.

    40k GitHub starsUsed in 13 repos~473 tokens
    Auto-check passed
  • Profiles slow Python code with cProfile and memory profilers, then applies targeted fixes for CPU, memory, I/O and query bottlenecks.

    40k GitHub starsUsed in 13 repos~814 tokens
    Auto-check passed
  • Writes unit tests for shell scripts with Bats: error-condition tests, fixtures and mocks, cross-shell checks, parallel runs, helper files and CI integration.

    40k GitHub starsUsed in 12 repos~1.3k tokens
    Auto-check passed
  • Distributed Tracing

    wshobson/agents

    Implement distributed tracing with Jaeger and Tempo to track requests across microservices and identify performance bottlenecks.

    40k GitHub starsUsed in 12 repos~527 tokens
    Auto-check passed
  • Reference for designing and tuning production LLM prompts: few-shot examples, chain-of-thought, structured outputs, templates and system prompts.

    40k GitHub stars~1.3k tokensUpdated 6 days ago
    Auto-check passed

Works with

Questions about Turborepo Caching

What does Turborepo Caching do?

Configures Turborepo pipelines and local or remote caching for monorepo builds, including Vercel remote cache, a self-hosted cache and cache-miss debugging. A set of Turborepo concepts and templates.json.

When should I use Turborepo Caching?

Turborepo Caching fits situations like: setting up Turborepo in a new monorepo; debugging cache misses in turbo builds; adding remote caching, either Vercel-hosted or self-hosted; shortening CI build times for a monorepo.

How do I install Turborepo Caching in Claude Code?

Run `npx skills add wshobson/agents --skill turborepo-caching -a claude-code`. Or copy the skill folder (plugins/developer-essentials/skills/turborepo-caching in wshobson/agents) into .claude/skills/turborepo-caching in your project. Claude Code loads it when a task matches its description.

How do I install Turborepo Caching in Codex?

Run `npx skills add wshobson/agents --skill turborepo-caching -a codex`. Or copy the skill folder (plugins/developer-essentials/skills/turborepo-caching in wshobson/agents) into .agents/skills/turborepo-caching in your project. Codex loads it when a task matches its description.

Can I use Turborepo Caching in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add wshobson/agents --skill turborepo-caching -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/turborepo-caching, .gemini/skills/turborepo-caching, .github/skills/turborepo-caching and .opencode/skills/turborepo-caching in your project.

What does Turborepo Caching need to run?

Going by SKILL.md and its folder, Turborepo Caching needs the command-line tools its instructions call (turbo and npx) and credentials named TURBO_TOKEN. Our summary lists: A monorepo managed with Turborepo; A Vercel account for the Vercel remote cache option.

Does Turborepo Caching access the network?

SKILL.md names 1 domain. In commands or code: turbo.build; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Turborepo Caching safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Turborepo Caching use?

Turborepo Caching is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Turborepo Caching use?

About 2k tokens (SKILL.md is roughly 8.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Turborepo Caching?

Skills that share tags, products or a category with Turborepo Caching: Scaffold Nextjs (mblode/agent-skills, 144 stars), Linea Dependency Maintenance (Consensys-Incorporated/linea-attestation-registry, 177 stars), Release (WebMCP-org/npm-packages, 104 stars) and Nx Workspace (tech-leads-club/agent-skills, 7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Turborepo Caching?

wshobson (a GitHub user) maintains it in wshobson/agents, which has 40,314 GitHub stars. The repository holds 142 skills in this directory. The repository was last updated on October 5, 2026.

Source: wshobson/agents on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.