Skip to content
Skill

Use pnpm

Guides an agent through pnpm installs, workspace commands and global-package recovery

Use pnpm is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
None
Platforms
Claude Code, Codex, Cursor
GitHub stars
5
Last commit
License
MIT
Listing updated

Similar skills

About Use pnpm

This skill gives an agent a decision path for pnpm problems: figuring out whether pnpm is managed by Corepack or a standalone install, separating the global bin directory, global dependency tree, content store and virtual store, and then choosing a recovery route. It covers replacing npm, npx and yarn commands with pnpm equivalents, workspace filtering with --filter and -w, and verification steps after a fix.

The guidance also reaches into pnpm 12 migration gaps such as approval of build scripts, ignored settings in .npmrc, Corepack deprecation, and self-update results that do not take effect. It includes safety rules: back up global metadata before rebuilding, avoid hand-editing the generated module state file, avoid absolute virtual-store paths in global config, and prefer the Windows where.exe command when checking which executable runs.

The skill expects a shell with pnpm, Node and optionally Corepack available, and it is written for Windows and PowerShell usage. Longer procedures are split into reference documents that the agent reads on demand, and the skill ships no scripts.

When your agent uses it

Use when 需要处理 pnpm 包管理、workspace 命令、npm/npx/yarn 到 pnpm 的替换、pnpm 12 断代差异(allowBuilds、blockExoticSubdeps、ERR_PNPM_IGNORED_BUILDS、.npmrc 设置迁移)、Windows 或 PowerShell pnpm 故障、Corepack 管理的 pnpm 或 corepack 退役与 shim 复活、pnpm self-update 升级不生效或假成功(双行为分支、PNPM 布局迁移残留、Windows PATH 优先级竞争)、pnpm ls -g 空列表假象、manage-package-manager-versions 自动切换与 cwd 祖先链钉住、全局命令 shim 被历史坏 shim 劫持、包管理器迁移后第三方命令或 MCP 启动失败、全局 CLI 双安装遮蔽、NVM Desktop 切换 Node 后的路径错位、全局包更新、ERR_PNPM_UNEXPECTED_VIRTUAL_STORE、virtual-store-dir 混淆、PNPM_HOME/global-dir/store-dir 诊断,或 pnpm install/update/rebuild 排障;English: handling pnpm package management, workspace commands, npm/npx/yarn replacement, pnpm 12 migration gaps (allowBuilds, blockExoticSubdeps, ERR_PNPM_IGNORED_BUILDS, .npmrc settings migration), Windows or PowerShell pnpm failures, Corepack-managed pnpm or corepack deprecation and shim resurrection, pnpm self-update upgrade-not-effective or false success (dual behavior branches, layout migration residue, Windows PATH priority competition), pnpm ls -g empty-list

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 9 files (57 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

This skill ships in the common-tools plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

/plugin marketplace add ruan-cat/monorepo
/plugin install common-tools@ruan-cat-tools

Or copy only this skill to ~/.claude/skills/use-pnpm:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ruan-cat/monorepo.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/use-pnpm &&
cp -R "$tmp/ai-plugins/common-tools/skills/use-pnpm" ~/.claude/skills/use-pnpm &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/use-pnpm inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/use-pnpm to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ruan-cat/monorepo.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/use-pnpm &&
cp -R "$tmp/ai-plugins/common-tools/skills/use-pnpm" ~/.agents/skills/use-pnpm &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/use-pnpm inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/use-pnpm to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ruan-cat/monorepo.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/use-pnpm &&
cp -R "$tmp/ai-plugins/common-tools/skills/use-pnpm" ~/.cursor/skills/use-pnpm &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/use-pnpm inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/ruan-cat/monorepo.git --path ai-plugins/common-tools/skills/use-pnpm

Or copy the folder to ~/.gemini/skills/use-pnpm yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/use-pnpm:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ruan-cat/monorepo.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/use-pnpm &&
cp -R "$tmp/ai-plugins/common-tools/skills/use-pnpm" ~/.copilot/skills/use-pnpm &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/use-pnpm inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/ruan-cat/monorepo.git

Then copy monorepo/ai-plugins/common-tools/skills/use-pnpm into your agent's skills folder as use-pnpm. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Package Manager Ownership Check
Determines whether pnpm comes from Corepack, a Node install, or a standalone installer before any change is made.
Global Tree Recovery
Walks through backing up global metadata and rebuilding the global dependency tree after virtual store errors.
Workspace Command Guidance
Explains when to target a package with --filter, use -w for root dependencies, or run commands from the root.
npm to pnpm Mapping
Provides a reference for translating npm, npx and yarn commands into their pnpm counterparts.
Build Approval Handling
Sets rules for approving build scripts one package at a time and recording whether each stage succeeded.
Verification Steps
Lists commands to confirm global packages, paths, store and virtual store settings after a repair.

Good for

  • Fix an ERR_PNPM_UNEXPECTED_VIRTUAL_STORE error after updating global packages
  • Work out which pnpm executable runs on Windows when several are on the PATH
  • Replace npm or yarn commands with pnpm in a project
  • Add a dependency to a single package inside a pnpm workspace
  • Troubleshoot pnpm global packages after switching Node versions with NVM

Use pnpm FAQ

Does Use pnpm change my global pnpm configuration automatically?

No. The skill tells the agent to back up global files first, avoid hand-editing generated state files, and only change global settings when the user has authorized it.

What tools does the agent need to use Use pnpm?

The guidance assumes a terminal with pnpm, Node and Corepack, and uses Windows commands such as where.exe and PowerShell examples.

Does Use pnpm ship scripts?

No. The skill contains only instructions and reference documents and does not include scripts.

How do I install Use pnpm in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/use-pnpm to use it in all your projects, or to .claude/skills/use-pnpm in one project. Or install the common-tools plugin, which includes it: /plugin marketplace add ruan-cat/monorepo, then /plugin install common-tools@ruan-cat-tools.

Does Use pnpm run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Use pnpm?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

What are the best alternatives to Use pnpm?

The closest alternatives to Use pnpm are Windows NPM run script shell, Package linter, CLI install, Find skills and Upgrade js deps.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from ruan-cat/monorepo

  1. Works through an OpenSpec change's task list, implementing and checking off each task

    • Open source
    • 5 GitHub stars
    • Developer tools
  2. Finalizes a completed OpenSpec change, syncing its specs and moving it to the archive

    • Open source
    • 5 GitHub stars
    • Developer tools
  3. Generates all OpenSpec planning artifacts for a change in one pass

    • Open source
    • 5 GitHub stars
    • Developer tools
  4. Starts a new OpenSpec change and shows its first artifact template for review

    • Open source
    • 5 GitHub stars
    • Developer tools
  5. Checks and normalizes package.json, tsup and tsconfig setup for monorepo Node packages

    • Open source
    • 5 GitHub stars
    • Developer tools
  6. Turns incident reports and repeated failures into durable, verifiable agent skill rules

    • Open source
    • 5 GitHub stars
    • Developer tools