技能详情(站内镜像,无评论)
作者:Bovin Phang @bovinphang
许可证:MIT-0
MIT-0 ·免费使用、修改和重新分发。无需归因。
版本:v1.0.0
统计:⭐ 0 · 20 · 0 current installs · 0 all-time installs
⭐ 0
安装量(当前) 0
🛡 VirusTotal :良性 · OpenClaw :良性
Package:bovinphang/monorepo-project-standard
安全扫描(ClawHub)
- VirusTotal :良性
- OpenClaw :良性
OpenClaw 评估
The skill is an instruction-only guideline for monorepos (pnpm/Turborepo/Nx); its contents, scope, and requirements are internally consistent and do not request secrets or install code.
目的
The SKILL.md content matches the name/description: it provides directory layouts, dependency rules, and task configuration for pnpm workspaces, Turborepo, and Nx. Minor note: the instructions assume tools like pnpm, turbo, and nx are present (they appear in example commands), but the skill metadata declares no required binaries — this is a small documentation omission rather than an incoherence.
说明范围
The instructions are limited to repo structure, config snippets, dependency rules, and example commands (e.g., `pnpm -r build`, `turbo run build`). They do not ask the agent to read unrelated system files, access credentials, or transmit data to external endpoints.
安装机制
There is no install spec and no code files; the skill is instruction-only, so nothing is downloaded or written to disk by the skill package itself.
证书
The skill requests no environment variables, credentials, or config paths. The guidance and examples do not reference secrets or unrelated services.
持久
The skill is not marked always:true and is user-invocable. It does not request persistent presence or modify other skills. Note: the platform default allows the agent to invoke skills autonomously, but that is normal and not a problem here.
综合结论
This skill is a documentation-style guide for monorepo best practices and appears coherent. Before using it, confirm that any agent actions you allow (e.g., running `pnpm -r build` or `turbo run build`) will run in a safe environment and that the required tools (pnpm, turborepo, Nx) are installed. If you want stricter guarantees, ask the skill author to declare required binaries explicitly. Because the skill can be invoked by an agent, avoid g…
安装(复制给龙虾 AI)
将下方整段复制到龙虾中文库对话中,由龙虾按 SKILL.md 完成安装。
请把本段交给龙虾中文库(龙虾 AI)执行:为本机安装 OpenClaw 技能「Monorepo Project Standard」。简介:Monorepo 项目规范,涵盖 pnpm workspace、Turborepo、Nx 的目录结构、依赖管理、任务编排、包发布。当用户提到 monorepo…。
请 fetch 以下地址读取 SKILL.md 并按文档完成安装:https://raw.githubusercontent.com/openclaw/skills/refs/heads/main/skills/bovinphang/monorepo-project-standard/SKILL.md
(来源:yingzhi8.cn 技能库)
SKILL.md
---
name: monorepo-project-standard
description: Monorepo 项目规范,涵盖 pnpm workspace、Turborepo、Nx 的目录结构、依赖管理、任务编排、包发布。当用户提到 monorepo、workspace、多包、pnpm workspace、Turborepo、Nx 时自动激活。
version: 1.0.0
---
# Monorepo 项目规范
适用于使用 pnpm workspace、Turborepo 或 Nx 的多包前端仓库。
## 适用场景
- 新建或调整 Monorepo 结构
- 管理多包依赖与任务
- 配置 Turborepo / Nx 任务编排
- 包发布与版本管理
## 工具选择
| 工具 | 适用 | 特点 |
|------|------|------|
| **pnpm workspace** | 基础 | 依赖提升、链接、脚本聚合 |
| **Turborepo** | 推荐 | 缓存、并行、依赖图 |
| **Nx** | 大型 | 增量构建、云缓存、插件生态 |
## 目录结构
### pnpm + Turborepo
```
├── package.json # 根 package,workspace 配置
├── pnpm-workspace.yaml # workspace 包列表
├── turbo.json # Turborepo 配置
│
├── apps/
│ ├── web/ # 主应用
│ │ ├── package.json
│ │ └── ...
│ ├── admin/ # 管理后台
│ └── docs/ # 文档站
│
├── packages/
│ ├── ui/ # 共享 UI 组件
│ │ ├── package.json
│ │ └── src/
│ ├── utils/ # 工具函数
│ ├── config-eslint/ # 共享 ESLint 配置
│ └── config-typescript/ # 共享 TS 配置
│
└── tooling/ # 构建/测试工具(可选)
└── scripts/
```
### pnpm-workspace.yaml
```yaml
packages:
- 'apps/*'
- 'packages/*'
```
## 依赖管理
- 内部包使用 `workspace:*` 协议
- 根 `package.json` 统一部分依赖版本,子包可覆盖
- 禁止循环依赖,通过 `pnpm why` 检查
```json
{
"dependencies": {
"@repo/ui": "workspace:*",
"@repo/utils": "workspace:*"
}
}
```
## Turborepo 任务编排
```json
{
"$schema": "https://turbo.build/schema.json",
"tasks": {
"build": {
"dependsOn": ["^build"],
"outputs": ["dist/**", ".next/**"]
},
"lint": {
"dependsOn": ["^build"]
},
"test": {
"dependsOn": ["^build"]
}
}
}
```
- `^build` 表示先执行依赖包的 build
- `outputs` 用于缓存命中判断
## Nx 任务编排
```json
{
"targetDefaults": {
"build": {
"dependsOn": ["^build"],
"outputs": ["{projectRoot}/dist"],
"cache": true
}
}
}
```
## 包命名
- 内部包:`@org/package-name` 或 `@repo/package-name`
- 发布到 npm:遵循 `@scope/name` 规范
## 强约束
- 子包之间通过 `workspace:*` 引用,不发布到 npm 再安装
- 共享配置(ESLint、TS)放在 `packages/config-*`,子包 extends
- 构建顺序由依赖图决定,不手动指定无关依赖
- 根目录执行 `pnpm -r build` 或 `turbo run build` 时,所有包按序构建