npx skills add ...
npx skills add giuseppe-trisciuoglio/developer-kit --skill turborepo-monorepo
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 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 outputsCreate a new workspace:
Initialize in existing project:
Create turbo.json in root (minimal config):
Add scripts to root package.json:
Validate task graph before CI:
Configure tasks in turbo.json:
Run tasks:
Parallel type checking (use transit nodes to avoid cache issues):
Validate before committing:
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
Vitest configuration:
Run affected tests:
See references/testing-config.md for complete testing setup.
GitHub Actions with validation checkpoints:
Remote cache setup:
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/ |
dependsOn: lint, format, spellcheckdependsOn: ["^build"]: build, compiledependsOn: ["build"]: test, e2ecache: false, persistent: true: dev, watchProblem: Tasks execute in wrong order
Solution: Check dependsOn configuration
Problem: Cache invalidating unexpectedly
Solution: Review globalDependencies and inputs
Problem: TypeScript errors not caught due to cache
Solution: Use transit nodes for type checking
Input: "Create a Turborepo with Next.js and NestJS"
Input: "Set up Vitest for all packages"
Input: "Only test changed packages in CI"
Input: "Why is my cache missing?"
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 |