Monorepo Navigator
Monorepo导航器
Tier: POWERFUL
Category: Engineering / Build Systems
Maintainer: Claude Skills Team
等级:高级
分类:工程/构建系统
维护者:Claude技能团队
Navigate, manage, and optimize monorepos at any scale. Covers Turborepo, Nx, pnpm workspaces, and Lerna/Changesets for cross-package impact analysis, selective builds on affected packages only, dependency graph visualization, remote caching configuration, migration from multi-repo to monorepo with preserved git history, and coordinated package publishing with automated changelogs.
可浏览、管理并优化任意规模的monorepo。覆盖Turborepo、Nx、pnpm workspaces、Lerna/Changesets相关能力,支持跨包影响分析、仅针对受影响包的选择性构建、依赖图可视化、远程缓存配置、保留Git历史的多仓转单仓迁移,以及带自动更新日志的包协同发布。
monorepo, Turborepo, Nx, pnpm workspaces, Changesets, dependency graph, remote cache, affected packages, selective builds, cross-package impact, npm publishing, workspace protocol
monorepo, Turborepo, Nx, pnpm workspaces, Changesets, dependency graph, remote cache, affected packages, selective builds, cross-package impact, npm publishing, workspace protocol
1. Impact Analysis
1. 影响分析
- Determine which apps break when a shared package changes
- Trace dependency chains from leaf packages to root apps
- Visualize impact as Mermaid dependency graphs
- Calculate blast radius for any file change
- 判定共享包变更时哪些应用会受影响崩溃
- 追踪从叶子包到根应用的依赖链
- 以Mermaid依赖图形式可视化影响范围
- 计算任意文件变更的影响半径
2. Selective Execution
2. 选择性执行
- Run tests/builds only for affected packages (not everything)
- Filter by changed files since a git ref
- Scope commands to specific packages and their dependents
- Skip unchanged packages in CI for faster feedback
- 仅对受影响的包运行测试/构建(而非全量执行)
- 按某个Git引用之后的变更文件过滤
- 将命令作用范围限定为特定包及其依赖项
- 在CI中跳过未变更的包,加快反馈速度
3. Build Optimization
3. 构建优化
- Remote caching with Turborepo (Vercel) or Nx Cloud
- Incremental builds with proper input/output configuration
- Parallel execution with dependency-aware scheduling
- Artifact sharing between CI jobs
- 基于Turborepo(Vercel)或Nx Cloud的远程缓存
- 搭配合理的输入/输出配置实现增量构建
- 基于依赖感知调度的并行执行
- CI任务间的构建产物共享
- Changesets for coordinated versioning across packages
- Automated changelog generation per package
- Pre-release channels (alpha, beta, rc)
- protocol replacement during publish
- 基于Changesets实现跨包协同版本管理
- 自动生成每个包的更新日志
- 支持预发布通道(alpha、beta、rc)
- 发布时自动替换协议
- Multiple packages/apps share code (UI components, utils, types, API clients)
- Build times are slow because everything rebuilds on every change
- Migrating from multiple repos to a single monorepo
- Publishing npm packages with coordinated versioning
- Teams work across packages and need unified tooling
- 多个包/应用存在共享代码(UI组件、工具函数、类型定义、API客户端)
- 每次变更都会触发全量重建,导致构建速度缓慢
- 正在从多仓库架构迁移到单monorepo架构
- 需要协同管理版本的npm包发布场景
- 团队需要跨包协作,期望使用统一的工具链
Tool Selection Decision Matrix
工具选择决策矩阵
| Requirement | Turborepo | Nx | pnpm Workspaces | Changesets |
|---|
| Simple task runner | Best | Good | N/A | N/A |
| Remote caching | Built-in | Nx Cloud | N/A | N/A |
| Code generation | No | Best | N/A | N/A |
| Dependency management | N/A | N/A | Best | N/A |
| Package publishing | N/A | N/A | N/A | Best |
| Plugin ecosystem | Limited | Extensive | N/A | N/A |
| Config complexity | Minimal | Moderate | Minimal | Minimal |
Recommended modern stack: pnpm workspaces + Turborepo + Changesets
| 需求 | Turborepo | Nx | pnpm Workspaces | Changesets |
|---|
| 简单任务运行器 | 最佳 | 良好 | 不适用 | 不适用 |
| 远程缓存 | 内置 | Nx Cloud | 不适用 | 不适用 |
| 代码生成 | 不支持 | 最佳 | 不适用 | 不适用 |
| 依赖管理 | 不适用 | 不适用 | 最佳 | 不适用 |
| 包发布 | 不适用 | 不适用 | 不适用 | 最佳 |
| 插件生态 | 有限 | 丰富 | 不适用 | 不适用 |
| 配置复杂度 | 极低 | 中等 | 极低 | 极低 |
推荐现代技术栈: pnpm workspaces + Turborepo + Changesets
Monorepo Structure
Monorepo结构
my-monorepo/
├── apps/
│ ├── web/ # Next.js frontend
│ │ ├── package.json # depends on @repo/ui, @repo/utils
│ │ └── ...
│ ├── api/ # Express/Fastify backend
│ │ ├── package.json # depends on @repo/db, @repo/utils
│ │ └── ...
│ └── mobile/ # React Native app
│ ├── package.json
│ └── ...
├── packages/
│ ├── ui/ # Shared React components
│ │ ├── package.json # @repo/ui
│ │ └── ...
│ ├── utils/ # Shared utilities
│ │ ├── package.json # @repo/utils
│ │ └── ...
│ ├── db/ # Database client + schema
│ │ ├── package.json # @repo/db
│ │ └── ...
│ ├── types/ # Shared TypeScript types
│ │ ├── package.json # @repo/types (no runtime deps)
│ │ └── ...
│ └── config/ # Shared configs (tsconfig, eslint)
│ ├── tsconfig.base.json
│ └── eslint.base.js
├── turbo.json # Turborepo pipeline config
├── pnpm-workspace.yaml # Workspace package locations
├── package.json # Root scripts, devDependencies
└── .changeset/ # Changeset config
└── config.json
my-monorepo/
├── apps/
│ ├── web/ # Next.js frontend
│ │ ├── package.json # depends on @repo/ui, @repo/utils
│ │ └── ...
│ ├── api/ # Express/Fastify backend
│ │ ├── package.json # depends on @repo/db, @repo/utils
│ │ └── ...
│ └── mobile/ # React Native app
│ ├── package.json
│ └── ...
├── packages/
│ ├── ui/ # Shared React components
│ │ ├── package.json # @repo/ui
│ │ └── ...
│ ├── utils/ # Shared utilities
│ │ ├── package.json # @repo/utils
│ │ └── ...
│ ├── db/ # Database client + schema
│ │ ├── package.json # @repo/db
│ │ └── ...
│ ├── types/ # Shared TypeScript types
│ │ ├── package.json # @repo/types (no runtime deps)
│ │ └── ...
│ └── config/ # Shared configs (tsconfig, eslint)
│ ├── tsconfig.base.json
│ └── eslint.base.js
├── turbo.json # Turborepo pipeline config
├── pnpm-workspace.yaml # Workspace package locations
├── package.json # Root scripts, devDependencies
└── .changeset/ # Changeset config
└── config.json
Turborepo Configuration
Turborepo配置
json
{
"$schema": "https://turbo.build/schema.json",
"globalDependencies": ["**/.env.*local"],
"globalEnv": ["NODE_ENV", "CI"],
"tasks": {
"build": {
"dependsOn": ["^build"],
"inputs": ["src/**", "tsconfig.json", "package.json"],
"outputs": ["dist/**", ".next/**", "!.next/cache/**"],
"env": ["NEXT_PUBLIC_*"]
},
"test": {
"dependsOn": ["^build"],
"inputs": ["src/**", "tests/**", "vitest.config.*"],
"outputs": ["coverage/**"]
},
"lint": {
"dependsOn": ["^build"],
"inputs": ["src/**", ".eslintrc.*", "tsconfig.json"]
},
"typecheck": {
"dependsOn": ["^build"],
"inputs": ["src/**", "tsconfig.json"]
},
"dev": {
"cache": false,
"persistent": true
}
}
}
json
{
"$schema": "https://turbo.build/schema.json",
"globalDependencies": ["**/.env.*local"],
"globalEnv": ["NODE_ENV", "CI"],
"tasks": {
"build": {
"dependsOn": ["^build"],
"inputs": ["src/**", "tsconfig.json", "package.json"],
"outputs": ["dist/**", ".next/**", "!.next/cache/**"],
"env": ["NEXT_PUBLIC_*"]
},
"test": {
"dependsOn": ["^build"],
"inputs": ["src/**", "tests/**", "vitest.config.*"],
"outputs": ["coverage/**"]
},
"lint": {
"dependsOn": ["^build"],
"inputs": ["src/**", ".eslintrc.*", "tsconfig.json"]
},
"typecheck": {
"dependsOn": ["^build"],
"inputs": ["src/**", "tsconfig.json"]
},
"dev": {
"cache": false,
"persistent": true
}
}
}
Key Turborepo Commands
常用Turborepo命令
Run all tasks
Run all tasks
Run only affected packages (compared to main)
Run only affected packages (compared to main)
turbo run build test --filter='...[origin/main]'
turbo run build test --filter='...[origin/main]'
Run for a specific package and its dependencies
Run for a specific package and its dependencies
turbo run build --filter=@repo/web...
turbo run build --filter=@repo/web...
Run for a specific package only (no deps)
Run for a specific package only (no deps)
turbo run test --filter=@repo/ui
turbo run test --filter=@repo/ui
Dry run to see what would execute
Dry run to see what would execute
turbo run build --dry=json
turbo run build --dry=json
View dependency graph
View dependency graph
turbo run build --graph=graph.html
turbo run build --graph=graph.html
Summarize cache usage
Summarize cache usage
turbo run build --summarize
turbo run build --summarize
pnpm Workspace Configuration
pnpm工作区配置
pnpm-workspace.yaml
pnpm-workspace.yaml
yaml
packages:
- 'apps/*'
- 'packages/*'
yaml
packages:
- 'apps/*'
- 'packages/*'
Cross-Package References
跨包引用
json
// packages/ui/package.json
{
"name": "@repo/ui",
"version": "0.0.0",
"main": "./src/index.ts",
"types": "./src/index.ts",
"dependencies": {
"@repo/types": "workspace:*"
}
}
// apps/web/package.json
{
"name": "@repo/web",
"dependencies": {
"@repo/ui": "workspace:*",
"@repo/utils": "workspace:*"
}
}
json
// packages/ui/package.json
{
"name": "@repo/ui",
"version": "0.0.0",
"main": "./src/index.ts",
"types": "./src/index.ts",
"dependencies": {
"@repo/types": "workspace:*"
}
}
// apps/web/package.json
{
"name": "@repo/web",
"dependencies": {
"@repo/ui": "workspace:*",
"@repo/utils": "workspace:*"
}
}
Install all workspace dependencies
Install all workspace dependencies
Add a dependency to a specific package
Add a dependency to a specific package
pnpm add zod --filter @repo/api
pnpm add zod --filter @repo/api
Add a workspace package as dependency
Add a workspace package as dependency
pnpm add @repo/utils --filter @repo/web --workspace
pnpm add @repo/utils --filter @repo/web --workspace
Run a script in a specific package
Run a script in a specific package
pnpm --filter @repo/web dev
pnpm --filter @repo/web dev
Run a script in all packages that have it
Run a script in all packages that have it
List all packages
List all packages
Find All Dependents of a Changed Package
查找变更包的所有依赖项
Using turbo to see what depends on @repo/ui
Using turbo to see what depends on @repo/ui
turbo run build --filter='...@repo/ui' --dry=json |
jq '.tasks[].package' -r | sort -u
turbo run build --filter='...@repo/ui' --dry=json |
jq '.tasks[].package' -r | sort -u
Manual: search for imports of a package
Manual: search for imports of a package
grep -r "from '@repo/ui'" apps/ packages/ --include=".ts" --include=".tsx" -l
grep -r "from '@repo/ui'" apps/ packages/ --include=".ts" --include=".tsx" -l
Dependency Graph Visualization
依赖图可视化
Generate HTML visualization
Generate HTML visualization
turbo run build --graph=dependency-graph.html
turbo run build --graph=dependency-graph.html
Generate DOT format for custom rendering
Generate DOT format for custom rendering
turbo run build --graph=deps.dot
turbo run build --graph=deps.dot
Quick Mermaid diagram from package.json files
Quick Mermaid diagram from package.json files
echo "graph TD"
for pkg in packages//package.json apps//package.json; do
name=$(jq -r '.name' "$pkg")
jq -r '.dependencies // {} | keys[] | select(startswith("@repo/"))' "$pkg" | while read dep; do
echo " $name --> $dep"
done
done
echo "graph TD"
for pkg in packages//package.json apps//package.json; do
name=$(jq -r '.name' "$pkg")
jq -r '.dependencies // {} | keys[] | select(startswith("@repo/"))' "$pkg" | while read dep; do
echo " $name --> $dep"
done
done
Turborepo Remote Cache (Vercel)
Turborepo远程缓存(Vercel版)
Login to Vercel (one-time)
Login to Vercel (one-time)
Link repo to Vercel team
Link repo to Vercel team
CI: set environment variables
CI: set environment variables
TURBO_TOKEN=<vercel-token>
TURBO_TOKEN=<vercel-token>
TURBO_TEAM=<team-slug>
TURBO_TEAM=<team-slug>
Verify remote cache works
Verify remote cache works
turbo run build --summarize
turbo run build --summarize
Look for "Remote cache: hit" entries
Look for "Remote cache: hit" entries
Self-Hosted Remote Cache
自托管远程缓存
Using ducktape/turborepo-remote-cache
Using ducktape/turborepo-remote-cache
docker run -p 3000:3000
-e STORAGE_PROVIDER=local
-e STORAGE_PATH=/cache
ducktape/turborepo-remote-cache
docker run -p 3000:3000
-e STORAGE_PROVIDER=local
-e STORAGE_PATH=/cache
ducktape/turborepo-remote-cache
Configure turbo to use it
Configure turbo to use it
CI/CD with Affected Packages Only
仅针对受影响包的CI/CD
.github/workflows/ci.yml
.github/workflows/ci.yml
name: CI
on:
pull_request:
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # needed for --filter comparisons
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
# Only lint/test/build affected packages
- run: turbo run lint test build --filter='...[origin/main]'
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
name: CI
on:
pull_request:
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # needed for --filter comparisons
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
# Only lint/test/build affected packages
- run: turbo run lint test build --filter='...[origin/main]'
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
Publishing with Changesets
使用Changesets发布
Install changesets
Install changesets
pnpm add -D -w @changesets/cli @changesets/changelog-github
pnpm add -D -w @changesets/cli @changesets/changelog-github
.changeset/config.json
.changeset/config.json
json
{
"$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json",
"changelog": ["@changesets/changelog-github", { "repo": "org/repo" }],
"commit": false,
"fixed": [],
"linked": [["@repo/ui", "@repo/utils"]],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch"
}
json
{
"$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json",
"changelog": ["@changesets/changelog-github", { "repo": "org/repo" }],
"commit": false,
"fixed": [],
"linked": [["@repo/ui", "@repo/utils"]],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch"
}
1. Developer adds a changeset for their changes
1. 开发者为其变更新增changeset记录
Interactive: select packages, bump type (patch/minor/major), summary
交互式操作:选择包、版本升级类型(补丁/次版本/主版本)、填写变更摘要
2. Before release: consume changesets and bump versions
2. 发布前:消费changeset记录并升级版本号
Updates package.json versions and CHANGELOG.md files
自动更新package.json版本号和CHANGELOG.md文件
3. Publish to npm
3. 发布到npm
Replaces workspace:* with real versions and publishes
自动替换workspace:*为真实版本号后发布
Migration: Multi-Repo to Monorepo
迁移:从多仓库到Monorepo
1. Preserve git history using filter-repo
1. 使用filter-repo保留Git历史
In each source repo:
在每个源仓库中执行:
git filter-repo --to-subdirectory-filter packages/ui
git filter-repo --to-subdirectory-filter apps/api
git filter-repo --to-subdirectory-filter packages/ui
git filter-repo --to-subdirectory-filter apps/api
2. Create monorepo and merge histories
2. 创建monorepo并合并历史
mkdir monorepo && cd monorepo && git init
git remote add ui ../old-ui-repo
git fetch ui --no-tags
git merge ui/main --allow-unrelated-histories
git remote add api ../old-api-repo
git fetch api --no-tags
git merge api/main --allow-unrelated-histories
mkdir monorepo && cd monorepo && git init
git remote add ui ../old-ui-repo
git fetch ui --no-tags
git merge ui/main --allow-unrelated-histories
git remote add api ../old-api-repo
git fetch api --no-tags
git merge api/main --allow-unrelated-histories
3. Set up workspace configuration
3. 配置工作区
Add pnpm-workspace.yaml, turbo.json, root package.json
新增pnpm-workspace.yaml、turbo.json、根package.json
4. Update internal imports
4. 更新内部导入路径
Change "ui-package" imports to "@repo/ui"
将"ui-package"导入改为"@repo/ui"
Change npm versions to "workspace:*"
将npm版本号改为"workspace:*"
pnpm install
turbo run build test
pnpm install
turbo run build test
| Pitfall | Fix |
|---|
| Running without on every PR | Always use --filter='...[origin/main]'
in CI |
| breaks npm publish | Use which replaces automatically |
| All packages rebuild when unrelated file changes | Tune in turbo.json to exclude docs, config files |
| Shared tsconfig breaks type-checks across packages | Each package extends root but overrides / |
| Git history lost during migration | Use git filter-repo --to-subdirectory-filter
before merging |
| Remote cache misses in CI | Verify TURBO_TOKEN and TURBO_TEAM; check with |
| Import cycles between packages | Use to detect; refactor shared code to a new package |
| 陷阱 | 修复方案 |
|---|
| 每个PR都执行不带的 | CI中始终使用--filter='...[origin/main]'
|
| 导致npm发布失败 | 使用会自动替换该标识 |
| 无关文件变更触发所有包重建 | 调整turbo.json中的配置,排除文档、配置文件 |
| 共享tsconfig导致跨包类型检查失败 | 每个包的配置继承根配置,同时单独覆写/ |
| 迁移过程中丢失Git历史 | 合并前使用git filter-repo --to-subdirectory-filter
处理 |
| CI中远程缓存未命中 | 验证TURBO_TOKEN和TURBO_TEAM配置,使用排查 |
| 包间存在循环依赖 | 使用检测,将共享代码抽离为新的无内部依赖包 |
- Root package.json has no runtime dependencies — only devDependencies and scripts
- Always scope commands with --filter in CI — running everything defeats the monorepo purpose
- Remote cache is not optional — without it, monorepo CI is slower than multi-repo
- Shared configs extend from root — tsconfig.base.json, eslint.base.js, vitest shared config
- is pure TypeScript — no runtime code, no dependencies, fastest to build
- Changesets over manual versioning — never hand-edit package.json versions in a monorepo
- Impact analysis before merging shared package changes — check affected packages, communicate blast radius
- Keep workspace: for internal deps* — real version ranges are for external npm packages only
- 根package.json不存放运行时依赖 —— 仅存放开发依赖和脚本
- CI中始终用--filter限定命令范围 —— 全量执行违背monorepo的设计初衷
- 远程缓存是必备能力 —— 没有远程缓存的monorepo CI比多仓架构更慢
- 共享配置从根配置继承 —— 包括tsconfig.base.json、eslint.base.js、vitest共享配置
- 仅存放纯TypeScript定义 —— 无运行时代码、无依赖,构建速度最快
- 优先使用Changesets而非手动版本管理 —— 不要在monorepo中手动编辑package.json的版本号
- 合并共享包变更前先做影响分析 —— 检查受影响包,同步变更的影响范围
- *内部依赖始终使用workspace:标识 —— 真实版本范围仅用于外部npm包
| Problem | Cause | Solution |
|---|
| rebuilds everything despite no changes | Inputs glob is too broad or includes volatile files | Narrow in turbo.json; exclude , docs, and test fixtures from build inputs |
| on install | Peer dependency mismatches across workspace packages | Add peerDependencyRules.ignoreMissing
or peerDependencyRules.allowAny
in root or |
| Remote cache reports 0% hit rate in CI | TURBO_TOKEN or TURBO_TEAM not set, or / changed between runs | Verify env vars with turbo run build --summarize
; ensure inputs/outputs are stable across branches |
| version appears in published package | Published with or instead of Changesets | Always use which replaces with resolved versions automatically |
| Circular dependency detected between packages | Two packages import from each other directly | Run to identify the cycle; extract shared code into a new leaf package with no internal deps |
TypeScript Cannot find module '@repo/ui'
in IDE | IDE TypeScript server not resolving workspace paths | Add mapping in root or use TypeScript project references; restart TS server after changes |
| CI takes longer after monorepo migration than multi-repo | Missing remote cache, no , or preventing git comparisons | Enable remote caching, use --filter='...[origin/main]'
, and set in checkout action |
| 问题 | 原因 | 解决方案 |
|---|
| 无任何变更时仍触发全量重建 | Inputs glob规则太宽泛,或包含易变文件 | 缩小turbo.json中的范围,将.env、文档、测试 Mock 文件从构建输入中排除 |
| 安装时出现报错 | 工作区包间的peer依赖版本不匹配 | 在根或中添加peerDependencyRules.ignoreMissing
或peerDependencyRules.allowAny
配置 |
| CI中远程缓存命中率为0% | 未配置TURBO_TOKEN或TURBO_TEAM,或两次运行的/发生变更 | 使用turbo run build --summarize
验证环境变量,确保不同分支的inputs/outputs配置一致 |
| 已发布的包中出现版本标识 | 使用或而非Changesets发布 | 始终使用,会自动将替换为解析后的真实版本号 |
| 检测到包间循环依赖 | 两个包直接互相导入 | 运行定位循环依赖,将共享代码抽离为无内部依赖的新叶子包 |
IDE中TypeScript报错Cannot find module '@repo/ui'
| IDE的TypeScript服务未解析工作区路径 | 在根中添加映射,或使用TypeScript项目引用,变更后重启TS服务 |
| 迁移到monorepo后CI耗时比多仓更长 | 未启用远程缓存、未加参数,或导致Git对比失效 | 开启远程缓存,使用--filter='...[origin/main]'
,并在checkout action中设置 |
- Build time reduction: CI pipeline completes affected-only builds in under 50% of full-build time within 2 weeks of adoption
- Cache hit rate: Remote cache achieves 70%+ hit rate on PR builds after initial warm-up period
- Impact visibility: Every PR includes an affected-packages summary showing blast radius of changes
- Zero full rebuilds in CI: No CI workflow runs all packages unconditionally; every pipeline uses or equivalent
- Publishing reliability: Changesets workflow produces correct versions and changelogs with zero manual edits per release cycle
- Migration completeness: Multi-repo to monorepo migration preserves 100% of git history for all migrated packages
- Developer onboarding: New team members can run, build, and test any package locally within 15 minutes using documented workspace commands
- 构建时长缩减:落地后2周内,CI流水线的仅受影响包构建耗时低于全量构建耗时的50%
- 缓存命中率:预热完成后,PR构建的远程缓存命中率达到70%以上
- 影响可见性:每个PR都附带受影响包摘要,展示变更的影响半径
- 无全量CI构建:没有CI工作流无条件运行全量包任务,所有流水线都使用或等效规则
- 发布可靠性:Changesets工作流可生成正确的版本号和更新日志,每个发布周期无需手动编辑
- 迁移完整性:多仓到monorepo的迁移100%保留所有迁移包的Git历史
- 开发者上手速度:新团队成员可通过文档中的工作区命令,在15分钟内完成任意包的本地运行、构建和测试
This skill covers:
- Turborepo, Nx, and pnpm workspace configuration and optimization
- Cross-package dependency analysis and impact visualization
- Remote caching setup (Vercel, Nx Cloud, self-hosted)
- Changesets-based coordinated versioning and npm publishing
This skill does NOT cover:
- Application-level build configuration (webpack, Vite, esbuild internals) — see
- CI/CD pipeline design beyond monorepo-specific filters — see
- Git branching strategies and release flow — see
- Dependency vulnerability scanning and license auditing — see
本技能覆盖:
- Turborepo、Nx、pnpm工作区的配置与优化
- 跨包依赖分析与影响可视化
- 远程缓存搭建(Vercel、Nx Cloud、自托管)
- 基于Changesets的协同版本管理与npm发布
本技能不覆盖:
- 应用层面的构建配置(webpack、Vite、esbuild内部逻辑)—— 参考
- 超出monorepo专属过滤规则的CI/CD流水线设计 —— 参考
- Git分支策略与发布流程 —— 参考
- 依赖漏洞扫描与许可证审计 —— 参考
| Skill | Integration | Data Flow |
|---|
| Monorepo-aware CI workflows use flags and remote caching tokens | Monorepo Navigator defines filter patterns and cache config that CI pipelines consume |
| Changesets versioning feeds into release orchestration and tag management | Release Manager triggers and as part of release flow |
| Workspace dependency graph informs vulnerability and license scanning scope | Monorepo Navigator exports the package dependency tree that Dependency Auditor analyzes |
| Build profiling data identifies slow packages for optimization | Performance Profiler measures per-package build times surfaced by Turborepo |
| Changesets produce per-package changelogs consumed by release notes | Changeset summaries flow into Changelog Generator for formatted release documentation |
| Cross-package coupling and circular dependencies surface as tracked tech debt items | Monorepo Navigator's impact analysis identifies coupling hotspots that Tech Debt Tracker records |
| 技能 | 集成方式 | 数据流 |
|---|
| 感知monorepo的CI工作流使用参数和远程缓存Token | Monorepo导航器定义CI流水线消费的过滤规则和缓存配置 |
| Changesets版本管理能力接入发布编排和标签管理 | 发布管理器作为发布流程的一部分,触发和命令 |
| 工作区依赖图为漏洞和许可证扫描提供范围 | Monorepo导航器导出包依赖树,供依赖审计器分析 |
| 构建性能数据定位需要优化的慢包 | 性能分析器测量Turborepo输出的单包构建时长 |
| Changesets生成的单包更新日志供发布说明消费 | Changeset摘要流入更新日志生成器,用于生成格式化的发布文档 |
| 跨包耦合和循环依赖作为技术债务项跟踪 | Monorepo导航器的影响分析识别耦合热点,供技术债务跟踪器记录 |