PluginBench
Skill
Review
Audit score 70

pnpm

onmax/nuxt-skills

Manage Node.js dependencies with pnpm—monorepos, workspaces, catalogs, and supply chain security.

What is pnpm?

pnpm is a fast, disk-efficient package manager for Node.js with strict dependency resolution, monorepo workspace support, and advanced features like catalogs and package patching. Use it when you need reliable dependency management, workspace coordination, or supply chain security hardening.

  • Install and manage npm packages with content-addressable store efficiency
  • Set up monorepo workspaces with multiple packages and apps
  • Configure pnpm catalogs for centralized version management across workspaces
  • Override transitive dependencies and resolve conflicts
  • Patch third-party packages without forking
  • Configure CI/CD pipelines optimized for pnpm projects

How to install pnpm

npx skills add https://github.com/onmax/nuxt-skills --skill pnpm
Claude Code
Cursor
Windsurf
Cline

How to use pnpm

  1. 1.Install pnpm globally or use npx to run commands
  2. 2.Create pnpm-workspace.yaml in your monorepo root listing package directories
  3. 3.Define catalogs in pnpm-workspace.yaml for shared dependency versions
  4. 4.Update package.json files to use workspace: protocol for internal packages and catalog: for shared deps
  5. 5.Run pnpm install to verify workspace setup and install all dependencies
  6. 6.Use pnpm -r run <script> to execute commands across all packages or pnpm --filter <package> for specific packages

Use cases

Good for
  • Setting up a monorepo with shared utilities and multiple applications
  • Centralizing dependency versions across workspace packages using catalogs
  • Resolving transitive dependency conflicts with overrides
  • Patching vulnerable or broken third-party packages in production
  • Migrating from npm or yarn to pnpm for faster installs and better disk usage
Who it's for
  • Full-stack developers managing monorepos
  • DevOps engineers configuring CI/CD for Node.js projects
  • Library maintainers coordinating multiple packages
  • Teams prioritizing disk efficiency and install speed

pnpm FAQ

What's the difference between pnpm and npm?

pnpm uses a content-addressable store (saving disk space), enforces strict dependency resolution (preventing hidden dependencies), and has native monorepo support with workspaces and catalogs. npm installs dependencies flat and allows implicit access to transitive deps.

How do I use the workspace protocol?

In package.json dependencies, use workspace:^ or workspace:* to reference other packages in your monorepo. pnpm automatically resolves these to local packages during development and converts them to proper versions for publishing.

What are catalogs and when should I use them?

Catalogs centralize version definitions in pnpm-workspace.yaml so all packages can reference the same dependency versions. Use them to keep react, typescript, or other shared deps in sync across your monorepo.

Can I patch third-party packages?

Yes, pnpm supports patching via pnpm patch <package> which creates a patch file. This lets you fix bugs or security issues in dependencies without waiting for upstream releases.

How do I migrate from npm or yarn to pnpm?

Install pnpm, delete node_modules and lock files, run pnpm install to generate pnpm-lock.yaml, then verify with pnpm ls --depth 0 and pnpm -r run build.

Full instructions (SKILL.md)

Source of truth, from onmax/nuxt-skills.


name: pnpm description: 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 license: MIT

pnpm

Content-addressable store, strict deps, workspace protocol, catalogs.

When to Use

  • Installing/managing npm packages
  • Monorepo workspace setup with catalogs
  • Overriding transitive dependencies
  • Patching third-party packages
  • CI/CD configuration for pnpm projects
  • Supply chain security hardening

Quick Start

pnpm install                      # Install deps
pnpm add <pkg>                    # Add dep
pnpm add -D <pkg>                 # Dev dep
pnpm -r run build                 # Run in all packages
pnpm --filter @myorg/app build    # Run in specific package

Workspace Setup

# pnpm-workspace.yaml
packages:
  - 'packages/*'
  - 'apps/*'

# Catalogs for centralized version management
catalog:
  react: ^18.2.0
  typescript: ~5.3.0
// package.json - Use workspace protocol and catalogs
{
  "packageManager": "pnpm@10.28.2",
  "dependencies": {
    "@myorg/utils": "workspace:^",
    "react": "catalog:"
  }
}

Reference Files

TaskFile
Commands, scripts, filteringcli.md
Workspaces, catalogs, configworkspaces.md
Overrides, patches, hooks, storefeatures.md
CI/CD, Docker, migrationci.md

Loading Files

Consider loading these reference files based on your task:

DO NOT load all files at once. Load only what's relevant to your current task.

Verify Setup

After configuring a workspace, verify it works:

pnpm install          # Install all deps
pnpm ls --depth 0     # Verify workspace links
pnpm -r run build     # Build all packages

Cross-Skill References

  • TypeScript libs → Use ts-library skill for library patterns
  • Build tooling → Use tsdown or vite skills