writing-skills
writing-skills
Use when creating new skills, editing existing skills, or verifying skills work before deployment
turborepoAssists with managing JavaScript/TypeScript monorepos using Turborepo. Use when configuring build pipelines, setting up caching, pruning workspaces for Docker, or optimizing CI/CD for monorepo projects. Trigger words: turborepo, turbo, monorepo, pipeline, workspace, remote cache, turbo.json.
Independent GitHub snapshot · Automated classification · Original documentation governs
Turborepo is a high-performance build system for JavaScript/TypeScript monorepos that intelligently caches task outputs, parallelizes execution across CPU cores, and ensures teams only rebuild what has changed. It integrates with npm, yarn, and pnpm workspaces.
turbo.json with dependsOn for ordering, use ^ prefix for topological dependencies (e.g., "dependsOn": ["^build"]), and specify outputs for cacheable artifacts.outputs arrays for each task (["dist/**", ".next/**"]), list all build-affecting environment variables in env or globalEnv, and set up Remote Cache for cross-developer sharing.--filter=@app/web to target specific packages, --filter=...[HEAD~1] for changed packages, and turbo run build --graph to visualize the dependency graph.turbo prune --scope=@app/web to generate a minimal Docker context containing only the targeted package and its dependencies.--dry-run=json for pipeline analysis, and leverage incremental builds that only rebuild packages affected by PR changes.@repo/ui, @repo/db, @repo/auth) with shared tsconfig and ESLint configs.User request: "Initialize a monorepo with a Next.js app and shared UI library"
Actions:
apps/web and packages/ui directoriesturbo.json with build, dev, lint, and typecheck taskstsconfig base in packages/tsconfigOutput: A monorepo with parallel builds, intelligent caching, and shared configuration.
User request: "Create a Dockerfile for deploying one service from our Turborepo monorepo"
Actions:
turbo prune --scope=@app/api to generate minimal contextOutput: A lean Docker image containing only the service and its dependencies, not the full monorepo.
outputs for cacheable tasks; use empty outputs: [] for side-effect-only tasks like lint.env or globalEnv that affect build output.^ prefix in dependsOn for tasks that consume dependency outputs (build, typecheck).@repo/ui, @repo/db, @repo/auth.turbo prune for Docker builds; never copy the entire monorepo into a container.