turborepo

Turborepo monorepo build system guidance. Triggers on: turbo.json, task pipelines, dependsOn, caching, remote cache, the "turbo" CLI, --filter, --affected, CI optimization, environment variables, internal packages, monorepo structure/best practices, and boundaries. Use when user: configures tasks/workflows/pipelines, creates packages, sets up monorepo, shares code between apps, runs changed/affected packages, debugs cache, or has apps/packages directories.

Install
npx skills add 'https://github.com/vercel/turborepo/tree/main/skills/turborepo'
Download bundle ↓
main · 064d74aScanned 2026-09-15

Contributors

GitHub-linked commit authors for this SKILL.md at the saved revision. Co-authors and history before file renames are not included.

File history ↗
View on GitHub
← Back to SKILL.md

description: Load Turborepo skill for creating workflows, tasks, and pipelines in monorepos. Use when users ask to "create a workflow", "make a task", "generate a pipeline", or set up build orchestration.

Load the Turborepo skill and help with monorepo task orchestration: creating workflows, configuring tasks, setting up pipelines, and optimizing builds.

Workflow

Step 1: Load turborepo skill

skill({ name: 'turborepo' })

Step 2: Identify task type from user request

Analyze $ARGUMENTS to determine:

  • Topic: configuration, caching, filtering, environment, CI, or CLI
  • Task type: new setup, debugging, optimization, or implementation

Use decision trees in SKILL.md to select the relevant reference files.

Step 3: Read relevant reference files

Based on task type, read from references/<topic>/:

TaskFiles to Read
Configure turbo.jsonconfiguration/RULE.md + configuration/tasks.md
Debug cache issuescaching/gotchas.md
Set up remote cachecaching/remote-cache.md
Filter packagesfiltering/RULE.md + filtering/patterns.md
Environment problemsenvironment/gotchas.md + environment/modes.md
Set up CIci/RULE.md + ci/github-actions.md or ci/vercel.md
CLI usagecli/commands.md

Step 4: Execute task

Apply Turborepo-specific patterns from references to complete the user's request.

CRITICAL - When creating tasks/scripts/pipelines:

  1. Prefer package tasks over Root Tasks. Root Tasks (//#taskname) are only for tasks that truly cannot exist in packages, such as Vitest Projects' //#test, repo-wide release scripts, or tooling that does not invoke turbo itself.
  2. Add scripts to each relevant package's package.json (e.g., apps/web/package.json, packages/ui/package.json)
  3. Register the task in root turbo.json
  4. Root package.json only contains turbo run <task> - never actual task logic, unless defining a valid Root Task exception

Other things to verify:

  • outputs defined for cacheable tasks
  • dependsOn uses correct syntax (^task vs task)
  • Environment variables in env key
  • .env files in inputs if used
  • Use turbo run (not turbo) in package.json and CI

Step 5: Summarize

=== Turborepo Task Complete ===

Topic: <configuration|caching|filtering|environment|ci|cli>
Files referenced: <reference files consulted>

<brief summary of what was done>