Turborepo (turbo) is a high-performance build system and task orchestrator for monorepos. It provides task pipelines, remote/local caching, and parallel execution to speed builds and tests across workspaces.
When to use Turborepo
- Use
turboin monorepos to coordinate tasks across packages (build, test, lint, sync). - Use it to speed CI by leveraging cache layers and selective task execution.
- Use
turbowhen you need consistent task orchestration across packages and reproducible pipelines.
What turbo provides
- Task orchestration via
turbo run <task>with fine-grained filters - Local and remote caching for build and test artifacts
- Parallel execution and pipeline graph visualization
Integration with this repository
- This repository uses Turborepo to run package-level scripts from the root
package.json. Common commands include:
# run build across packages
bun run build
# validate all skills (hr-skills-build validates SKILL.md files)
bun run validate
# sync metadata after adding/removing a skill
bun run sync
# regenerate skills catalog
bun run catalog
# package distributable skill zips
bun run zip
- Package-level scripts in
packages/hr-skills-build/package.jsonmap tobuncommands that turbo orchestrates (for examplevalidate,sync,catalog).
CI recommendations
- Cache
~/.bunandnode_moduleswhere appropriate, plusturbocache directories to speed repeated runs. - Run
bun install --frozen-lockfilethenbun run typecheckandbun run validateearly in CI to fail fast on critical errors. - Upload and restore
turbocache between CI runs when using remote caching.
Examples
Run a filtered task for the build package only:
turbo run build --filter=packages/hr-skills-build
Run validate across the workspace (root package.json delegates to turbo):
bun run validate
Tips
- Keep task definitions small and composable so
turbocan optimize execution. - Ensure tasks that produce cacheable outputs declare explicit outputs so caching is effective.
- Use
--filterto constrain runs during development to specific packages.