Generated banner for Pnpm
Generated logo for Pnpm

Pnpm

Anthony FuCommunityCreated by Anthony Fu

  • Skill
  • Tool integration
  • Software development
  • MIT
  • Low risk

From the author

Node.js package manager with strict dependency resolution. Use when running pnpm specific commands, configuring workspaces via pnpm-workspace.yaml, or managing dependencies with catalogs, patches, overrides, config dependencies, or the global virtual store.
— the description by Anthony Fu

From the skill’s files

Taken from the skill’s own files (its description, section headings and stated usage). Not an AutoGineer summary, and not written by the author as one.

Node.js package manager with strict dependency resolution. Use when running pnpm specific commands, configuring workspaces via pnpm-workspace.yaml, or managing dependencies with catalogs, patches, overrides, config dependencies, or the global virtual store. pnpm is a fast, disk space efficient package manager. It uses a content-addressable store to deduplicate packages across all projects on a machine, and enforces strict dependency resolution by default, preventing phantom dependencies.

What it does

  • Core
  • Features
  • Best Practices

When to use it

  • Use when running pnpm specific commands, configuring workspaces via pnpm-workspace.yaml, or managing dependencies with catalogs, patches, overrides, config dependencies, or the global virtual store.

Advantages

The skill’s files do not state this.

Usage examples

The skill’s files do not state this.

Install

  1. Download the skill as a ZIP:

    https://autogineer.com/agent-skills/antfu/pnpm/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip pnpm.zip -d .agents/skills

Documentation by Anthony Fu

pnpm is a fast, disk space efficient package manager. It uses a content-addressable store to deduplicate packages across all projects on a machine, and enforces strict dependency resolution by default, preventing phantom dependencies.

pnpm v12 is a Rust rewrite of v11: stable, and keeps v11's commands, flags, settings, and lockfile format — so most guidance here applies to both. A handful of v12 behaviors differ (git deps resolve via HTTPS, project-aware global bins, other package managers, packageImportMethod: auto hardlinks first on Linux) — see best-practices-migration.

Configuration model (important): pnpm settings live in pnpm-workspace.yaml (and the global config.yaml) using camelCase keys. .npmrc is used only for authentication/registry credentials, and the pnpm field of package.json is no longer read. When working in a pnpm project, check pnpm-workspace.yaml for settings/workspace structure and .npmrc only for auth. Always use --frozen-lockfile (or pnpm ci) in CI.

The skill is based on pnpm 12.18, generated at 2026-11-05. It covers v11+v12 behavior (config split, config includes, isolated global packages, allowBuilds, pmOnFail, global virtual store, native release management, workspace task orchestration, and experimental Python/Cargo support) where current docs describe them.

Core

TopicDescriptionReference
CLI Commandsinstall/add/remove/update, run, dlx/pnx, workspace, runtime, publishing (version, view, sbom, stage)core-cli
Configurationpnpm-workspace.yaml settings (camelCase), global config.yaml, config includes, packageConfigs, auth (.npmrc, auth.ini)core-config
WorkspacesMonorepo support: filtering, workspace protocol, shared lockfile, packageConfigscore-workspaces
StoreContent-addressable store, virtual store, node linker modes (incl. loaded/store loader), frozen/read-only storecore-store

Features

TopicDescriptionReference
CatalogsCentralized dependency versions; catalogMode, catalog: in overridesfeatures-catalogs
OverridesForce versions (incl. transitive & peer deps); packageExtensionsfeatures-overrides
PatchesModify third-party packages; patchedDependencies in pnpm-workspace.yamlfeatures-patches
AliasesInstall under custom names (npm:) and registry aliases (namedRegistries)features-aliases
Hooks.pnpmfile.mjs hooks (readPackage, updateConfig, beforePacking), finders, resolvers/fetchersfeatures-hooks
Peer DependenciesAuto-install, strict mode, rules, dedupePeers, peers checkfeatures-peer-deps
Config DependenciesShare hooks/settings/catalogs/patches across repos via configDependenciesfeatures-config-dependencies
Global Virtual Store & ShimsShared node_modules, git-worktree multi-agent setups, isolated global packages, project-aware bins, other package managersfeatures-global-virtual-store
Supply-Chain SecurityBuild approval (allowBuilds), permissions and agent skills, minimumReleaseAge, trustPolicy, lockfile integrityfeatures-supply-chain-security
Task OrchestrationCross-project task graphs (tasks/dependsOn), concurrency groups, priority, pnpm pipelinefeatures-task-orchestration
Release ManagementNative versioning: pnpm change/version -r/lane, lanes, epics, fixed groupsfeatures-versioning
Multi-EcosystemPython (pypi:) and Cargo (crate:) dependencies alongside npm (experimental)features-multi-ecosystem

Best Practices

TopicDescriptionReference
CI/CD SetupGitHub Actions, GitLab, Docker, pnpm ci, store caching, frozen lockfilesbest-practices-ci
Migrationnpm/Yarn → pnpm, phantom deps, and pnpm v10 → v11 → v12 upgrade notesbest-practices-migration
PerformanceInstall optimizations, allowBuilds, global virtual store, workspace parallelizationbest-practices-performance

Files

references/features-config-dependencies.md


name: pnpm-config-dependencies description: Share and centralize pnpm hooks, settings, patches, catalogs, and overrides across repos via config dependencies

pnpm Config Dependencies

Config dependencies are npm packages that pnpm installs before all regular dependencies, so they can supply hooks, settings, patches, catalogs, and overrides that are reused across many repositories. They let you keep one shared "pnpm config" package and consume it everywhere.

Declaring config dependencies

They live in pnpm-workspace.yaml; their integrity is recorded in a dedicated boot document inside pnpm-lock.yaml. They install to node_modules/.pnpm-config/<name>.

configDependencies:
  my-configs: "^1.0.0"

Add one with the --config flag:

pnpm add --config my-configs
pnpm add --config @myorg/pnpm-plugin-my-catalogs

Since v12.12 the saved range follows pnpm add rules (savePrefix, --save-exact); a dist-tag is saved as a range on the resolved version. Remove one by deleting it from configDependencies and running pnpm install (without --frozen-lockfile).

Updating

Since v12.12, pnpm update updates config dependencies like regular ones: pnpm update (newest within range, rewrites range in pnpm-workspace.yaml), --latest, or by name/pattern (pnpm update my-configs). Dist-tag declarations keep tracking the tag (only the lockfile moves). Skipped with --interactive, --patches, --no-save, --filter, dep-group flags (--prod), and when pinned with version+integrity.

Registry and security

Must come from an npm registry and are verified against it before install (offline install of new/changed ones needs cached metadata). minimumReleaseAge applies unless pinned with version+integrity; they install before updateConfig runs, so minimumReleaseAgeExclude added by a hook does not cover them. Since v12.15, bootConfig sets a separate policy for installing them. A config dependency can also supply settings declaratively without a pnpmfile (see config-includes in core-config).

Constraints

  • No regular dependencies. They may declare optionalDependencies, but only one level deep.

  • No lifecycle scripts (preinstall, postinstall, …).

  • optionalDependencies (used for platform-specific binaries, esbuild-style) must use exact versions — ranges/tags fail with ERR_PNPM_CONFIG_DEP_OPTIONAL_NOT_EXACT, keeping installs reproducible.

Auto-loaded plugins

A config dependency named pnpm-plugin-*, @*/pnpm-plugin-*, or @pnpm/plugin-* has its pnpmfile.mjs (or .cjs) loaded automatically from the package root.

Use cases

Import hook logic from a shared package

Because config deps install before the pnpmfile loads, you can import from them:

import { readPackage } from './node_modules/.pnpm-config/my-hooks/index.mjs'

export const hooks = { readPackage }
Share settings & catalogs via updateConfig

A plugin can inject settings/catalog entries through the updateConfig hook:

export const hooks = {
  updateConfig(config) {
    config.catalogs.default ??= {}
    config.catalogs.default['is-odd'] = '1.0.0'
    return config
  }
}

After installing it as a config dependency, consumers can use the catalog:

pnpm add is-odd@catalog:   # installs [email protected], writes "is-odd": "catalog:"
Share patch files

Reference patches stored inside a config dependency:

configDependencies:
  my-patches: "1.0.0"
patchedDependencies:
  react: "node_modules/.pnpm-config/my-patches/react.patch"

Key Points

  • Centralize hooks, settings, catalogs, overrides, and patches in one package, consumed across repos.

  • Declared via configDependencies in pnpm-workspace.yaml; installed before regular deps.

  • No regular dependencies and no lifecycle scripts; optionalDependencies need exact versions.

  • pnpm-plugin-* / @pnpm/plugin-* packages auto-load their pnpmfile.

  • Pair with the updateConfig hook to push settings/catalogs into consuming projects.

<!-- Source references: - https://pnpm.io/config-dependencies - https://pnpm.io/pnpmfile#hooksupdateconfigconfig-config--promiseconfig -->

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs Node.js

Security

What our scanner noticed· Low risk

  • Instructions that use the network

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Created by
Anthony Fu
Publisher
Anthony Fu (Community)
Source
antfu/skills · skills/pnpm · commit f63e9ec
Licence
MIT License (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE.md)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Anthony Fu or Anthony Fu.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download pnpm.zip