Back to Skills

pnpm

Use when managing Node.js dependencies with pnpm - install packages, configure monorepo workspaces, set up pnpm catalogs, resolve dependency conflicts with overrides, patch third-party packages, and configure CI pipelines for pnpm projects

696stars35forksUpdated 8/4/2026

Security Assessment

Safe(95/100)
Security Score95/100

About pnpm

The pnpm skill is a practical reference for managing Node.js dependencies with pnpm, covering package installation, monorepo workspace configuration, pnpm catalogs, dependency overrides, patching third-party packages, and CI pipeline setup. It solves the problem of navigating pnpm's content-addressable store, strict dependency model, workspace protocol, and catalog system, which differ meaningfully from npm and yarn and are easy to misconfigure.

The main document offers a quick-start command set and workspace setup examples, then routes deeper questions to four focused reference files: cli.md for commands, scripts, and filtering; workspaces.md for workspaces, catalogs, and .npmrc configuration; features.md for overrides, patches, hooks, and store management; and ci.md for CI/CD, Docker, and migration. The references are detailed, documenting the workspace protocol variants and how they publish, named and default catalogs with their mode settings, .npmrc hierarchy and settings, the package.json pnpm field (overrides, peerDependencyRules, patchedDependencies, onlyBuiltDependencies), filtering by name, directory, glob, dependency graph, and changed-since-git-ref, and publishing flags. The skill instructs the agent to load only the reference relevant to the current task rather than all files at once, and includes a verification step to confirm a workspace links and builds.

Target users are JavaScript and TypeScript developers and platform engineers working in pnpm-managed repositories, especially monorepos, who need reliable guidance on workspace layout, centralized version management, transitive dependency control, and CI configuration. It also cross-references sibling skills for TypeScript libraries and build tooling.

FAQ

What tasks does this skill cover?

Installing and managing packages, setting up monorepo workspaces with catalogs, overriding transitive dependencies, patching third-party packages, configuring CI/CD for pnpm, and supply-chain hardening.

How are the reference files meant to be used?

Load only the reference relevant to the current task: cli.md for commands and filtering, workspaces.md for workspaces and catalogs, features.md for overrides, patches, hooks, and store, and ci.md for CI/CD, Docker, and migration. The skill explicitly says not to load all files at once.

What are pnpm catalogs?

Catalogs provide centralized version management: you define dependency versions once in pnpm-workspace.yaml and reference them with catalog: in package.json. They reduce version conflicts, simplify upgrades, and cut merge conflicts, and resolve to actual versions on publish.

How do I filter commands to specific packages in a workspace?

Use --filter (or -F) by package name, directory, or glob, and target the dependency graph with syntaxes like ...@scope/app for dependencies, @scope/core... for dependents, and ...[origin/main] for packages changed since a git ref.

How do I verify a workspace is set up correctly?

Run pnpm install, then pnpm ls --depth 0 to confirm workspace links, then pnpm -r run build to build all packages.

All Files

5 files
references/workspaces.md4.2 KB
View
references/cli.md4.0 KB
View
references/features.md4.1 KB
View
SKILL.md2.7 KB
View
references/ci.md4.2 KB
View

Install pnpm

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill