Provides comprehensive Turborepo monorepo management guidance for TypeScript/JavaScript projects. Use when creating Turborepo workspaces, configuring turbo.json tasks, setting up Next.js/NestJS apps, managing test pipelines (Vitest/Jest), configuring CI/CD, implementing remote caching, or optimizing build performance in monorepos
npx skills add https://github.com/giuseppe-trisciuoglio/developer-kit --skill turborepo-monorepo
Provides guidance for Turborepo monorepo management: workspace creation, turbo.json task configuration, Next.js/NestJS integration, testing pipelines (Vitest/Jest), CI/CD setup, and build performance optimization.
turbo.json tasks with dependencies and outputs pnpm create turbo@latest my-workspace
cd my-workspace
pnpm add -D -w turbo
{
"$schema": "https://turborepo.dev/schema.json",
"pipeline": {
"build": { "dependsOn": ["^build"], "outputs": ["dist/**", ".next/**"] },
"lint": { "outputs": [] },
"test": { "dependsOn": ["build"], "outputs": ["coverage/**"] }
}
}
{ "scripts": { "build": "turbo run build", "dev": "turbo run dev", "lint": "turbo run lint", "test": "turbo run test", "clean": "turbo run clean" } }
turbo run build --dry-run --filter=... # Verify task execution order
turbo.json: { "pipeline": { "build": { "dependsOn": ["^build"], "outputs": ["dist/**"] }, "test": { "dependsOn": ["build"], "outputs": ["coverage/**"] }, "lint": { "outputs": [] } } }
turbo run build # All packages
turbo run lint test build # Multiple tasks
turbo run build --filter=web # Specific package
{ "pipeline": { "transit": { "dependsOn": ["^transit"] }, "typecheck": { "dependsOn": ["transit"] } } }
turbo run build --dry-run # Check task order and affected packages
Next.js: outputs ".next/**" and env "NEXT_PUBLIC_*"] - See [references/nextjs-config.md
NestJS: outputs "dist/**", dev tasks with cache: false, persistent: true - See references/nestjs-config.md
{
"pipeline": {
"test": {
"outputs": [],
"inputs": ["$TURBO_DEFAULT$", "vitest.config.ts"]
},
"test:watch": {
"cache": false,
"persistent": true
}
}
}
turbo run test --filter=[HEAD^]
See references/testing-config.md for complete testing setup.
{
"extends": ["//"],
"tasks": {
"build": {
"outputs": ["$TURBO_EXTENDS$", ".next/**"]
}
}
}
See references/package-configs.md for detailed package configuration patterns.
- name: Install dependencies
run: pnpm install
- name: Validate affected packages (dry-run)
run: pnpm turbo run build --filter=[HEAD^] --dry-run
# VALIDATE: Review output to confirm only expected packages will build
- name: Run tests
run: pnpm run test --filter=[HEAD^]
- name: Build affected packages
run: pnpm run build --filter=[HEAD^]
- name: Verify cache hits
run: pnpm turbo run build --filter=[HEAD^] --dry-run | grep "Cache"
# VALIDATE: Confirm cache hits for unchanged packages
# Login to Vercel
npx turbo login
# Link repository
npx turbo link
See references/ci-cd.md for complete CI/CD setup examples.
| Property | Description | Example |
|----------|-------------|---------|
| dependsOn | Tasks that must complete first | ["^build"] - dependencies first |
| outputs | Files/folders to cache | ["dist/**"] |
| inputs | Files for cache hash | ["src/**/*.ts"] |
| env | Environment variables affecting hash | ["DATABASE_URL"] |
| cache | Enable/disable caching | true or false |
| persistent | Long-running task | true for dev servers |
| outputLogs | Log verbosity | "full", "new-only", "errors-only" |
^task - Run task in dependencies first (topological order)task - Run task in same package firstpackage#task - Run specific package's task| Filter | Description |
|--------|-------------|
| web | Only web package |
| web... | web + all dependencies |
| ...web | web + all dependents |
| ...web... | web + deps + dependents |
| [HEAD^] | Packages changed since last commit |
| ./apps/* | All packages in apps/ |
{
"pipeline": {
"build": {
"outputs": ["dist/**"],
"inputs": ["$TURBO_DEFAULT$", "!README.md", "!**/*.md"]
}
}
}
dependsOn: lint, format, spellcheckdependsOn: ["^build"]: build, compiledependsOn: ["build"]: test, e2ecache: false, persistent: true: dev, watchProblem: Tasks execute in wrong order
Solution: Check dependsOn configuration
{
"build": {
"dependsOn": ["^build"]
}
}
Problem: Cache invalidating unexpectedly
Solution: Review globalDependencies and inputs
{
"globalDependencies": ["tsconfig.json"],
"pipeline": {
"build": {
"inputs": ["$TURBO_DEFAULT$", "!*.md"]
}
}
}
Problem: TypeScript errors not caught due to cache
Solution: Use transit nodes for type checking
{
"transit": { "dependsOn": ["^transit"] },
"typecheck": { "dependsOn": ["transit"] }
}
Input: "Create a Turborepo with Next.js and NestJS"
pnpm create turbo@latest my-workspace
cd my-workspace
# Add Next.js app
pnpm add next react react-dom -F apps/web
# Add NestJS API
pnpm add @nestjs/core @nestjs/common -F apps/api
Input: "Set up Vitest for all packages"
{
"pipeline": {
"test": {
"dependsOn": ["build"],
"outputs": ["coverage/**"],
"inputs": ["$TURBO_DEFAULT$", "vitest.config.ts"]
},
"test:watch": {
"cache": false,
"persistent": true
}
}
}
Input: "Only test changed packages in CI"
pnpm run test --filter=[HEAD^]
Input: "Why is my cache missing?"
# Dry run to see what would be executed
turbo run build --dry-run --filter=web
# Show hash inputs
turbo run build --force --filter=web
package.jsonconcurrency settingsFor detailed guidance on specific topics, consult:
| Topic | Reference File |
|-------|----------------|
| turbo.json template | references/turbo.json |
| Next.js integration | references/nextjs-config.md |
| NestJS integration | references/nestjs-config.md |
| Vitest/Jest/Playwright | references/testing-config.md |
| GitHub/CircleCI/GitLab CI | references/ci-cd.md |
| Package configurations | references/package-configs.md |
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup
Comprehensive GitHub release orchestration with AI swarm coordination for automated versioning, testing, deployment, and rollback management
Migrate test files from `as` type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace `as` in tests, or needs partial test data.
Modern JavaScript/TypeScript development with Bun runtime. Covers package management, bundling, testing, and migration from Node.js. Use when working with Bun, optimizing JS/TS development speed, or migrating from Node.js to Bun.
You are a dependency management expert specializing in safe, incremental upgrades of project dependencies. Plan and execute dependency updates with minimal risk, proper testing, and clear migration pa
Master systematic debugging techniques, profiling tools, and root cause analysis to efficiently track down bugs across any codebase or technology stack. Use when investigating bugs, performance issues, or unexpected behavior.
Opinionated backend development standards for Node.js + Express + TypeScript microservices. Covers layered architecture, BaseController pattern, dependency injection, Prisma repositories, Zod validation, unifiedConfig, Sentry error tracking, async safety, and testing discipline.
Best practices for writing JavaScript/TypeScript tests using Jest, including mocking strategies, test structure, and common patterns.
Take giuseppe-trisciuoglio/turborepo-monorepo from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference npm, npx, pnpm.
Without those the skill loads but fails at the first command.