turborepo-workflow

Resolve Turborepo build orchestration and remote caching in monorepos.

2|1|Updated Jan 7, 2021
One-click install
npx skills add https://github.com/lsst-sqre/squareone --skill turborepo-workflow
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: turborepo-workflow
Source: https://github.com/lsst-sqre/squareone/tree/main/.claude/skills/turborepo-workflow
Command: npx skills add https://github.com/lsst-sqre/squareone --skill turborepo-workflow

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pnpm, turborepo, node, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Managing builds, caching, and task execution in a large monorepo can be slow and complex, especially with remote caching and authentication. This skill provides expert guidance on the Turborepo workflow, ensuring fast, efficient, and correctly authenticated builds.

Core Features & Use Cases

  • Optimized Build Workflow: Enforces the critical pattern of using root-level pnpm scripts for all Turborepo commands to leverage remote caching and authentication.
  • Remote Cache Management: Explains the custom turbo-wrapper.js authentication system (1Password, .env, CI/CD env vars) and how to troubleshoot caching issues.
  • Efficient Task Execution: Guides on using Turborepo's filter syntax to target specific packages for faster builds, tests, and development cycles.
  • Use Case: When a CI build is running slowly, use this skill to verify that remote caching is enabled and correctly authenticated, and to apply filters to only build necessary packages.

Quick Start

Build only the @lsst-sqre/squared package, leveraging Turborepo's remote cache. pnpm build --filter @lsst-sqre/squared

Frequently Asked Questions about turborepo-workflow

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

FAQPage Schema
How do I speed up monorepo builds with remote caching?

Remote caching in Turborepo stores build artifacts so subsequent builds skip redundant work. Enable it by running root-level pnpm scripts through the turbo-wrapper.js authentication system, which supports environment variables, 1Password, or .env files to authenticate cache access.

Why should I use pnpm scripts instead of running turbo directly?

Root-level pnpm scripts enforce the critical pattern for leveraging Turborepo's remote caching and authentication. Running turbo commands directly bypasses the turbo-wrapper.js flow, breaking cache authentication and slowing builds in CI/CD and local development.

How do I run builds on specific packages in a monorepo?

Turborepo's filter syntax targets specific packages for faster execution. Use `pnpm build --filter @package-name` to build only that package and its dependencies, reducing build time when you need changes to a subset of your monorepo.

Can I use Turborepo with pnpm workspaces?

Yes. Turborepo works with pnpm monorepos using root-level pnpm scripts to orchestrate build, test, lint, type-check, dev, and Storybook workflows across all workspace packages with shared remote cache configuration.

What authentication methods does Turborepo remote caching support?

The turbo-wrapper.js system supports multiple authentication methods: environment variables set in CI/CD, 1Password integration for credential lookup, and .env files for local development, enabling seamless cache access across environments.

What should I check if remote caching isn't working?

Verify that pnpm scripts invoke turbo through turbo-wrapper.js with correct authentication configured—environment variables in CI, 1Password vault access, or .env present locally. Misconfigured auth is the most common cause of broken remote cache behavior.