turborepo

Configure turbo.json task pipelines, caching, and filters for monorepos.

38|3|Updated Mar 22, 2024
One-click install
npx skills add https://github.com/anthonyshew/dotfiles --skill turborepo-anthonyshew
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: turborepo
Source: https://github.com/anthonyshew/dotfiles/tree/main/opencode/.config/opencode/skills/turborepo
Command: npx skills add https://github.com/anthonyshew/dotfiles --skill turborepo-anthonyshew

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

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 a monorepo, shares code between apps, runs changed/affected packages, debugs cache, or has apps/packages directories.

Core Features & Use Cases

  • Per-package task orchestration with caching and parallel execution across packages
  • Package Configurations and root-package coordination for scalable builds
  • CI optimization with --affected, filters, and deterministic task graphs
  • Clear guidance on best practices for monorepos and boundary enforcement

Quick Start

  • Add turbo.json at the repo root and per-package turbo.json overrides as needed
  • Define per-package scripts (e.g., apps/web/package.json) and a root turbo.json
  • Run turbo run build --affected to validate changes across the monorepo

Frequently Asked Questions about turborepo

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure task pipelines and caching in a monorepo?▼

Task pipelines and caching in a monorepo are configured by defining per-package scripts and a root turbo.json. You enforce task definitions, proper caching, and environment handling to orchestrate builds across multiple packages.

How do I run only changed or affected packages in a monorepo build?▼

You run changed or affected packages in a monorepo build by using the --affected and --filter flags with the turbo CLI. This creates a deterministic task graph to optimize CI by skipping unaffected packages.

What is the best way to share code between apps in a multi-package monorepo?▼

The best way to share code between apps in a multi-package monorepo is structuring directories with apps and packages folders. You configure internal packages and enforce boundaries to coordinate root-package configurations for scalable builds.

Why is my Turborepo cache not working during CI optimization?▼

Turborepo cache issues during CI optimization often stem from improper environment variable handling or incorrect per-package task definitions in turbo.json. Debugging requires verifying your caching configuration and environment variable inputs.

Can I use turbo.json overrides for individual packages in a monorepo?▼

Yes, you can use turbo.json overrides for individual packages in a monorepo. You add a root turbo.json and define per-package turbo.json overrides as needed to enforce specific task definitions and package configurations.

When do I need turbo.json for monorepo task orchestration?▼

You need turbo.json for monorepo task orchestration when setting up multi-package apps that require parallel execution, caching, and filtering. It automates task workflows and coordinates root-package configurations for scalable builds.