turborepo
Turborepo monorepo build-system guidance — turbo.json task pipelines, caching, the turbo CLI, --filter/--affected, CI, env vars, and packages
- License 许可
- MIT
- 所属仓库
- HigorAlves/orc
- 最近更新
- 2026-11-07
- Stars
- ★ 7
- Forks
- 0
01 前言 Front Matter
- name
- turborepo
- metadata
- { "version": "2.9.7-canary.14" }
- description
- Turborepo monorepo build-system guidance — turbo.json task pipelines, caching, the turbo CLI, --filter/--affected, CI, env vars, and packages
- when_to_use
- Use when configuring tasks, sharing code between apps, or debugging the cache.
02 资源文件 33
- 参考文档command/turborepo.md2.5 KB
- 参考文档references/best-practices/dependencies.md4.2 KB
- 参考文档references/best-practices/packages.md6.1 KB
- 参考文档references/best-practices/RULE.md4.8 KB
- 参考文档references/best-practices/structure.md5.4 KB
- 参考文档references/boundaries.md923 B
- 参考文档references/boundaries/RULE.md1.9 KB
- 参考文档references/caching.md2.8 KB
- 参考文档references/caching/gotchas.md3.8 KB
- 参考文档references/caching/remote-cache.md2.5 KB
- 参考文档references/caching/RULE.md4.1 KB
- 参考文档references/ci.md1.6 KB
- 参考文档references/ci/github-actions.md2.7 KB
- 参考文档references/ci/patterns.md2.5 KB
- 参考文档references/ci/RULE.md2.1 KB
- 参考文档references/ci/vercel.md2.1 KB
- 参考文档references/cli/commands.md5.4 KB
- 参考文档references/cli/RULE.md2.1 KB
- 参考文档references/configuration/global-options.md7.0 KB
- 参考文档references/configuration/gotchas.md9.0 KB
- 参考文档references/configuration/RULE.md4.9 KB
- 参考文档references/configuration/tasks.md6.8 KB
- 参考文档references/env-vars.md2.7 KB
- 参考文档references/environment/gotchas.md4.0 KB
- 参考文档references/environment/modes.md2.4 KB
- 参考文档references/environment/RULE.md2.5 KB
- 参考文档references/filtering.md1.3 KB
- 参考文档references/filtering/patterns.md2.4 KB
- 参考文档references/filtering/RULE.md4.1 KB
- 参考文档references/packages.md2.6 KB
- 参考文档references/remote-cache.md938 B
- 参考文档references/tasks-pipeline.md13.5 KB
- 参考文档references/watch/RULE.md1.9 KB
03 SKILL.md 正文
Turborepo Skill
Build system for JavaScript/TypeScript monorepos. Turborepo caches task outputs and runs tasks in parallel based on the dependency graph.
This SKILL.md is an index. When you need the detail for a topic, Read the matching references/<topic>.md file — don't work from memory.
When to use
Use when the user: configures tasks/workflows/pipelines, creates packages, sets up a monorepo, shares code between apps, runs changed/affected packages, debugs the cache, sets up CI, enforces package boundaries, or is working in a repo with apps//packages/ directories or a turbo.json.
Two rules that always apply
- Package tasks, not Root Tasks. Put task logic (scripts) in each package's
package.json, register the task in rootturbo.json, and let rootpackage.jsononly delegate viaturbo run <task>. Root Tasks (//#taskname) are a rare exception. See references/tasks-pipeline.md. turbo run, notturbo, in code. Always writeturbo run <task>in package.json scripts and CI. The bareturbo <task>shorthand is only for one-off interactive terminal use. See references/tasks-pipeline.md.
Decision tree → which reference to read
What are you doing?
├─ Configuring a task / pipeline (dependsOn, outputs, transit nodes, dev/watch) → tasks-pipeline.md
├─ Cache not working / wrong cache hits / debugging hashes → caching.md
├─ Sharing cache across machines / CI → remote-cache.md
├─ Running only changed packages / --filter / --affected → filtering.md
├─ Setting up CI (GitHub Actions, Vercel, turbo-ignore) → ci.md
├─ Env vars not available / wrong cache from env / .env files → env-vars.md
├─ Creating a package / structuring the monorepo / dependencies → packages.md
└─ Enforcing import/architectural boundaries → boundaries.md
Topic index
| Topic | Read this | Covers |
|---|---|---|
| Tasks & pipeline | references/tasks-pipeline.md | Package-vs-Root tasks, turbo run rule, dependsOn/^build, outputs, transit nodes, dev/watch patterns, task anti-patterns |
| Caching | references/caching.md | Hash inputs, missing outputs, env/.env hashing, globalDependencies, debugging misses |
| Remote cache | references/remote-cache.md | Vercel Remote Cache, self-hosted, turbo login/link |
| Filtering & affected | references/filtering.md | --affected, --filter by name/dir/..., change-set runs |
| CI / CD | references/ci.md | GitHub Actions, Vercel, turbo-ignore, --affected in CI, passthrough env |
| Env vars | references/env-vars.md | env/globalEnv/passThroughEnv, strict vs loose, root .env anti-pattern |
| Packages & structure | references/packages.md | Internal packages, apps//packages/ layout, deps, JIT vs compiled |
| Boundaries | references/boundaries.md | turbo boundaries, tags, tag-based import rules |
Deeper reference subtrees
The topic files above link into the detailed references/ subtrees when you need full mechanics:
- Configuration — configuration/RULE.md (turbo.json overview, Package Configurations), configuration/tasks.md (dependsOn, outputs, inputs, env, cache, persistent), configuration/global-options.md (globalEnv, globalDependencies,
globalkey, futureFlags, cacheDir, envMode), configuration/gotchas.md. - Caching — caching/RULE.md, caching/remote-cache.md, caching/gotchas.md (
--summarize,--dry). - Environment — environment/RULE.md, environment/modes.md, environment/gotchas.md.
- Filtering — filtering/RULE.md, filtering/patterns.md.
- CI/CD — ci/RULE.md, ci/github-actions.md, ci/vercel.md, ci/patterns.md.
- CLI — cli/RULE.md, cli/commands.md (
turbo runflags,turbo-ignore, other commands). - Best practices — best-practices/RULE.md, best-practices/structure.md, best-practices/packages.md, best-practices/dependencies.md.
- Watch mode — watch/RULE.md (
turbo watch, interruptible tasks, dev workflows). - Boundaries — boundaries/RULE.md.
Source Documentation
This skill is based on the official Turborepo documentation:
- Source:
apps/docs/content/docs/in the Turborepo repository - Live: https://turborepo.dev/docs
04 同仓库更多 Skills
writing-plans
Write a comprehensive implementation plan of bite-sized TDD tasks that an engineer with zero codebase context could execute — exact files, code, tests, and verification steps
writing-for-agents
orc's doctrine layer for writing any document an agent consumes — skills, AGENTS.md/CLAUDE.md, reference docs
workspace-mode
Use when cwd is a parent dir holding multiple sibling git repos — defines repo auto-detection, --repos/--repo/--all-repos/--this-repo precedence, per-repo dispatch, and linked-PR mechanics.
wizard
Generate an interactive bash wizard walking a human through work only they can perform — credentials, secrets, one-off migrations
wait-what
Stop and re-pitch — the last message did not land; say it again simply, in the project's own vocabulary.
vitest
Vitest fast unit testing framework powered by Vite with Jest-compatible API