Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Configure and optimize Turborepo monorepo build pipelines with correct task structure, caching, and CI setup.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
command/turborepo.md
1---2description: 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.3---45Load the Turborepo skill and help with monorepo task orchestration: creating workflows, configuring tasks, setting up pipelines, and optimizing builds.67## Workflow89### Step 1: Load turborepo skill1011```12skill({ name: 'turborepo' })13```1415### Step 2: Identify task type from user request1617Analyze $ARGUMENTS to determine:1819- **Topic**: configuration, caching, filtering, environment, CI, or CLI20- **Task type**: new setup, debugging, optimization, or implementation2122Use decision trees in SKILL.md to select the relevant reference files.2324### Step 3: Read relevant reference files2526Based on task type, read from `references/<topic>/`:2728| Task | Files to Read |29| -------------------- | ------------------------------------------------------- |30| Configure turbo.json | `configuration/RULE.md` + `configuration/tasks.md` |31| Debug cache issues | `caching/gotchas.md` |32| Set up remote cache | `caching/remote-cache.md` |33| Filter packages | `filtering/RULE.md` + `filtering/patterns.md` |34| Environment problems | `environment/gotchas.md` + `environment/modes.md` |35| Set up CI | `ci/RULE.md` + `ci/github-actions.md` or `ci/vercel.md` |36| CLI usage | `cli/commands.md` |3738### Step 4: Execute task3940Apply Turborepo-specific patterns from references to complete the user's request.4142**CRITICAL - When creating tasks/scripts/pipelines:**43441. **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.452. Add scripts to each relevant package's `package.json` (e.g., `apps/web/package.json`, `packages/ui/package.json`)463. Register the task in root `turbo.json`474. Root `package.json` only contains `turbo run <task>` - never actual task logic, unless defining a valid Root Task exception4849**Other things to verify:**5051- `outputs` defined for cacheable tasks52- `dependsOn` uses correct syntax (`^task` vs `task`)53- Environment variables in `env` key54- `.env` files in `inputs` if used55- Use `turbo run` (not `turbo`) in package.json and CI5657### Step 5: Summarize5859```60=== Turborepo Task Complete ===6162Topic: <configuration|caching|filtering|environment|ci|cli>63Files referenced: <reference files consulted>6465<brief summary of what was done>66```6768<user-request>69$ARGUMENTS70</user-request>71