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 pnpmHow to use pnpm
- 1.Install pnpm globally or use npx to run commands
- 2.Create pnpm-workspace.yaml in your monorepo root listing package directories
- 3.Define catalogs in pnpm-workspace.yaml for shared dependency versions
- 4.Update package.json files to use workspace: protocol for internal packages and catalog: for shared deps
- 5.Run pnpm install to verify workspace setup and install all dependencies
- 6.Use pnpm -r run <script> to execute commands across all packages or pnpm --filter <package> for specific packages
Use cases
- 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
- 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
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.
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.
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.
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.
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
| Task | File |
|---|---|
| Commands, scripts, filtering | cli.md |
| Workspaces, catalogs, config | workspaces.md |
| Overrides, patches, hooks, store | features.md |
| CI/CD, Docker, migration | ci.md |
Loading Files
Consider loading these reference files based on your task:
- references/cli.md - if using pnpm commands, scripts, or filtering
- references/workspaces.md - if setting up monorepo, catalogs, or workspace config
- references/features.md - if using overrides, patches, hooks, or managing store
- references/ci.md - if configuring CI/CD, Docker, or migrating from npm/yarn
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-libraryskill for library patterns - Build tooling → Use
tsdownorviteskills
Related skills
More from onmax/nuxt-skills and the wider catalog.

reka-ui
Unstyled, accessible Vue 3 component primitives with WAI-ARIA compliance and composition patterns.

tresjs
Use when building 3D scenes with TresJS (Vue Three.js) - provides TresCanvas, composables (useTres, useLoop), Cientos helpers (OrbitControls, useGLTF, Environment), and post-processing effects

ts-library
Author TypeScript libraries with dual CJS/ESM, type-safe APIs, and modern build tooling.

tsdown
Use when bundling TypeScript libraries - provides tsdown configuration, dual ESM/CJS output, .d.ts generation, package validation, and plugin authoring

vitest
Vite-native testing framework with Jest-compatible API for unit and integration tests

vue
Vue 3 Composition API patterns, component architecture, and testing reference for .vue files and composables.