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-multi-ecosystem.md


name: pnpm-multi-ecosystem description: Install Python (pypi:) and Cargo (crate:) dependencies alongside npm packages in one pnpm install

Multi-Ecosystem: Python & Cargo (v12.4.0+, experimental)

pnpm v12 can resolve and install Python and Rust/Cargo dependencies in the same pnpm install as npm packages. Both graphs share pnpm's connection budget, artifact verification, and content-addressable store; each keeps its own lockfile and requirement semantics. Settings and on-disk layout may still change.

Python

Enable in pnpm-workspace.yaml:

python:
  enabled: true

pnpm reads pyproject.toml, writes pylock.toml, and builds a .venv per project (a symlink into python-envs in the store; swapped atomically). It never touches a hand-made .venv.

pnpm add pypi:httpx            # -> httpx==<latest> in pyproject.toml
pnpm add pypi:[email protected]     # exact pin
pnpm add pypi:'httpx>=0.28'    # PEP 508 spec kept as written
pnpm add -D pypi:pytest
  • pnpm outdated/pnpm update also cover Python deps (selectors pypi:<name>); requirements keep their operator and precision on update.

  • Resolution reads each release's metadata from the index's PEP 658 metadata file, downloading the wheel only once selected. Indexes must support the Simple JSON API (HTML-only unsupported).

  • pnpm run/pnpm exec put .venv/bin (.venv/Scripts on Windows) on PATH, so scripts call pytest/ruff without activation.

  • --lockfile-only, --frozen-lockfile, --offline apply.

  • Local/workspace deps: declare in [tool.uv.sources] ({ workspace = true } or { path, editable }); a project with [build-system] is installed editable.

  • Build backends need approval under allowBuilds with Package URL keys: 'pkg:pypi/hatchling': true.

  • Indexes (v12.5.0+): declare via registries with ecosystem: pypi and route package names with packages patterns; python.indexUrl is no longer supported. Credentials go in .npmrc, matched by origin.

  • Multi-env locking: supportedArchitectures + python.versions: ['3.12','3.13'] locks wheels for each platform×interpreter.

  • Interpreter: auto-selected to satisfy each requires-python (prefers .python-version); downloads a python-build-standalone build if none fits (runtimeOnFail controls). Set python.executable to force one.

  • Key settings: python.enabled, python.executable, python.extras, python.groups (default ['dev']), python.versions, python.overrides, python.constraints. Per-project overrides in [tool.pnpm.python]. shared-environment = true under [tool.uv.workspace] shares one .venv across uv-workspace members.

Cargo

Enable in pnpm-workspace.yaml:

cargo:
  enabled: true
pnpm add crate:serde
pnpm add crate:serde@^1.0.200
pnpm add --save-build crate:cc   # as a Cargo build dependency

pnpm add crate:/rust@ fail with --recursive/--filter; run them in the project. pnpm outdated/update also cover crates (crate:<name> selectors).

  • pnpm reads the workspace Cargo.toml, writes a deterministic Cargo.lock, verifies each .crate against its checksum, unpacks into the store, and links a Cargo [directory source] under .pnpm/crates/crates-io. It writes the source replacement to .pnpm/crates/config.toml and adds an optional [[include]] of it to .cargo/config.toml between # >>> pnpm-managed cargo sources >>> markers (your content outside is untouched; write your own includes as [[include]] tables; Cargo 1.95+ reads it). In a fresh clone without .pnpm, Cargo skips the include and fetches normally. Already-unpacked crates are linked without re-verifying; pnpm install --force unpacks again.

  • cargo build then compiles offline against vendored sources; pnpm compiles nothing.

  • Crates are recorded only in Cargo.lock, never pnpm-lock.yaml. --lockfile-only/--frozen-lockfile/--offline apply.

  • Registry: declare a sparse index via registries with ecosystem: cargo (default crates.io); only one index per workspace. cargo.indexUrl is no longer supported. Auth reuses URL-scoped credentials plus CARGO_REGISTRY_TOKEN/$CARGO_HOME/credentials.toml.

  • Git deps and [patch]/[replace] overrides are honored and vendored for offline builds (git packages in .pnpm/crates/git). Such workspaces resolve via the cargo of the workspace's Rust toolchain and require the default crates.io index; otherwise commit a Cargo.lock generated by Cargo. Only unstable.bindeps and resolver.incompatible-rust-versions are read from the checkout's .cargo/config.toml.

  • A dependency with its own registry = "..." is rejected (one index per workspace). With unstable.build-std, the toolchain needs the rust-src component.

  • Reuse Cargo build state across runs/worktrees with pnpm pipeline and tasks.<name>.cargoTargetDir.

Rust toolchain (v12.11.0+)

pnpm install installs the toolchain named by the nearest rust-toolchain.toml (or rust-toolchain), read like rustup. pnpm verifies it against Rust's signing key, stores it once per machine, and links it into .pnpm/rust; pnpm run/exec and pnpm's own cargo calls use it.

[toolchain]
channel = "1.95.0"          # version, stable, beta, nightly, nightly-YYYY-MM-DD
components = ["rust-src"]
targets = ["wasm32-unknown-unknown"]
  • pnpm add [email protected] writes the file; pnpm add -g rust@stable installs globally; pnpm shim add rust delegates to rustup instead; pnx --package=rust@<channel> cargo ... runs one release.

  • Moving channels (stable) are checked daily; offline uses the newest cached one. Files with path, no channel, linked toolchains, or exotic profiles are left to rustup.

  • runtimeOnFail: error|warn|ignore turns it off; tools.rust.mirror sets a mirror.

pnpr acceleration

With pnprServer set, the server resolves the Python/Cargo graph so pnpm needn't download wheels/index files to discover requirements; it falls back to local resolution when the server doesn't answer for that ecosystem.

<!-- Source references: - https://pnpm.io/python - https://pnpm.io/cargo - https://pnpm.io/registries - https://pnpm.io/cli/add - https://pnpm.io/cli/pnx -->

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