Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Pnpm Knowledge Patch?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/nevaberry-pnpm-knowledge-patch-nevaberry-plugins)
---
name: pnpm-knowledge-patch
description: pnpm
version: "12.25.1"
license: MIT
metadata:
author: Nevaberry
---
# pnpm Knowledge Patch
Load this skill for pnpm migrations, dependency installation, configuration,
workspace operations, build approvals, registry access, publishing, and scripts.
It also covers pnpm-managed Python and Cargo dependencies, runtimes, and pipelines.
Use the topic references for the conditions and release-specific behavior behind
the quick guidance below.
## Reference index
| Reference | Topics |
| --- | --- |
| [Migrating from pnpm 10 to pnpm 11](references/migration-pnpm-11.md) | Codemod, configuration moves, removed settings and commands, runtime requirements; direct upgrades to pnpm 12 |
| [Dependency Build Scripts and Approvals](references/build-scripts.md) | Build permissions, Git approvals, agent skills, build caches, task graphs, pipelines, Python source builds |
| [Configuration, Patches, and Hooks](references/configuration-hooks.md) | YAML, environment settings, patches, overrides, config dependencies, pnpmfiles, fetchers |
| [Installs, Lockfiles, Linkers, and Stores](references/installs-lockfiles-store.md) | Frozen and offline installs, cleanup, integrity, stores, linkers, Python and Cargo installation and lockfiles |
| [Registries, Authentication, Globals, and Publishing](references/registries-auth-publishing.md) | Registry routing and credentials, pnpr, Python and Cargo registries, global packages, archives, staged and variant publication |
| [Workspace Release and Update Management](references/release-management.md) | Release intents, lanes, epics, changesets, dependency updates, GitHub Actions, Python and Cargo updates |
| [Runtimes, Scripts, Initialization, and CLI Behavior](references/runtimes-scripts-cli.md) | Version pins, self-update, runtimes and Rust toolchains, scripts, shells, dependency verification, reports |
| [Dependency Security, Audit, Trust, and SBOMs](references/security-audit-sbom.md) | Release age, trust policy, signatures, audit fixes and exclusions, CycloneDX and SPDX |
| [Workspaces, Catalogs, Linking, and Deploy](references/workspaces-catalogs-deploy.md) | Discovery, filters, catalogs, peers, injected links, Python workspaces, deployment |
## Breaking changes and configuration migration
Run the migration codemod from the project directory:
```sh
pnpx codemod run pnpm-v10-to-v11
```
The codemod migrates settings and updates `packageManager` to the target pnpm 11
version. Use the same codemod for a direct pnpm 10-to-12 upgrade. It moves
`useNodeVersion` to root `devEngines.runtime`; migrate a member's
`executionEnv.nodeVersion` to that member's `devEngines.runtime` manually.
pnpm 11 is pure ESM, requires Node.js 22 or later, and its Linux standalone
executable requires glibc 2.27 or later. Convert v6 lockfiles to v9 with pnpm 9
before upgrading to pnpm 10.
Move pnpm settings from the manifest's `pnpm` field and `.npmrc` into
`pnpm-workspace.yaml` or global `~/.config/pnpm/config.yaml`. Registry and auth
settings remain in `.npmrc`, pnpm's global `rc`, or `~/.config/pnpm/auth.ini`.
Use `packageConfigs` for per-package workspace settings and `pnpm_config_*`
for configuration overrides. User-set `npm_config_*` variables pass through to
lifecycle scripts; pnpm 11 no longer derives those variables from its settings.
| Earlier setting | pnpm 11 replacement |
| --- | --- |
| `managePackageManagerVersions: true` / `false` | `pmOnFail: download` / `ignore` |
| `packageManagerStrict: false` or `COREPACK_ENABLE_STRICT=0` | `pmOnFail: warn` |
| `packageManagerStrictVersion: true` | `pmOnFail: error` |
| `onlyBuiltDependencies`, `onlyBuiltDependenciesFile`, `neverBuiltDependencies`, `ignoredBuiltDependencies`, `ignoreDepScripts` | `allowBuilds` in workspace YAML |
| `allowNonAppliedPatches` | `allowUnusedPatches` |
pnpm 11 removes `ignorePatchFailures`; patch application failures stop installation.
Its defaults include `minimumReleaseAge: 1440`, `minimumReleaseAgeStrict: false`,
`blockExoticSubdeps: true`, `strictDepBuilds: true`,
`optimisticRepeatInstall: true`, and `verifyDepsBeforeRun: install`.
In 12.3, an explicitly configured release-age cutoff makes strict mode default
to `true`; the built-in cutoff remains non-strict.
`pnpm link` requires a filesystem path. Use `pnpm add -g .` to install the current
directory globally. Run `pnpm setup` after the global binaries move to
`PNPM_HOME/bin`. `pnpm runtime set node` supersedes `pnpm env use`;
pnpm-installed Node.js runtimes omit bundled `npm`, `npx`, and `corepack`.
Migrate `updateConfig.ignoreDependencies` to `update.ignoreDeps`, `auditLevel`
to `audit.level`, and `auditConfig.ignoreGhsas` to `audit.ignore`.
For the pnpm 11 audit transition, replace CVE exclusions with the GHSA identifiers
shown in the report; the codemod carries CVE IDs over for manual conversion.
## Permissions and builds
`allowBuilds` maps package names or version-qualified matchers to build decisions:
```yaml
allowBuilds:
esbuild: true
core-js: false
nx@21.6.4 || 21.6.5: true
```
From 12.11.0, `permissions`' `build` capability takes precedence over `allowBuilds`.
`pnpm permissions` lists grants, denials, and pending approvals. `pnpm approve`
reviews builds and skills together; `pnpm approve-builds` writes to `permissions`
when present, falling back to `allowBuilds`.
```sh
pnpm approve-builds esbuild '!core-js'
pnpm approve-builds --all
pnpm install --allow-build='!native-addon'
```
Pending approvals that require a prompt fail in CI or without a terminal unless
package arguments or `--all` are supplied in 11.28.13/12.22.0 for `approve-builds`
and in 12.22.0 for `approve`. In 12.24.0, `pnpm approve <pkg>` prompts even without
a pending request; configure `permissions` or use `approve-builds` for advance CI grants.
From 12.12.0, entries set to `false` under `allowBuilds` still deny builds when
`dangerouslyAllowAllBuilds` is enabled. Git-hosted artifacts require a repository
match even when their package name already has an approval.
In 12.22.0, global build decisions are saved under
`globalPackagesConfig.permissions` in global `config.yaml`. In 12.24.0,
`pnpm approve -g` reviews global builds and skills. Direct dependencies' skills
require approval; `skills.dirs` selects their destinations.
## Frozen installs, stores, and verification
`pnpm install --dry-run` resolves and reports changes without writing manifests,
the lockfile, or modules. `pnpm install` includes development dependencies even
when `NODE_ENV=production`.
From 11.28.13 and 12.22.0, `pnpm ci` validates the lockfile against the manifest
before deleting modules; `ci` and `clean` honor workspace filters. External
`modulesDir` contents stay intact, and a symlinked modules directory is unlinked
without changing its target.
Tarball integrity mismatches fail even non-frozen installs, forced installs,
lockfile repair, and updates. `pnpm install --update-checksums` refreshes locked
integrities from the registry and warns when accepting a mismatch.
`pnpm install --offline` needs cached metadata for policy verification;
missing metadata raises `ERR_PNPM_NO_OFFLINE_META`.
`frozenStore` requires an already populated store, including required patched or
approved build outputs, and is incompatible with `--force` and a configured pnpr
server. Use `pnpm store add` before enabling it. The install reference retains
the Node.js requirements and the offline archive cases.
The `loaded` linker and v13 lockfile format are experimental:
```yaml
nodeLinker:
type: loaded
lockfile:
format: v13
```
In 12.11.0, the loaded linker requires Node.js `^24.18.0 || >=26.2.0`.
In 12.19.0, matching side-effects cache entries can supply built dependencies;
native addons and other detected unsupported loading cases materialize automatically.
Use `nodeLinker.excluded` for computed imports that escape detection.
In 12.22.0, run `pnpm install` to rewrite earlier v13 local-directory entries.
With `verifyDepsBeforeRun` enabled, a missing lockfile counts as stale in 12.25.0:
`install` restores it before `run` or `exec`, while `error` refuses execution.
## Workspaces, catalogs, scripts, and pipelines
`pnpm add --save-catalog` saves to the default catalog; `--save-catalog-name=<name>`
selects a named catalog. `catalogMode` supports `strict`, `prefer`, and default
`manual`. In 12.24.0, grouped `catalog.entries`, `catalog.unused`, `catalog.mode`,
and `catalog.defaultSaveTarget` work alongside the existing flat settings.
`pnpm peers check` reports lockfile peer issues. In 12.17.0, use
`pnpm peers check --global` for global packages. In 12.22.0, regular and production
filters are evaluated together in command-line order.
Scripts named `clean`, `setup`, `deploy`, or `rebuild` take precedence over the
built-ins. Use `pnpm pm <name>` to invoke the built-in command.
In task dependencies, `^build` selects dependency projects' builds and bare
`build` selects the current project. A missing task entry implies
`dependsOn: ['^<task>']`; an entry without `dependsOn` has no prerequisites.
`pnpm pipeline [name]` performs a frozen install and runs affected projects' task
graphs, continuing after failures. `--dry-run` previews without installing config
dependencies or running workspace hooks. Tasks can declare `inputs`, `outputs`,
`env`, and `cache`; `remoteCache` shares signed results. In 12.22.0, `inputs: []`
hashes no files, `+` globs include ignored or external workspace files, and `!`
globs exclude matches. Tasks with an uncacheable prerequisite rerun after it executes.
`pnpm deploy --offline --trust-lockfile` can use source-lockfile versions with a
populated store when metadata is unavailable. From 11.28.3 and 12.8.2, deploy
stops inheriting root package-manager pins; declare a needed pin in the deployed
project. The workspace reference covers linked peers, legacy deploy, and build denials.
## Registries, security, and releases
URL-keyed `registries` entries can combine scopes, prefixes, and server type.
Repository registry URLs must be literal in 12.19.0 and 11.28.12. In 12.16.0,
login stores tokens in `auth.ini` and removes earlier matching global `_auth`
tokens. The registry reference preserves URL, scope, and environment precedence.
`trustPolicy: no-downgrade` rejects weaker release trust evidence. Trusted-publisher
evidence requires provenance; staged releases with an `approver` rank higher.
`trustLockfile: true` skips release-age and trust checks of loaded lockfile entries.
`pnpm audit signatures` verifies registry signatures against locked integrity.
`pnpm sbom` emits CycloneDX or SPDX JSON; `--out` writes a file and `--split`
produces an SBOM per selected workspace package.
`pnpm change` records release intents, `pnpm change status` previews the plan,
and `pnpm version -r` applies it. `pnpm change check` validates release bands,
fixed groups, and pending intent package names. `pnpm publish --recursive --batch`
requires registry support. Platform variant publishing requires `serverType: pnpr`.
For 12.20.0/11.28.12 remote resolution and shared build caches, use pnpr
0.1.0-alpha.20 or newer with the required advertised policy capabilities.
## Python and Cargo projects
Enable `python.enabled` or `cargo.enabled` in workspace YAML for `pnpm install`,
then use `pnpm add pypi:requests` or `pnpm add crate:serde`.
Python uses `pyproject.toml`, `pylock.toml`, and a managed `.venv`; interpreter
selection respects `requires-python` and prefers `.python-version`.
Local Python sources require `[tool.uv.sources]` declarations and build-backend
approval. Source distributions need their own Package URL build approval.
With Cargo enabled, pnpm installs the `rust-toolchain.toml` toolchain and exposes
`cargo` and `rustc` to `run` and `exec`. `pnpm update --latest rust` updates its pin
in 12.25.0. `pnpm add -g crate:ripgrep@14` installs a crate's executables;
`pnx crate:ripgrep@14 --version` fetches dependencies, builds offline with a managed
toolchain, and runs the executable. The references retain multi-target Python
locking, Cargo overrides and submodules, update constraints, and rustup behavior.