by antfu
手动管理 Node.js 依赖既耗时又容易出错。pnpm 技能为 Claude 提供了全面的 pnpm 命令、工作区配置、目录、补丁、覆盖以及 monorepo 工作流最佳实践的知识。
1. 打开 Claude 聊天界面
2. 点击下方 "📋 复制" 按钮
3. 粘贴到 Claude 聊天框中并发送
4. 输入 "使用 pnpm 技能" 开始使用
=== pnpm 技能 === 作者: antfu 描述: 手动管理 Node.js 依赖既耗时又容易出错。pnpm 技能为 Claude 提供了全面的 pnpm 命令、工作区配置、目录、补丁、覆盖以及 monorepo 工作流最佳实践的知识。 使用方法: 1. 调用技能: "使用 pnpm 技能" 2. 提供相关信息: 根据技能要求提供必要参数 3. 查看结果: 技能会返回处理结果 示例: "使用 pnpm 技能,帮我分析一下这段代码"
这种方法适用于所有 Claude 用户,不需要安装额外工具。
productivity
low
pnpm is a fast, disk space efficient package manager. It uses a content-addressable store to deduplicate packages across all projects on a machine, saving significant disk space. pnpm enforces strict dependency resolution by default, preventing phantom dependencies. Configuration should preferably be placed in pnpm-workspace.yaml for pnpm-specific settings.
Important: When working with pnpm projects, agents should check for pnpm-workspace.yaml and .npmrc files to understand workspace structure and configuration. Always use --frozen-lockfile in CI environments.
The skill is based on pnpm 10.x, generated at 2026-01-28.
| Topic | Description | Reference |
|---|---|---|
| CLI Commands | Install, add, remove, update, run, exec, dlx, and workspace commands | core-cli |
| Configuration | pnpm-workspace.yaml, .npmrc settings, and package.json fields | core-config |
| Workspaces | Monorepo support with filtering, workspace protocol, and shared lockfile | core-workspaces |
| Store | Content-addressable storage, hard links, and disk efficiency | core-store |
| Topic | Description | Reference |
|---|---|---|
| Catalogs | Centralized dependency version management for workspaces | features-catalogs |
| Overrides | Force specific versions of dependencies including transitive | features-overrides |
| Patches | Modify third-party packages with custom fixes | features-patches |
| Aliases | Install packages under custom names using npm: protocol | features-aliases |
| Hooks | Customize resolution with .pnpmfile.cjs hooks | features-hooks |
| Peer Dependencies | Auto-install, strict mode, and dependency rules | features-peer-deps |
| Topic | Description | Reference |
|---|---|---|
| CI/CD Setup | GitHub Actions, GitLab CI, Docker, and caching strategies | best-practices-ci |
| Migration | Migrating from npm/Yarn, handling phantom deps, monorepo migration | best-practices-migration |
| Performance | Install optimizations, store caching, workspace parallelization | best-practices-performance |
View Count
0
Download Count
0
Favorite Count
0
Quality Score
65