pnpm

Manage Node.js dependencies with pnpm workspaces, catalogs, patches, and overrides.

Updated Aug 22, 2026
One-click install
npx skills add https://github.com/falentio/cimi --skill pnpm-falentio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pnpm
Source: https://github.com/falentio/cimi/tree/main/.agents/skills/skills/pnpm
Command: npx skills add https://github.com/falentio/cimi --skill pnpm-falentio

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Managing Node.js dependencies across projects and monorepos often leads to phantom dependencies, duplicated packages, inconsistent versions, and slow CI installs. This Skill provides authoritative guidance on pnpm so agents can correctly configure workspaces, enforce strict dependency resolution, and optimize installs. ## Core Features & Use Cases - CLI & Workspace Operations: Covers install, add, remove, update, run, exec, dlx, and monorepo filtering with the workspace protocol and shared lockfiles. - Configuration & Store Management: Explains pnpm-workspace.yaml, .npmrc settings, the content-addressable store, and node-linker modes for disk efficiency. - Advanced Features: Documents catalogs for centralized version management, overrides for forcing transitive dependency versions, patches for modifying third-party packages, aliases, hooks, and peer dependency rules. - Use Case: When migrating a monorepo from npm or Yarn to pnpm, use this Skill to convert lockfiles, set up pnpm-workspace.yaml with catalogs, handle phantom dependency errors, and configure CI with --frozen-lockfile and store caching. ## Quick Start Ask the agent to help you migrate your project from npm to pnpm and configure a pnpm workspace with a shared catalog for React.

Frequently Asked Questions about pnpm

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate a project from npm or Yarn to pnpm?

Delete node_modules and the old lockfile, then run pnpm install, or use pnpm import to convert package-lock.json or yarn.lock into pnpm-lock.yaml. For monorepos, create a pnpm-workspace.yaml and convert internal dependencies to the workspace: protocol.

How do I manage shared dependency versions in a pnpm monorepo?

Define versions once in the catalog section of pnpm-workspace.yaml, then reference them in package.json with "catalog:". Named catalogs support multiple version variants, and catalog references are replaced with real versions when publishing.

Why does pnpm fail with missing dependency errors after migrating from npm?

pnpm enforces strict dependency resolution, so phantom dependencies that npm hoisted are no longer accessible. Add each imported package explicitly with pnpm add, or temporarily use node-linker=hoisted in .npmrc for compatibility.

How do I patch a third-party package with pnpm?

Run pnpm patch <pkg>@<version> to open an editable copy, make your changes, then run pnpm patch-commit with the printed path. pnpm creates a .patch file in patches/ and records it under patchedDependencies in package.json.

What pnpm settings should I use in CI pipelines?

Always run pnpm install --frozen-lockfile so builds fail if the lockfile is out of date. Cache the pnpm store directory, pin the version with the packageManager field and Corepack, and use --filter to build only changed workspace packages.

When should I use pnpm overrides instead of catalogs?

Use overrides to force versions of any dependency including transitive ones, such as fixing a security vulnerability deep in the tree. Use catalogs for centralized management of direct dependencies that packages explicitly opt into with catalog: references.