Skip to content
Back to skills

Turborepo Monorepo

ASecurity

Turborepo task pipelines, caching and package filtering. Use when editing turbo.json, running tasks for changed or filtered packages, or debugging cache misses and remote caching.

  • 80 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 3, 2026
ai-agentsbashdebugging

Security analysis

A100/100

Scanned October 5, 2026

npx -y skills add monkilabs/opencastle --skill turborepo-monorepo --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Turborepo Monorepo?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Turborepo Monorepo
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/monkilabs-turborepo-monorepo/badge)](https://www.skillsdirectory.com/skills/monkilabs-turborepo-monorepo)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: turborepo-monorepo
description: "Turborepo task pipelines, caching and package filtering. Use when editing turbo.json, running tasks for changed or filtered packages, or debugging cache misses and remote caching."
---

# Turborepo Monorepo

## Commands

```bash
turbo run build                       # Build all packages
turbo run build --filter=web          # One package
turbo run build --filter=./apps/*     # All apps
turbo run build test lint --affected  # Only packages changed vs the default branch (CI)
turbo run build --dry-run             # Preview what would run
turbo run build --graph               # Visualize task graph
turbo run build --force               # Ignore cache, rebuild all
```

Run tasks through `turbo run` (or a root script that wraps it). `cd apps/web && npm test` skips caching and dependency order.

## Pipeline Configuration (turbo.json)

```json
{
  "$schema": "https://turbo.build/schema.json",
  "tasks": {
    "build": {
      "dependsOn": ["^build"],
      "outputs": ["dist/**", ".next/**"]
    },
    "test": {
      "dependsOn": ["build"],
      "inputs": ["src/**", "test/**"]
    },
    "lint": {
      "dependsOn": ["^build"]
    },
    "dev": {
      "cache": false,
      "persistent": true
    }
  }
}
```

- `^build` — run `build` in dependencies first (topological)
- `outputs` — files to cache; leave them out and a cache hit restores no files
- `inputs` — files hashed for the cache key (default: all tracked files in the package)
- `cache: false` + `persistent: true` — long-running tasks (dev servers)

## Caching

The local cache lives in `.turbo/cache` (Turborepo 2.0+). Keys hash task inputs, declared env vars, dependencies' outputs and `turbo.json`. An env var the build reads but `env` does not declare causes stale hits; one that changes every run causes constant misses.

Remote cache: `turbo login` and `turbo link` locally; in CI set `TURBO_TOKEN` and `TURBO_TEAM` and a plain `turbo run` reads and writes it. Persistent misses → check `inputs`/`outputs`/`env` in `turbo.json`, then compare runs with `--dry-run=json`.

Never commit `.turbo/`.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.