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

shared-monorepo-turborepo共享 monorepo Turborepo

Agent Skill

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

总安装

235

周安装

10

GitHub Stars

5

下载量

82
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/agents-inc/skills --skill shared-monorepo-turborepo

简介

shared-monorepo-turborepo 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态或代码变更进行整理。
  • 通过 npx skills add 命令安装,需结合原始 README 核验具体用法。
  • 安装前建议确认权限范围、维护状态及是否触发联网或文件读写操作。
  • 当前无额外底部简介内容,可参考来源仓库进一步了解功能细节。

SKILL.md

Monorepo Orchestration with Turborepo

Quick Guide: Turborepo 2.x for monorepo orchestration. Task pipelines with dependency ordering. Local + remote caching for massive speed gains. Workspaces for package linking. Syncpack for dependency version consistency. Internal packages use @repo/* naming, explicit exports fields, and workspace:* protocol.

<critical_requirements>

CRITICAL: Before Using This Skill

All code must follow project conventions in CLAUDE.md (kebab-case, named exports, import ordering, import type, named constants)

(You MUST define task dependencies using dependsOn: ["^build"] in turbo.json to ensure topological ordering)

(You MUST declare all environment variables in the env array of turbo.json tasks for proper cache invalidation)

(You MUST set cache: false for tasks with side effects like dev servers and code generation)

**(You MUST use workspace:* protocol for internal package dependencies)**

**(You MUST use @repo/* naming convention for ALL internal packages)**

(You MUST define explicit exports field in package.json - never allow importing internal paths)

(You MUST mark React as peerDependencies NOT dependencies in component packages)

</critical_requirements>


Auto-detection: Turborepo configuration, turbo.json, monorepo setup, workspaces, Bun workspaces, syncpack, task pipelines, @repo/* packages, package.json exports, workspace dependencies, shared configurations

When to use:

  • Configuring Turborepo task pipeline and caching strategies
  • Setting up workspaces for monorepo package linking
  • Enabling remote caching for team/CI cache sharing
  • Synchronizing dependency versions across workspace packages
  • Creating new internal packages in packages/
  • Configuring package.json exports for tree-shaking
  • Setting up shared configuration packages (@repo/eslint-config, @repo/typescript-config)

When NOT to use:

  • Single application projects (use standard build tools directly)
  • Projects without shared packages (no monorepo benefits)
  • Very small projects where setup overhead exceeds caching benefits
  • Polyrepo architecture is preferred over monorepo
  • Projects already using Nx or Lerna (don't mix monorepo tools)
  • App-specific code that won't be shared (keep in app directory)

Key patterns covered:

  • Turborepo 2.x task pipeline (dependsOn, outputs, inputs, cache)
  • Local and remote caching strategies
  • Workspaces for package linking
  • Syncpack for dependency version consistency
  • Environment variable handling in turbo.json
  • Package structure and @repo/* naming conventions
  • package.json exports for tree-shaking
  • Named exports and barrel file patterns
  • Internal dependencies with workspace protocol

Detailed Resources:

- examples/caching.md - Remote caching, CI/CD integration - examples/workspaces.md - Workspace protocol, syncpack, dependency boundaries - examples/packages.md - Internal package conventions, exports, creating packages


Philosophy

Turborepo is a high-performance build system designed for JavaScript/TypeScript monorepos. It provides intelligent task scheduling, caching, and remote cache sharing to dramatically reduce build times. Combined with workspaces, it enables efficient package management with automatic dependency linking.


Core Patterns

Pattern 1: Turborepo Task Pipeline with Dependency Ordering

Define task dependencies and caching behavior in turbo.json to enable intelligent build orchestration and caching.

Key Concepts

  • dependsOn: ["^build"] - Run dependency tasks first (topological order)
  • outputs - Define what files to cache
  • inputs - Specify which files trigger cache invalidation
  • cache: false - Disable caching for tasks with side effects
  • persistent: true - Keep dev servers running

Minimal Example

{
  "tasks": {
    "build": {
      "dependsOn": ["^build"],
      "env": ["DATABASE_URL", "NODE_ENV"],
      "outputs": ["dist/**", ".next/**", "!.next/cache/**"]
    },
    "dev": { "cache": false, "persistent": true }
  }
}

Key: dependsOn: ["^build"] ensures topological execution, env declares variables for cache invalidation, cache: false for side-effect tasks.

See examples/core.md for full good/bad comparison examples.


Pattern 2: Caching Strategies

Turborepo's caching system dramatically speeds up builds by reusing previous task outputs when inputs haven't changed.

What Gets Cached

  • Build outputs (dist/, .next/, framework-specific directories)
  • Test results (when cache: true)
  • Lint results

What Doesn't Get Cached

  • Dev servers (cache: false)
  • Code generation (cache: false - generates files)
  • Tasks with side effects

Cache Invalidation Triggers

  • Source file changes
  • Dependency changes
  • Environment variable changes (when in env array)
  • Global dependencies changes (.env, tsconfig.json)

Setup: Link a Vercel account (or self-hosted cache), then set TURBO_TOKEN and TURBO_TEAM environment variables to enable remote cache sharing.

See examples/caching.md for remote caching configuration and CI integration examples.


Pattern 3: Workspaces for Package Management

Configure workspaces to enable package linking and dependency sharing across monorepo packages.

Key Concepts

  • Root package.json declares "workspaces": ["apps/*", "packages/*"]
  • Internal deps use "@repo/ui": "workspace:*" protocol for automatic linking
  • Standard structure: apps/ for deployable apps, packages/ for shared code

See examples/workspaces.md for full good/bad comparison examples and syncpack configuration.


Performance Optimization

Cache Hit Metrics:

  • First build: ~45s (5 packages, no cache)
  • Cached build: ~1s (97% faster with local cache)
  • Affected build: ~12s (73% faster, only changed packages rebuild)
  • Team savings: Hours per week with remote cache enabled

Optimization Strategies:

  • Set globalDependencies for files affecting all packages (.env, tsconfig.json) to prevent unnecessary cache invalidation
  • Use inputs array to fine-tune what triggers cache invalidation for specific tasks
  • Enable remote caching to share artifacts across team and CI
  • Use --filter with affected detection (--filter=...[HEAD^]) to only run tasks for changed packages
  • Set outputs carefully to exclude cache directories (e.g., !.next/cache/**)

Force Cache Bypass:

# Ignore cache when needed
bun run build --force

# Only build affected packages
bun run build --filter=...[HEAD^1]

<decision_framework>

Decision Framework

New code? → Shared across 2+ apps? → packages/ (else keep in app)
Monorepo? → Builds > 30s or caching matters? → Use Turborepo

For comprehensive decision trees and package creation criteria, see reference.md.

</decision_framework>


<red_flags>

RED FLAGS

High Priority Issues:

  • Missing dependsOn: ["^build"] for build tasks (breaks topological ordering)
  • Missing env array in turbo.json (causes cache misses across environments)
  • Caching dev servers or code generation (incorrect outputs reused)
  • Default exports in library packages (breaks tree-shaking)
  • Missing exports field in package.json (allows internal path imports)

Common Mistakes:

  • Hardcoded versions instead of workspace:* for internal deps
  • React in dependencies instead of peerDependencies
  • Giant barrel files re-exporting everything (negates tree-shaking)
  • Running full test suite without --filter=...[HEAD^] affected detection

Gotchas:

  • dependsOn: ["^task"] runs dependencies' tasks; dependsOn: ["task"] runs same package's task
  • --filter=...[HEAD^] requires fetch-depth: 2 in GitHub Actions
  • Exclude cache directories in outputs: !.next/cache/**

For detailed anti-patterns and checklists, see reference.md.

</red_flags>


<critical_reminders>

CRITICAL REMINDERS

All code must follow project conventions in CLAUDE.md

(You MUST define task dependencies using dependsOn: ["^build"] in turbo.json to ensure topological ordering)

(You MUST declare all environment variables in the env array of turbo.json tasks for proper cache invalidation)

(You MUST set cache: false for tasks with side effects like dev servers and code generation)

**(You MUST use workspace:* protocol for internal package dependencies)**

**(You MUST use @repo/* naming convention for ALL internal packages)**

(You MUST define explicit exports field in package.json - never allow importing internal paths)

(You MUST mark React as peerDependencies NOT dependencies in component packages)

Failure to follow these rules will cause incorrect builds, cache misses, broken dependency resolution, and tree-shaking failures.

</critical_reminders>

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

36.07%
按下载量换算30

Claude

34.56%
按下载量换算28

Cursor

18.37%
按下载量换算15

Gemini CLI

8.89%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

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

安装前确认

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

来源信息

继续浏览同类 Skills