pnpm

Manage Node.js dependencies across monorepos with pnpm-workspace.yaml and .npmrc.

5.7k|318|Updated Jan 28, 2026
One-click install
npx skills add https://github.com/antfu/skills --skill pnpm-antfu
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: pnpm
Source: https://github.com/antfu/skills/tree/main/skills/pnpm
Command: npx skills add https://github.com/antfu/skills --skill pnpm-antfu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

pnpm provides a fast and deterministic way to manage dependencies across single projects and monorepos, eliminating duplication and phantom dependencies.

Core Features & Use Cases

  • Workspace aware: Manage multi-package repos with pnpm-workspace.yaml and the workspace protocol.
  • Catalogs and Overrides: Centralize dependency versions and enforce consistent resolutions across packages.
  • Patches and Hooks: Apply patches, customize resolution, and modify lockfiles to fix issues without upstream changes.
  • Store efficiency: Shared content-addressable store and hard linking reduce disk usage across projects.

Quick Start

Initialize a workspace, install dependencies, and start adding/removing packages with pnpm in a multi-package repository.

Frequently Asked Questions about pnpm

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

FAQPage Schema
How do I manage shared dependencies across multiple packages in a monorepo?▼

Managing shared dependencies in a monorepo uses pnpm workspaces and pnpm-workspace.yaml to centralize multi-package repos. This eliminates dependency duplication and phantom dependencies by applying strict resolution protocols.

What is the best way to enforce consistent dependency versions across a Node workspace?▼

Enforcing consistent dependency versions across a Node workspace uses pnpm catalogs and overrides. Catalogs centralize version definitions while overrides enforce consistent resolutions across all packages.

How does pnpm reduce disk usage for Node projects?▼

pnpm reduces disk usage for Node projects by using a shared content-addressable store and hard linking. This mechanism avoids duplication across multiple projects, saving significant disk space.

Can I apply patches to fix dependency issues without waiting for upstream changes?▼

Applying patches to fix dependency issues without upstream changes is supported through pnpm patches and hooks. This allows modifying lockfiles and customizing resolution to resolve issues directly.

Do I need specific configuration files to use pnpm for workspace dependency management?▼

Using pnpm for workspace dependency management requires a Node environment with pnpm installed. Configuration files such as pnpm-workspace.yaml and .npmrc must be set up to operate properly.