turborepo
Master Turborepo monorepo configuration with this Claude Code skill, drawn from battle-tested Cursor rules. Get expert guidance on structuring multi-package projects, optimizing build pipelines, and managing dependencies across your workspace efficiently.
Turborepo enables you to set up a monorepo by initializing a root `turbo.json` configuration file that defines your workspace structure and build tasks. Start by creating a `turbo.json` at your project root with task definitions, then organize your packages in a `packages/` directory. Each package should have its own `package.json`. Turborepo automatically discovers workspaces and manages dependencies between them, allowing you to run tasks across multiple packages efficiently using commands like `turbo run build`.
AI-generated summary based on this skill's SKILL.md
Decision gist · record as of 2026-06-09
Turborepo enables you to set up a monorepo by initializing a root `turbo.json` configuration file that defines your workspace structure and build tasks. Start by creating a `turbo.json` at your project root with task definitions, then organize your packages in a `packages/` directory. Each package should have its own `package.json`. Turborepo automatically discovers workspaces and manages dependencies between them, allowing you to run tasks across multiple packages efficiently using commands like `turbo run build`.
Use it when
- Turborepo's `turbo.json` configuration should define your pipeline tasks with explicit dependencies and caching rules.
- Turborepo task dependencies use the `dependsOn` field in `turbo.json` to create execution order constraints.
Verify before relying
Read SKILL.md below before installing (1 file). Open directory: indexed for reading, not audited.
Install
Mindrally/skills/turborepo
Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.
Frequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How do I set up turborepo monorepo from scratch?
Turborepo enables you to set up a monorepo by initializing a root `turbo.json` configuration file that defines your workspace structure and build tasks. Start by creating a `turbo.json` at your project root with task definitions, then organize your packages in a `packages/` directory. Each package should have its own `package.json`. Turborepo automatically discovers workspaces and manages dependencies between them, allowing you to run tasks across multiple packages efficiently using commands like `turbo run build`.
What is the best way to configure turbo.json for my project?
Turborepo's `turbo.json` configuration should define your pipeline tasks with explicit dependencies and caching rules. Specify which tasks depend on others using the `dependsOn` field—for example, `build` might depend on `^build` (caret notation means dependencies in other packages must build first). Set `outputs` to cache build artifacts and `inputs` to define what files trigger cache invalidation. Use `cache: false` for tasks like `dev` that shouldn't be cached. This structure ensures Turborepo can optimize your build graph effectively.
How do I use turborepo task dependencies explained?
Turborepo task dependencies use the `dependsOn` field in `turbo.json` to create execution order constraints. The caret prefix (`^`) means a task depends on the same task in its dependencies—so `build` with `dependsOn: ["^build"]` ensures all package dependencies build before the current package. Without the caret, tasks run in the current package only. You can also use `dependsOn: ["lint"]` to make tasks sequential within a package. This declarative approach lets Turborepo parallelize independent tasks while respecting your build graph.
How can I optimize turborepo builds through caching and performance tuning?
Turborepo optimizes build performance through local and remote caching. Configure `outputs` in your pipeline tasks to specify which files to cache—Turborepo skips tasks when inputs haven't changed. Use `inputs` to define file patterns that trigger cache invalidation, excluding unnecessary files like tests or docs if appropriate. Enable remote caching via `turbo login` and `turbo link` to share cache across CI/CD and team members. For incremental builds, use `turbo run build --filter=...` to build only affected packages, and leverage `turbo prune` to create optimized dependency subsets for deployment.
What is turborepo remote caching setup and how do I integrate it with CI/CD?
Turborepo remote caching setup involves authenticating with Vercel's cache backend or a self-hosted solution. Run `turbo login` locally to authenticate, then `turbo link` to connect your repository. In CI/CD pipelines, set the `TURBO_TOKEN` and `TURBO_TEAM` environment variables so your build can access the remote cache without interactive login. This allows CI/CD jobs to reuse cached artifacts from previous builds and team members' machines, dramatically reducing build times. Configure your pipeline to run `turbo run build --filter=...` with these variables set for optimal cache hit rates.
How do I manage shared configurations and workspace dependencies in turborepo?
Turborepo manages shared configurations by creating a dedicated `packages/config` or `packages/shared` package containing shared TypeScript configs, ESLint rules, or build utilities. Other packages reference this shared package in their `package.json` dependencies. Turborepo's workspace resolution automatically handles these internal dependencies. Use `dependsOn: ["^build"]` in your pipeline to ensure shared packages build first. For TypeScript, use path aliases in a root `tsconfig.json` with `references` to package configs, allowing Turborepo to understand the full dependency graph and optimize builds accordingly.
SKILL.md
Rendered from the published skill. Quoted content, verbatim.
Turborepo Development
You are an expert in Turborepo, the high-performance build system for JavaScript and TypeScript monorepos.
Project Structure
- Organize workspaces following the standard Turborepo structure:
apps/- Application workspaces (web apps, APIs, mobile apps)packages/- Shared packages (UI components, utilities, configs)tooling/- Build tools and configurations (optional)- Keep the root
package.jsonminimal with workspace configuration - Use consistent naming conventions across all workspaces
Workspace Configuration
- Define workspaces in the root
package.json:json { "workspaces": ["apps/*", "packages/*"] } - Each workspace should have its own
package.jsonwith proper dependencies - Use internal package references with workspace protocol:
"@repo/ui": "workspace:*"
turbo.json Configuration
```json { "$schema": "https://turbo.build/schema.json", "tasks": { "build": { "dependsOn": ["^build"], "outputs": ["dist/", ".next/", "!.next/cache/**"] }, "dev": {
(truncated - see the full file via the links below)
File tree — 1 file
turborepo/SKILL.md
Let your AI agent find skills like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.
wish › “Set up and configure a Turborepo monorepo project structure”
Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →
Related skills
This skill equips you to establish and manage a Turborepo-based monorepo, enabling fast, scalable builds across multiple interconnected packages. Leverage intelligent caching and task orchestration to accelerate your development pipeline and reduce build times significantly.
Optimize your monorepo's build performance by configuring Turborepo's caching layer to intelligently reuse artifacts across tasks. This skill walks you through cache strategies, remote storage setup, and validation techniques to eliminate redundant builds and accelerate your CI/CD pipeline.
monorepo-setup equips you to architect high-performance monorepo environments using Turborepo and pnpm, enabling efficient dependency management and build orchestration across multiple packages. This skill streamlines workspace configuration, optimizing build times and developer experience for teams managing complex, interconnected projects at scale.
Turborepo skills enable you to design and fine-tune efficient build pipelines across monorepo projects. Leverage task caching, dependency management, and parallel execution to accelerate your development workflow and reduce build times.
turborepo is a high-performance build system designed for monorepos that streamlines task orchestration across multiple packages. Configure task dependencies, output handling, and intelligent caching directly in turbo.json to accelerate your build pipeline and reduce redundant work.
Turborepo enables developers to orchestrate complex build and task workflows across monorepos with precision dependency resolution and smart caching layers. Set up efficient pipelines that automatically skip redundant work and scale seamlessly as your project grows. Ideal for teams managing multiple interconnected packages who need reproducible, high-performance builds.
More skills turborepo (MIT) · Turborepo (NOASSERTION) · turborepo (MIT) · turborepo (MIT)