pnpm
Installation
SKILL.md
pnpm Documentation Skill
Overview
pnpm is a fast, disk-efficient package manager for JavaScript and Node.js. It uses a content-addressable store to share dependencies across projects, saving disk space and boosting installation speed. pnpm creates a non-flat node_modules directory structure that prevents phantom dependencies, and has built-in support for workspaces (monorepos), catalogs, patching, filtering, and more.
Key Benefits
- Disk efficient — content-addressable store with hard links; shared dependencies across projects
- Fast installations — three-stage installation: resolution, directory structure calculation, linking
- Strict node_modules — non-flat structure prevents access to undeclared dependencies
- Workspace support — built-in monorepo support with
pnpm-workspace.yaml, workspace protocol - Catalogs — reusable dependency version constants across workspace packages
- Filtering — rich
--filterselector syntax for targeting packages by name, relation, or changes - Security — build script approval, trust policies, minimum release age, audit, SBOM generation
- Patching — first-class
pnpm patchcommand for modifying dependencies - Runtime management — built-in Node.js/Deno/Bun runtime installation via
devEngines - CLI aliases —
pnshorthand forpnpm,pnxforpnpm dlx