npx skills add https://github.com/hairyf/skills --skill pnpmpnpm 是一个快速、节省磁盘空间的包管理器。它使用内容寻址存储来对计算机上所有项目中的包进行去重,从而显著节省磁盘空间。pnpm 默认强制执行严格的依赖解析,防止出现幻影依赖。对于 pnpm 特有的配置,建议优先放置在 pnpm-workspace.yaml 文件中。
重要提示: 在处理 pnpm 项目时,智能体应检查 pnpm-workspace.yaml 和 .npmrc 文件以了解工作区结构和配置。在 CI 环境中,请始终使用 --frozen-lockfile 参数。
此技能基于 pnpm 10.x 版本,生成于 2026-02-01。
| 主题 | 描述 | 参考链接 |
|---|---|---|
| 安装 | 独立脚本、Corepack、npm、系统包管理器 | core-installation |
| CLI 命令 | install、add、remove、update、run、exec、dlx 以及工作区命令 |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| core-cli |
| 配置 | pnpm-workspace.yaml、.npmrc 设置以及 package.json 字段 | core-config |
| 工作区 | 支持单仓库,包含筛选、工作区协议和共享锁文件 | core-workspaces |
| 存储 | 内容寻址存储、硬链接和磁盘效率 | core-store |
| 包源 | npm、JSR、工作区、Git、tarball——可信源和外部源 | core-package-sources |
| 错误 | 常见错误代码及解决方法 | core-errors |
| 主题 | 描述 | 参考链接 |
|---|---|---|
| 筛选 | 用于 --filter 的丰富选择器语法(依赖项、被依赖项、已更改项、通配符) | features-filtering |
| 目录 | 为工作区集中管理依赖版本 | features-catalogs |
| 覆盖 | 强制指定依赖(包括传递依赖)的特定版本 | features-overrides |
| 补丁 | 通过自定义修复修改第三方包 | features-patches |
| 别名 | 使用 npm: 协议以自定义名称安装包 | features-aliases |
| 钩子 | 使用 .pnpmfile.cjs 钩子自定义解析过程 | features-hooks |
| 对等依赖 | 自动安装、严格模式和依赖规则 | features-peer-deps |
| 配置依赖 | 跨项目共享钩子、目录、补丁 | features-config-dependencies |
| Git 分支锁文件 | 特定分支的锁文件,避免合并冲突 | features-git-branch-lockfiles |
| 变更集 | 单仓库版本管理和发布 | features-changesets |
| 供应链安全 | allowBuilds、blockExoticSubdeps、trustPolicy | features-supply-chain-security |
| 查找器 | 按包属性搜索依赖图(v10.16+) | features-finders |
| 补全 | Shell 标签补全(Bash、Zsh、Fish) | features-completion |
| 脚本 | 生命周期脚本和 pnpm:devPreinstall | features-scripts |
| 缓存 | 元数据缓存命令(list、view、delete) | features-cache |
| Node.js 环境 | 管理 Node.js 版本(pnpm env use/add/remove) | features-env |
| 发布与部署 | 用于 Docker 和注册表的 publish、pack、deploy、fetch | features-publish-deploy |
| 主题 | 描述 | 参考链接 |
|---|---|---|
| CI/CD 设置 | GitHub Actions、GitLab CI、Docker 和缓存策略 | best-practices-ci |
| Docker | BuildKit 缓存、pnpm fetch、用于单仓库的 pnpm deploy | best-practices-docker |
| 生产环境 | 锁文件部署、离线安装 | best-practices-production |
| 仅允许 pnpm | 使用 preinstall 脚本强制使用 pnpm(only-allow) | best-practices-only-allow-pnpm |
| TypeScript | preserveSymlinks、packageExtensions、@pnpm/plugin-types-fixer | best-practices-typescript |
| Podman | Btrfs 引用链接、存储和 node_modules 卷挂载 | best-practices-podman |
| Git | 锁文件提交和合并冲突解决 | best-practices-git |
| 迁移 | 从 npm/Yarn 迁移、处理幻影依赖、单仓库迁移 | best-practices-migration |
| 性能 | 安装优化、存储缓存、工作区并行化 | best-practices-performance |
| 主题 | 描述 | 参考链接 |
|---|---|---|
| 限制 | npm 锁文件被忽略,二进制存根是 shell 脚本 | advanced-limitations |
每周安装量
120
仓库
GitHub 星标数
6
首次出现
2026 年 1 月 29 日
安全审计
已安装于
cursor119
claude-code89
opencode49
gemini-cli49
github-copilot48
codex48
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-02-01.
| Topic | Description | Reference |
|---|---|---|
| Installation | Standalone script, Corepack, npm, system package managers | core-installation |
| 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 |
| Package Sources | npm, JSR, workspace, Git, tarball—trusted and exotic sources | core-package-sources |
| Errors | Common error codes and resolutions | core-errors |
| Topic | Description | Reference |
|---|---|---|
| Filtering | Rich selector syntax for --filter (deps, dependents, changed, globs) | features-filtering |
| 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 |
| Topic | Description | Reference |
|---|---|---|
| CI/CD Setup | GitHub Actions, GitLab CI, Docker, and caching strategies | best-practices-ci |
| Docker | BuildKit cache, pnpm fetch, pnpm deploy for monorepos | best-practices-docker |
| Production | Lockfile deployment, offline install | best-practices-production |
| Only Allow pnpm | Enforce pnpm with preinstall (only-allow) | best-practices-only-allow-pnpm |
| TypeScript | preserveSymlinks, packageExtensions, @pnpm/plugin-types-fixer | best-practices-typescript |
| Podman |
| Topic | Description | Reference |
|---|---|---|
| Limitations | npm lockfile ignored, binstubs are shell scripts | advanced-limitations |
Weekly Installs
120
Repository
GitHub Stars
6
First Seen
Jan 29, 2026
Security Audits
Gen Agent Trust HubFailSocketPassSnykWarn
Installed on
cursor119
claude-code89
opencode49
gemini-cli49
github-copilot48
codex48
LarkSuite Whiteboard CLI 工具:自动化生成专业图表与画板,支持DSL和Mermaid
33,600 周安装
| features-hooks |
| Peer Dependencies | Auto-install, strict mode, and dependency rules | features-peer-deps |
| Config Dependencies | Share hooks, catalogs, patches across projects | features-config-dependencies |
| Git Branch Lockfiles | Branch-specific lockfiles to avoid merge conflicts | features-git-branch-lockfiles |
| Changesets | Monorepo versioning and publishing | features-changesets |
| Supply Chain Security | allowBuilds, blockExoticSubdeps, trustPolicy | features-supply-chain-security |
| Finders | Search dependency graph by package properties (v10.16+) | features-finders |
| Completion | Shell tab completion (Bash, Zsh, Fish) | features-completion |
| Scripts | Lifecycle scripts and pnpm:devPreinstall | features-scripts |
| Cache | Metadata cache commands (list, view, delete) | features-cache |
| Node.js Env | Manage Node.js versions (pnpm env use/add/remove) | features-env |
| Publish & Deploy | publish, pack, deploy, fetch for Docker and registry | features-publish-deploy |
| Btrfs reflinks, store and node_modules volume mounts |
| best-practices-podman |
| Git | Lockfile commit and merge conflict resolution | best-practices-git |
| Migration | Migrating from npm/Yarn, handling phantom deps, monorepo migration | best-practices-migration |
| Performance | Install optimizations, store caching, workspace parallelization | best-practices-performance |