Token导航 LogoToken导航TokenDH.com
开发敏感数据github未标认证来源可访问许可证需确认审计通过

turborepo-monorepoTurborepo monorepo 命令行

Agent Skill

turborepo-monorepo 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

509

周安装

21

GitHub Stars

217

下载量

166
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:turborepo-monorepo(Turborepo monorepo 命令行)
来源仓库:https://github.com/giuseppe-trisciuoglio/developer-kit-claude-code
仓库路径:skills/turborepo-monorepo
安装命令:
npx skills add https://github.com/giuseppe-trisciuoglio/developer-kit-claude-code --skill turborepo-monorepo
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/giuseppe-trisciuoglio/developer-kit-claude-code --skill turborepo-monorepo

简介

用于处理 Monorepo 仓库中的任务调度与依赖管理。

  • 适合配置构建流水线、缓存共享与跨项目脚本执行。
  • 使用时需确认 Turborepo 配置文件与工作区划分方式。
  • 涉及命令执行时应评估安全风险与资源消耗限制。
  • turborepo-monorepo 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Turborepo Monorepo

Overview

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.

When to Use

  • Create or initialize Turborepo workspaces
  • Configure turbo.json tasks with dependencies and outputs
  • Set up Next.js/NestJS apps in monorepo structure
  • Configure Vitest/Jest test pipelines
  • Build CI/CD workflows (GitHub Actions, GitLab CI)
  • Implement remote caching with Vercel Remote Cache
  • Optimize build times and cache hit ratios
  • Debug task dependency or cache issues
  • Migrate from other monorepo tools to Turborepo

Instructions

Workspace Creation

  1. Create a new workspace: pnpm create turbo@latest my-workspace cd my-workspace
  2. Initialize in existing project: pnpm add -D -w turbo
  3. Create turbo.json in root (minimal config): {"$schema": "https://turborepo.dev/schema.json", "pipeline": {"build": {"dependsOn": ["^build"], "outputs": ["dist/**", ".next/**"]}, "lint": {"outputs": []}, "test": {"dependsOn": ["build"], "outputs": ["coverage/**"]}}}
  4. Add scripts to root package.json: {"scripts": {"build": "turbo run build", "dev": "turbo run dev", "lint": "turbo run lint", "test": "turbo run test", "clean": "turbo run clean"}}
  5. Validate task graph before CI: turbo run build --dry-run --filter=... # Verify task execution order

Task Configuration

  1. Configure tasks in turbo.json: {"pipeline": {"build": {"dependsOn": ["^build"], "outputs": ["dist/**"]}, "test": {"dependsOn": ["build"], "outputs": ["coverage/**"]}, "lint": {"outputs": []}}}
  2. Run tasks: turbo run build # All packages turbo run lint test build # Multiple tasks turbo run build --filter=web # Specific package
  3. Parallel type checking (use transit nodes to avoid cache issues): {"pipeline": {"transit": {"dependsOn": ["^transit"]}, "typecheck": {"dependsOn": ["transit"]}}}
  4. Validate before committing: turbo run build --dry-run # Check task order and affected packages

Framework Integration

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

Testing Setup

  1. Vitest configuration: {"pipeline": {"test": {"outputs": [], "inputs": ["$TURBO_DEFAULT$", "vitest.config.ts"]}, "test:watch": {"cache": false, "persistent": true}}}
  2. Run affected tests: turbo run test --filter=[HEAD^] See references/testing-config.md for complete testing setup.

Package Configurations

  1. Create package-specific turbo.json: {"extends": ["//"], "tasks": {"build": {"outputs": ["$TURBO_EXTENDS$", ".next/**"]}}} See references/package-configs.md for detailed package configuration patterns.

CI/CD Setup

  1. GitHub Actions with validation checkpoints: - 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
  2. Remote cache setup: # Login to Vercel npx turbo login # Link repository npx turbo link See references/ci-cd.md for complete CI/CD setup examples.

Task Properties Reference

PropertyDescriptionExample
dependsOnTasks that must complete first["^build"] - dependencies first
outputsFiles/folders to cache["dist/**"]
inputsFiles for cache hash["src/**/*.ts"]
envEnvironment variables affecting hash["DATABASE_URL"]
cacheEnable/disable cachingtrue or false
persistentLong-running tasktrue for dev servers
outputLogsLog verbosity"full", "new-only", "errors-only"

Dependency Patterns

  • ^task - Run task in dependencies first (topological order)
  • task - Run task in same package first
  • package#task - Run specific package's task

Filter Syntax

FilterDescription
webOnly web package
web...web + all dependencies
...webweb + all dependents
...web...web + deps + dependents
[HEAD^]Packages changed since last commit
./apps/*All packages in apps/

Best Practices

Performance Optimization

  1. Use specific outputs - Only cache what's needed
  2. Fine-tune inputs - Exclude files that don't affect output
  3. Transit nodes - Enable parallel type checking
  4. Remote cache - Share cache across team/CI
  5. Package configurations - Customize per-package behavior

Caching Strategy

{
  "pipeline": {
    "build": {
      "outputs": ["dist/**"],
      "inputs": ["$TURBO_DEFAULT$", "!README.md", "!**/*.md"]
    }
  }
}

Task Organization

  • Independent tasks - No dependsOn: lint, format, spellcheck
  • Build tasks - dependsOn: ["^build"]: build, compile
  • Test tasks - dependsOn: ["build"]: test, e2e
  • Dev tasks - cache: false, persistent: true: dev, watch

Common Issues

Tasks not running in order

Problem: Tasks execute in wrong order

Solution: Check dependsOn configuration

{
  "build": {
    "dependsOn": ["^build"]
  }
}

Cache misses on unchanged files

Problem: Cache invalidating unexpectedly

Solution: Review globalDependencies and inputs

{
  "globalDependencies": ["tsconfig.json"],
  "pipeline": {
    "build": {
      "inputs": ["$TURBO_DEFAULT$", "!*.md"]
    }
  }
}

Type errors after cache hit

Problem: TypeScript errors not caught due to cache

Solution: Use transit nodes for type checking

{
  "transit": { "dependsOn": ["^transit"] },
  "typecheck": { "dependsOn": ["transit"] }
}

Examples

Example 1: Create New Workspace

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

Example 2: Configure Testing Pipeline

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
    }
  }
}

Example 3: Run Affected Tests in CI

Input: "Only test changed packages in CI"

pnpm run test --filter=[HEAD^]

Example 4: Debug Cache Issues

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

Constraints and Warnings

  • Node.js 18+ is required for Turborepo
  • Package manager field required in root package.json
  • Outputs must be specified for caching to work
  • Persistent tasks cannot have dependents
  • Windows: WSL or Git Bash recommended
  • Remote cache requires Vercel account or self-hosted solution
  • Large monorepos may need increased concurrency settings

Reference Files

For detailed guidance on specific topics, consult:

TopicReference File
turbo.json templatereferences/turbo.json
Next.js integrationreferences/nextjs-config.md
NestJS integrationreferences/nestjs-config.md
Vitest/Jest/Playwrightreferences/testing-config.md
GitHub/CircleCI/GitLab CIreferences/ci-cd.md
Package configurationsreferences/package-configs.md

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.47%
按下载量换算61

Claude

28.1%
按下载量换算47

Cursor

18.32%
按下载量换算30

Gemini CLI

10.13%
按下载量换算17

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills