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
Download the skill as a ZIP:
https://autogineer.com/agent-skills/antfu/pnpm/downloadUnzip 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
| Topic | Description | Reference |
|---|---|---|
| CLI Commands | install/add/remove/update, run, dlx/pnx, workspace, runtime, publishing (version, view, sbom, stage) | core-cli |
| Configuration | pnpm-workspace.yaml settings (camelCase), global config.yaml, config includes, packageConfigs, auth (.npmrc, auth.ini) | core-config |
| Workspaces | Monorepo support: filtering, workspace protocol, shared lockfile, packageConfigs | core-workspaces |
| Store | Content-addressable store, virtual store, node linker modes (incl. loaded/store loader), frozen/read-only store | core-store |
Features
| Topic | Description | Reference |
|---|---|---|
| Catalogs | Centralized dependency versions; catalogMode, catalog: in overrides | features-catalogs |
| Overrides | Force versions (incl. transitive & peer deps); packageExtensions | features-overrides |
| Patches | Modify third-party packages; patchedDependencies in pnpm-workspace.yaml | features-patches |
| Aliases | Install under custom names (npm:) and registry aliases (namedRegistries) | features-aliases |
| Hooks | .pnpmfile.mjs hooks (readPackage, updateConfig, beforePacking), finders, resolvers/fetchers | features-hooks |
| Peer Dependencies | Auto-install, strict mode, rules, dedupePeers, peers check | features-peer-deps |
| Config Dependencies | Share hooks/settings/catalogs/patches across repos via configDependencies | features-config-dependencies |
| Global Virtual Store & Shims | Shared node_modules, git-worktree multi-agent setups, isolated global packages, project-aware bins, other package managers | features-global-virtual-store |
| Supply-Chain Security | Build approval (allowBuilds), permissions and agent skills, minimumReleaseAge, trustPolicy, lockfile integrity | features-supply-chain-security |
| Task Orchestration | Cross-project task graphs (tasks/dependsOn), concurrency groups, priority, pnpm pipeline | features-task-orchestration |
| Release Management | Native versioning: pnpm change/version -r/lane, lanes, epics, fixed groups | features-versioning |
| Multi-Ecosystem | Python (pypi:) and Cargo (crate:) dependencies alongside npm (experimental) | features-multi-ecosystem |
Best Practices
| Topic | Description | Reference |
|---|---|---|
| CI/CD Setup | GitHub Actions, GitLab, Docker, pnpm ci, store caching, frozen lockfiles | best-practices-ci |
| Migration | npm/Yarn → pnpm, phantom deps, and pnpm v10 → v11 → v12 upgrade notes | best-practices-migration |
| Performance | Install optimizations, allowBuilds, global virtual store, workspace parallelization | best-practices-performance |
Files
- ATTRIBUTION.mdAdded by AutoGineer889 B
- GENERATION.md134 B
- LICENSELicence file added by AutoGineer1.1 KiB
- SKILL.md5.1 KiB
- references/best-practices-ci.md9.7 KiB
- references/best-practices-migration.md9.9 KiB
- references/best-practices-performance.md6.0 KiB
- references/core-cli.md11.3 KiB
- references/core-config.md12.8 KiB
- references/core-store.md10.7 KiB
- references/core-workspaces.md6.6 KiB
- references/features-aliases.md4.4 KiB
- references/features-catalogs.md5.0 KiB
- references/features-config-dependencies.md4.2 KiB
- references/features-global-virtual-store.md10.0 KiB
- references/features-hooks.md8.9 KiB
- references/features-multi-ecosystem.md6.2 KiB
- references/features-overrides.md5.5 KiB
- references/features-patches.md5.0 KiB
- references/features-peer-deps.md5.9 KiB
- references/features-supply-chain-security.md7.7 KiB
- references/features-task-orchestration.md6.8 KiB
- references/features-versioning.md5.5 KiB
references/features-supply-chain-security.md
name: pnpm-supply-chain-security description: Build-script approval (allowBuilds), minimum release age, trust policy, and exotic-subdep blocking for safer installs
pnpm Supply-Chain Security
pnpm blocks several attack vectors by default. Agents installing dependencies must understand these, since installs can fail or prompt on them.
Build-script approval (allowBuilds)
By default pnpm does not run dependency lifecycle scripts (preinstall/install/postinstall). Packages must be explicitly approved. Approval lives in one allowBuilds map in pnpm-workspace.yaml.
allowBuilds:
esbuild: true
core-js: false
# version selectors are supported
[email protected] || 21.6.5: truePackages not listed are unreviewed and blocked by default.
strictDepBuilds: true(default) ⇒ unreviewed builds make install exit non-zero (ERR_PNPM_IGNORED_BUILDS). Setfalseto warn instead.During install, unreviewed packages with build scripts are auto-added to
pnpm-workspace.yamlwith the placeholderset this to true or falseso you can settrue/false.Git/tarball deps are never approved by bare name: use the exact resolved path (with commit) or the repo URL (
foo@git+https://github.com/org/foo.git: true, also covers tarball downloads from GitHub/GitLab/Bitbucket).
allowBuildsreplaces the removedonlyBuiltDependencies,neverBuiltDependencies,ignoredBuiltDependencies,onlyBuiltDependenciesFile, andignoreDepScripts.
Approving builds
pnpm approve-builds # interactive prompt
pnpm approve-builds --all # approve all pending (cannot combine with names)
pnpm approve-builds esbuild fsevents !core-js # ! = deny
pnpm add --allow-build=esbuild my-bundler # approve while adding
pnpm add -g --allow-build=esbuild esbuild # global (replaces approve-builds -g)Naming one package both approved and denied fails (ERR_PNPM_APPROVE_BUILDS_CONTRADICTING_ARGS). Approved pending packages are rebuilt immediately. Writing allowBuilds also removes the ignored legacy settings from the file.
Permissions and agent skills (v12.11.0)
pnpm approve (= pnpm permissions approve; pnpm permissions ls lists) reviews what each dependency may do: build (run build scripts) and skills (pnpm links the agent skills the package ships, from its skills/<name>/SKILL.md, into the project's agent skill dirs). Decisions go in a permissions map; a package's permissions entry outranks its allowBuilds entry. Build decisions are written to permissions only if the file already has it, otherwise to allowBuilds.
permissions:
drizzle-kit:
build: true
skills: [guide, migrate] # true = all, false = none, list = exactly these
some-pkg:
skills: false
skills:
dirs: [.claude/skills] # default: existing .<agent>/skills dirs + the running agent's; [] disables skillsInstall never fails on pending skills; it prints "Agent skills awaiting approval" for direct deps (only dep groups the install includes). Run
pnpm installbeforepnpm approve.pnpm approve drizzle-kit !esbuild(!denies),--allapproves everything.Links are named after the skill dir (fallback
pnpm-<package>-<skill>,/in scope becomes+), listed in a# pnpmblock of a.gitignorein each skills dir. Not linked by global installs,dlx, ordeploy.
Escape hatch (dangerous)
dangerouslyAllowAllBuilds: true # runs ALL build scripts now and in the future — avoidExplicitly denied packages (false in allowBuilds, build: false in permissions) stay blocked.
Minimum release age
Delay installing freshly published versions so malicious releases (usually pulled within an hour) are avoided. Applies to all deps, including transitive.
minimumReleaseAge: 1440 # minutes; default 1440 (1 day)
minimumReleaseAgeExclude: # always install newest of these immediately
- webpack
- '@myorg/*'
- [email protected] # exempt a specific versionminimumReleaseAgeStrict— when no in-range version satisfies the age, fail (default when you setminimumReleaseAgeyourself) vs. fall back.minimumReleaseAgeIgnoreMissingTime— skip the check for registries that omit thetimefield (defaulttrue); also governstrustPolicy(undatable packages are skipped with a warning instead ofERR_PNPM_MISSING_TIME).Does not apply to config dependencies pinned with
version+integrity.minimumReleaseAgeExcludePrune: true(andtrustPolicyExcludePrune, v12.4.0) drop stale exclude entries on install.
Trust policy
Fail if a package's trust level decreased vs earlier releases (e.g. was published by a trusted publisher, now only has provenance or nothing).
trustPolicy: no-downgrade # off (default) | no-downgrade
trustPolicyExclude:
- '[email protected]'
trustPolicyIgnoreAfter: 525600 # ignore the check for pkgs published > N minutes agoThe check also covers the pnpm version pinned in packageManager/devEngines.packageManager.
Block exotic transitive sources
blockExoticSubdeps: true # default (on)When true, only direct dependencies may use exotic sources (git repos, direct tarball URLs); all transitive deps must come from a trusted source (registry, local path, workspace link, or trusted GitHub repos).
Lockfile integrity
Since v11, a downloaded tarball whose hash doesn't match pnpm-lock.yaml is a hard error (ERR_PNPM_TARBALL_INTEGRITY) — protecting committed lockfiles from a compromised registry/proxy. --force and pnpm update do not bypass it.
pnpm install --update-checksums # narrow opt-in after verifying the new bytesPin packages to their registry
If you install from more than one registry, use namedRegistries aliases for packages that must come from a specific one. pnpm records these under registry-qualified lockfile keys (<name>@<registryName>:<version>), so a package can't be silently substituted by another registry publishing the same name/version.
Lockfile scanners: two-document lockfile
pnpm-lock.yaml may be a two-document file. A vulnerability scanner or SBOM generator that reads only the first document reports "no dependencies" (and no vulnerabilities) without failing — verify your tooling handles both documents.
Trusted store/cache
The content-addressable store, global virtual store, and metadata cache are part of pnpm's trust domain. Share them only between mutually trusting users/jobs and protect with filesystem permissions. verifyStoreIntegrity (default true) detects accidental corruption but does not make a writable-by-untrusted store safe.
Key Points
Dependency build scripts are blocked until approved via
allowBuilds/pnpm approve-builds; unreviewed builds fail by default (strictDepBuilds).minimumReleaseAge(default 1 day in v11) delays new releases;trustPolicy: no-downgradeblocks trust regressions;blockExoticSubdepslimits transitive git/tarball sources.Tarball integrity mismatches are fatal; use
--update-checksumsonly after verification.Treat the store/cache as trusted shared state.
<!-- Source references: - https://pnpm.io/settings/build#allowbuilds - https://pnpm.io/cli/approve-builds - https://pnpm.io/settings/dependency-resolution#minimumreleaseage - https://pnpm.io/settings/dependency-resolution#trustpolicy - https://pnpm.io/settings/dependency-resolution#blockexoticsubdeps - https://pnpm.io/supply-chain-security - https://pnpm.io/agent-skills - https://pnpm.io/cli/permissions - https://pnpm.io/settings/build#permissions -->
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