pnpm
antfu/skills · Agent Skill
pnpm package manager guidance for strict dependency resolution, workspaces, catalogs, patches, and overrides.
Jump to install ↓Overview
| Publisher | |
|---|---|
| Repository | antfu/skills ↗ |
| Skill folder | pnpm |
| Stars | 6,011 |
| Forks | 338 |
| Bundled files | 21 |
| License | MIT |
| Last updated | October 23, 2026 |
| Links | Skill source ↗ · Repository ↗ |
Mozgi check
What we found in the skill files. Details come with a subscription.
Installation
A skill is a folder with a SKILL.md file. Pick your agent and run the commands in a terminal (macOS, Linux or Git Bash on Windows) from your project root.
Copy the prompt into Claude, Codex or another assistant: it will review the skill and install it for you.
Install the “pnpm” skill from mozgi.io (https://mozgi.io/skills/antfu-pnpm/) for me. 1. Download the archive: https://mozgi.io/skills/antfu-pnpm/download If it fails, take the skill folder from the source: https://github.com/antfu/skills/tree/main/skills/pnpm 2. Read SKILL.md and the other files. Check the skill is safe: no hidden commands, no sending data elsewhere, no scripts doing something other than described. If anything looks suspicious, stop and tell me. 3. Put the “pnpm” folder into your agent's skills folder: .claude/skills/ for Claude Code, .agents/skills/ for Codex, .cursor/skills/ for Cursor, .gemini/skills/ for Gemini CLI. Inside the project if we are in one, otherwise in the home folder (~/.claude/skills/ etc.). 4. Make sure <skills folder>/pnpm/SKILL.md exists. 5. Briefly tell me what this skill does and offer to try it on my task. If you cannot do a step yourself, tell me what to click or type.
git clone --depth 1 --branch main https://github.com/antfu/skills.git /tmp/skills mkdir -p .claude/skills cp -r /tmp/skills/skills/pnpm .claude/skills/pnpm
Restart Claude Code — the skill appears in the list; call it manually with /pnpm. For all projects use ~/.claude/skills.
git clone --depth 1 --branch main https://github.com/antfu/skills.git /tmp/skills mkdir -p .agents/skills cp -r /tmp/skills/skills/pnpm .agents/skills/pnpm
Codex looks for skills in .agents/skills from the current folder up to the repo root; call one with /skills or $pnpm. For all projects use ~/.agents/skills.
git clone --depth 1 --branch main https://github.com/antfu/skills.git /tmp/skills mkdir -p .cursor/skills cp -r /tmp/skills/skills/pnpm .cursor/skills/pnpm
Cursor picks the skill up on start; call it with “/” in Agent chat. Cursor also reads .claude/skills and .agents/skills. For all projects use ~/.cursor/skills.
git clone --depth 1 --branch main https://github.com/antfu/skills.git /tmp/skills mkdir -p .gemini/skills cp -r /tmp/skills/skills/pnpm .gemini/skills/pnpm
Gemini CLI offers to activate the skill when a task matches — you approve it. For all projects use ~/.gemini/skills.
Read SKILL.md and any companion files before deciding whether to install. Click a file to preview it.
SKILL.md contents
Original author text · read-onlypnpm 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, --resolution-only removed) — 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.x, generated at 2026-09-25. It covers v11+v12 behavior (config split, 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, packageConfigs, .npmrc auth | core-config ↗ |
| Workspaces | Monorepo support: filtering, workspace protocol, shared lockfile, packageConfigs | core-workspaces ↗ |
| Store | Content-addressable store, virtual store, node linker modes, 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), 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 ↗ |
Frequently asked questions
What does the pnpm skill do?
pnpm package manager guidance for strict dependency resolution, workspaces, catalogs, patches, and overrides.
How do I install pnpm?
Open the “Installation” block on this page and pick your agent — Claude Code, Codex, Cursor or Gemini CLI — for ready-made commands that copy the skill folder to the right place. Or copy the prompt from the “Via assistant” tab and let the assistant review and install the skill.
Which AI models work with pnpm?
Skills are plain Markdown instructions (the Agent Skills format), so pnpm works with any agent that reads SKILL.md: Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and more. The model loads the instructions only when a task matches the skill's description.
Is pnpm free?
The skill is published openly by antfu under the MIT license. The skill itself costs nothing — you only pay your AI provider for the tokens you use.
Is it safe to install skills?
A skill is a set of instructions your agent will follow, so read SKILL.md and its companion files before installing. Scripts in the skill folder only run if your agent runs them — keep an eye on what it does and do not grant unnecessary permissions.
How is a skill different from an MCP server or a plugin?
An MCP server or plugin gives the model new tools — code that runs and returns a result. A skill gives it knowledge and process: how to approach a task, which steps to follow and what good output looks like. It needs no server or API key.