Skip to main content
skill CX Codex

turborepo · oakoss — Claude Code skill: setup and installation

This Claude Code skill helps configure Turborepo in JavaScript and TypeScript monorepos. Use it to set up task pipelines, caching, package filters, and CI workflows.

MIT 108 installs ★ 29 updated 2026-08-17

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add oakoss/agent-skills --skill turborepo -a claude-code
Open on GitHub

What turborepo does

The skill helps configure task execution and builds in JavaScript or TypeScript monorepos. It covers task dependencies with dependsOn, caching, environment variables, and package filters. Configuration lives in turbo.json or turbo.jsonc.

Set package-specific options, scaffold packages and components with turbo generate, or inspect dependency graphs with turbo query. The turbo boundaries command checks package boundaries. This skill targets monorepos with build steps; it does not cover single-package projects or monorepos using other languages.

What it helps with

  • define task order with dependsOn
  • debug cache misses and inspect hash inputs
  • run tasks for changed packages and their dependents
  • configure environment variables that affect caching
  • scaffold a package or component

Example prompts for the agent

  • Set up turbo.json so dependency packages build before the main task.
  • Find out why Turborepo keeps missing the cache.
  • Run tasks for changed packages and their dependents.

How to install turborepo

1Skills CLI (Vercel)

npx skills add oakoss/agent-skills --skill turborepo -a claude-code

2Manually: put the files in place

~/.claude/skills/turborepo/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/turborepo/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about turborepo

How do I install turborepo in Claude Code?

Run npx skills add oakoss/agent-skills --skill turborepo -a claude-code. The skill file is at ~/.claude/skills/turborepo/SKILL.md.

What does turborepo do?

It helps configure Turborepo in JavaScript and TypeScript monorepos, including task dependencies, caching, package filters, and workspace settings.

Which projects is turborepo for?

It covers JavaScript or TypeScript monorepos with build steps. Single-package projects and monorepos using other languages fall outside its scope.

Source text

SKILL.md · MIT
---
name: turborepo
description: |
  Turborepo monorepo build system and orchestration. Covers task pipelines, dependsOn syntax, caching configuration, remote cache, filtering, CI optimization, environment variables, workspace management, watch mode, package boundaries, and code generation.

  Use when configuring tasks, creating packages, setting up monorepo, sharing code between apps, running changed packages, debugging cache, optimizing CI, resolving workspace dependencies, enforcing package boundaries, or generating code.
license: MIT
metadata:
  author: oakoss
  version: '1.2'
user-invocable: false
---

# Turborepo

## Overview

Build system for JavaScript/TypeScript monorepos. Caches task outputs and runs tasks in parallel based on dependency graph. Always create package tasks (not root tasks), use `turbo run` in scripts, and let `dependsOn` manage execution order. Configuration uses `turbo.json` (or `turbo.jsonc` for comments).

**When to use:** Monorepo task orchestration, build caching, CI optimization, workspace dependency management, package boundary enforcement.

**When NOT to use:** Single-package projects, non-JavaScript monorepos, projects without build steps.

## Quick Reference

| Pattern                 | Syntax                                           | Key Points                                      |
| ----------------------- | ------------------------------------------------ | ----------------------------------------------- |
| Schema                  | `"$schema": "https://turborepo.dev/schema.json"` | Always include in turbo.json                    |
| Dependency build        | `"dependsOn": ["^build"]`                        | Build dependencies first                        |
| Same-package task       | `"dependsOn": ["codegen"]`                       | Run in same package first                       |
| Specific package        | `"dependsOn": ["pkg#task"]`                      | Named package's task                            |
| Parallel lint/typecheck | Transit Nodes pattern                            | Cache invalidation without sequential execution |
| Dev server              | `"persistent": true, "cache": false`             | Long-running, non-cacheable                     |
| Sidecar tasks           | `"with": ["api#dev"]`                            | Run tasks concurrently alongside                |
| Watch mode              | `turbo watch dev`                                | Re-run on file changes                          |
| Filter by package       | `--filter=web`                                   | Single package                                  |
| Filter with deps        | `--filter=web...`                                | Package + dependencies                          |
| Changed packages        | `--affected`                                     | Changed + dependents                            |
| Debug cache             | `--summarize` or `--dry`                         | See hash inputs                                 |
| Package config          | `turbo.json` with `"extends": ["//"]`            | Per-package overrides                           |
| Composable config       | `"extends": ["@repo/config"]`                    | Extend from any workspace package               |
| Extend arrays           | `"$TURBO_EXTENDS$"` in arrays                    | Append to inherited config instead of replacing |
| Env vars in hash        | `"env": ["API_URL"]`                             | Cache invalidation on change                    |
| Boundaries              | `turbo boundaries`                               | Enforce package isolation and import rules      |
| Query graph             | `turbo query`                                    | GraphQL interface to package/task graphs        |
| Code generation         | `turbo generate`                                 | Scaffold new packages and components            |
| List packages           | `turbo ls`                                       | List all packages in monorepo                   |
| Devtools                | `turbo devtools`                                 | Visual Package Graph and Task Graph explorer    |
| Docker pruned workspace | `turbo prune <pkg> --docker`                     | Minimal monorepo slice for container builds     |

## Decision Trees

### Configure a Task

```text
Configure a task?
+-- Define task dependencies       -> dependsOn in turbo.json
+-- Lint/check-types (parallel)    -> Transit Nodes pattern
+-- Specify build outputs          -> outputs key
+-- Handle environment variables   -> env key or globalEnv
+-- Dev/watch tasks                -> persistent: true, cache: false
+-- Sidecar tasks (run alongside)  -> with key
+-- Package-specific config        -> Package turbo.json with extends: ["//"]
+-- Composable config              -> extends from any workspace package
+-- Global settings                -> globalEnv, globalDependencies, cacheDir
```

### Cache Problems

```text
Cache problems?
+-- Outputs not restored           -> Missing outputs key
+-- Unexpected cache misses        -> Use --summarize or --dry to debug
+-- Skip cache entirely            -> --force or cache: false
+-- Remote cache not working       -> Check turbo login/link
+-- Environment causing misses     -> Var not in env key
```

### Filter Packages

```text
Filter packages?
+-- By package name                -> --filter=web
+-- By directory                   -> --filter=./apps/*
+-- Package + dependencies         -> --filter=web...
+-- Package + dependents           -> --filter=...web
+-- Changed + dependents           -> --affected
```

### Explore Repository

```text
Explore repository?
+-- List all packages              -> turbo ls
+-- Query dependency graph         -> turbo query
+-- Visualize graphs               -> turbo devtools
+-- Check boundary violations      -> turbo boundaries
+-- Generate new package           -> turbo generate workspace
+-- Run custom generator           -> turbo generate run [name]
```

## Common Mistakes

| Mistake                                                                   | Correct Pattern                                                                                          |
| ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| Putting build logic in root `package.json` scripts instead of per-package | Define scripts in each package and use `turbo run` in root to delegate                                   |
| Using `^build` without declaring `workspace:*` dependency                 | Add the dependency in `package.json` first; `^build` only triggers for declared dependencies             |
| Chaining turbo tasks with `&&` in package scripts                         | Use `dependsOn` in `turbo.json` to declare task ordering                                                 |
| Not adding environment variables to the `env` key in turbo.json           | Declare all build-affecting env vars in `env` so cache hashes correctly                                  |
| Using `--parallel` flag to bypass dependency ordering                     | Configure `dependsOn` correctly or use transit nodes for parallel tasks with proper cache invalidation   |
| Using outdated schema URL                                                 | Use `https://turborepo.dev/schema.json` in `$schema` field                                               |
| Overriding inherited arrays in package configs                            | Use `$TURBO_EXTENDS$` in arrays to append instead of replace                                             |
| Defining tasks in root `turbo.json` that belong to a specific package     | Define tasks inside the package's own `turbo.json` with `extends: ["//"]`                                |
| Using `turbo <task>` shorthand in scripts or CI                           | Use `turbo run <task>` in `package.json` scripts and CI pipelines; shorthand is for interactive use only |

## Delegation

- **Monorepo structure exploration**: Use `Explore` agent to discover packages, workspace layout, and dependency relationships
- **Pipeline configuration and optimization**: Use `Task` agent to set up turbo.json tasks, configure caching, and debug cache misses
- **Monorepo architecture planning**: Use `Plan` agent to design package boundaries, shared libraries, and CI optimization strategy

> If the `pnpm-workspace` skill is available, delegate workspace setup, dependency linking, catalogs, and `pnpm deploy` to it.
> If the `changesets` skill is available, delegate versioning, changelog generation, and npm publishing to it.

## References

- [Task configuration and dependsOn patterns](references/task-configuration.md)
- [Caching, outputs, and debugging cache issues](references/caching.md)
- [Filtering, affected packages, and CI patterns](references/filtering-and-ci.md)
- [Workspace structure and package management](references/workspace-structure.md)
- [Environment variables and modes](references/environment-variables.md)
- [Watch mode, dev tasks, and anti-patterns](references/dev-and-anti-patterns.md)
- [Boundaries, query, and code generation](references/boundaries-and-tooling.md)

© oakoss · MIT · oakoss/agent-skills

Similar skills

SKILL.md skills catalog →

turborepo by other authors comes first.

turborepo vercel Configures Turborepo monorepos and troubleshoots task pipelines. Useful when editing turbo.json, setting up caching, or fixing CI builds. CX Codex +1 90,700installs turborepo Mindrally Tells the agent how to configure Turborepo: workspace layout, turbo.json, caching and task filters. Useful once the monorepo already exists. CX Codex +1 704installs turborepo secondsky Guides coding agents through Turborepo monorepo setup, task pipeline architecture, caching rules, and CI flags. CX Codex +1 420installs turborepo-caching Seth Hobson The turborepo-caching skill configures Turborepo for local and remote build caching. Use it when setting up a monorepo, tuning CI/CD, or investigating cache misses. CX Codex +1 10,600installs turborepo-monorepo giuseppe-trisciuoglio turborepo-monorepo — a skill that walks your agent through Turborepo: workspaces, turbo.json tasks, test pipelines and build caching. CX Codex +1 4,300installs find-skills vercel-labs find-skills is a Claude Code skill that locates agent skills for a task and helps assess the results. It activates when someone asks for a capability that may already be installable. CX Codex +1 4,400,000installs frontend-design official anthropics The frontend-design skill guides intentional visual design for new interfaces and redesigns. Use it when a generic generated UI is not enough. CX Codex +1 1,025,790installs agent-browser vercel-labs This Claude Code skill automates browser interaction for tasks like navigating sites, filling forms, and testing web apps. It also supports exploratory QA and Electron app automation. CX Codex +1 1,600,000installs design-taste-frontend Leonxlnx The design-taste-frontend Claude Code skill sets design rules and checks for websites. It activates for new pages, redesigns, and requests to fix a generic-looking site. CX Codex +1 802,600installs grill-me Matt Pocock grill-me interviews you about a plan or design to expose gaps and sharpen decisions. Use it before implementation starts. CX Codex +1 1,424,476installs grill-with-docs Matt Pocock The grill-with-docs skill interviews you about a plan or design and creates ADRs and a glossary along the way. Use it when decisions need sharper definition. CX Codex +1 1,219,756installs

From the same set106

The whole set →
db-enforcer db-enforcer is a Claude Code skill that checks PostgreSQL integrity and alignment with Prisma. It activates for schema design, migration work, and RLS policy setup. CX Codex +1 109installs electricsql Briefs your coding agent on ElectricSQL: streaming slices of Postgres to the client through Shapes, plus the proxy and write patterns around it. CX Codex +1 109installs trpc trpc is a Claude Code skill for building type-safe TypeScript APIs with tRPC v11. It comes into play when working on routers, procedures, React clients, or tests. CX Codex +1 109installs tauri This Claude Code skill covers Tauri v2 apps with web frontends and Rust backends. It activates for project setup, IPC, permissions, or app releases. CX Codex +1 108installs realtime-sync realtime-sync guides agents through designing low-latency sync using WebTransport, CRDT conflict resolution, and batched AI token streaming. CX Codex +1 108installs plan-first-development The plan-first-development Claude Code skill structures project planning and tracks progress across sessions. It activates for new projects, major features, and work split into phases. CX Codex +1 107installs tracer-bullets The tracer-bullets Claude Code skill splits multi-layer work into end-to-end slices. Each slice is checked before work moves on. CX Codex +1 107installs expert-instruction The expert-instruction Claude Code skill helps design system instructions for AI agents. It covers agent roles, behavioral limits, response formats, and tool-use guidance. CX Codex +1 106installs

Project sponsors

Companies that keep this analytics open