# Turbo

> Repository guidance for using Turborepo to orchestrate workspace tasks, builds, validation, testing, and development workflows within the hr-skills monorepo.

- Skill: `tuanductran/turbo` (Agent Skill)
- Install (CLI): `npx skillmds@latest add tuanductran/turbo`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tuanductran/turbo/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tuanductran (https://skillmd.com/u/tuanductran)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tuanductran/turbo

---


# Turborepo

This skill explains how Turborepo is used throughout the **hr-skills** monorepo. It covers workspace orchestration, task execution, caching, package filtering, and development workflows.

Turborepo coordinates tasks across every workspace package while Bun provides the runtime and package management.

## Supported tasks

- Explain how Turborepo is used within this repository
- Run workspace tasks from the repository root
- Build workspace packages
- Validate HR skills and repository metadata
- Synchronize generated repository artifacts
- Generate the skill maturity matrix
- Run tests and TypeScript type checking
- Execute filtered workspace tasks
- Recommend efficient development workflows
- Explain Turborepo caching behavior
- Generate CI workflows using Turborepo

## Repository usage

This repository uses Turborepo to orchestrate workspace tasks.

Current pipeline tasks include:

- build
- dev
- test
- typecheck
- validate
- sync
- matrix

Repository scripts invoke Turborepo from the workspace root while package-level scripts provide the implementation.

## Workspace orchestration

Workspace packages define their own scripts.

Examples include:

- `packages/hr-skills-build`
- `packages/hr-skills-ref`

Turborepo automatically coordinates task execution, dependency ordering, and caching across these packages.

## Common commands

Run all workspace builds.

```bash
bun run build
```

Run development tasks.

```bash
bun run dev
```

Run repository validation.

```bash
bun run validate
```

Synchronize repository metadata.

```bash
bun run sync
```

Generate the skill maturity matrix.

```bash
bun run matrix
```

Generate the machine-readable skill registry.

```bash
bun run registry
```

Generate usage-informed relevance signals from evaluation golden fixtures.

```bash
bun run signals
```

Search the generated registry by text or domain.

```bash
bun run discover "<query>"
```

Get related-skill recommendations for a skill ID.

```bash
bun run recommend <skill-id>
```

Generate an execution plan for a user intent.

```bash
bun run plan "<intent>"
```

Generate a plan and run it through the workflow runtime.

```bash
bun run execute "<intent>"
```

Run the evaluation framework against `eval/datasets`.

```bash
bun run evaluate
```

Run every test suite.

```bash
bun run test
```

Run TypeScript type checking.

```bash
bun run typecheck
```

Execute a task directly with Turborepo.

```bash
turbo run build
```

Run a task for a single package.

```bash
turbo run build --filter=hr-skills-ref
```

Run validation for the build package only.

```bash
turbo run validate --filter=hr-skills-build
```

## Key prompts

### Repository workflows

- "Explain how Turborepo is used in this repository."
- "Describe the workspace task pipeline."
- "Explain how Bun and Turborepo work together."
- "List the repository tasks managed by Turborepo."

### Development

- "Run every workspace build."
- "Run validation for the repository."
- "Synchronize generated repository artifacts."
- "Run tests across every workspace package."

### Filtering

- "Run a task for a single workspace package."
- "Explain how `--filter` works."
- "Recommend the correct package filter."
- "Generate filtered Turborepo commands."

### CI

- "Generate a Turborepo CI workflow."
- "Recommend a validation pipeline."
- "Explain Turborepo caching."
- "Optimize workspace builds for CI."

## Pipeline overview

Current repository tasks include:

| Task | Purpose |
|------|---------|
| `build` | Build workspace packages |
| `dev` | Run development tasks |
| `test` | Execute package test suites |
| `typecheck` | Run TypeScript type checking |
| `validate` | Validate HR skills and repository metadata |
| `sync` | Synchronize generated repository artifacts |
| `matrix` | Generate `docs/engineering/skill-matrix.md` skill maturity snapshot |
| `registry` | Generate the machine-readable skill registry (`registry/skills.json`) |
| `signals` | Generate usage-informed relevance signals from evaluation golden fixtures |
| `discover` | Search the generated registry by text or domain |
| `recommend` | Get related-skill recommendations for a skill ID |
| `plan` | Generate an execution plan for a user intent |
| `execute` | Generate a plan and run it through the workflow runtime |
| `evaluate` | Run the evaluation framework against `eval/datasets` |

## Examples

Build every workspace package.

```bash
bun run build
```

Validate the repository.

```bash
bun run validate
```

Synchronize generated files.

```bash
bun run sync
```

Generate the skill maturity matrix.

```bash
bun run matrix
```

Build only one package.

```bash
turbo run build --filter=hr-skills-ref
```

Run validation only for the build package.

```bash
turbo run validate --filter=hr-skills-build
```

## CI recommendations

A typical validation workflow is:

```bash
bun install --frozen-lockfile
bun run typecheck
bun run validate
bun run matrix
bun run test
bun run build
```

Use Turborepo caching to avoid rebuilding unchanged packages.

Tasks such as `sync` and `matrix` intentionally disable caching because they
always operate on the latest repository state and write files as a side
effect. `validate` is cacheable (it only depends on `^build`) — a repeat run
with no source changes replays cached results instead of re-validating.

## Tips

- Execute workspace tasks from the repository root.
- Prefer repository scripts (`bun run ...`) over invoking package scripts directly.
- Use `--filter` during development to reduce execution time.
- Let Turborepo determine task execution order.
- Keep task outputs deterministic to maximize cache effectiveness.

## Common issues

- Running package scripts directly instead of using repository commands.
- Forgetting to use `--filter` for package-specific development.
- Expecting cached results from tasks that explicitly disable caching.
- Running Turborepo outside the repository root.
- Defining inconsistent task names across workspace packages.

## Best practices

- Use repository scripts for everyday development.
- Reserve direct `turbo run` commands for advanced workflows.
- Keep task names consistent across every workspace package.
- Enable caching only for deterministic tasks.
- Use package filters to shorten development feedback loops.
- Allow Turborepo to manage workspace execution and dependency ordering.

