agentleFS
G1JoshiG1Joshi/Agent-Skills/skills/devops/pnpm/SKILL.md

pnpm

Skill15 starsChanged 42 days agoMITView on GitHub

Expert pnpm fast, disk-efficient package manager assistance covering hard links, symlinks, pnpm-workspace.yaml, and monorepos. Use when managing JavaScript/TypeScript packages with speed and zero duplication.

  • Installs packages

30 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use antfu-design, xsai and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • wltn7810-dotcomSkill

    antfu-design

    antfu-style design conventions, broadened. UnoCSS-first, class-based semantic tokens with dual light/dark for tooling and devtools UIs, plus design-read, anti-slop, and micro-interaction polish for landing pages and product surfaces. Use when building or refactoring any interface with UnoCSS.

    Also in 3 projects that use this

  • alint-devSkill

    xsai

    Use this skill when the user is building with `xsai` or any `@xsai/*` package, or is evaluating xsAI for a small OpenAI-compatible workflow with text generation, streaming, tool calling, structured output, embeddings, image generation, speech synthesis, or transcription.

    Also in 3 projects that use this

  • SentrySkill

    nitro

    Build and deploy universal JavaScript servers with Nitro v3. Use when working with nitro.config.ts, defineNitroConfig, defineHandler, defineConfig, server.ts entry, filesystem routing, route rules, useStorage, defineCachedHandler, useDatabase, definePlugin, runtime hooks, Vercel/Cloudflare deployment, or migrating from Nitro v2/nitropack.

    Also in 3 projects that use this

  • GitHubSkill

    multi-stage-dockerfile

    Create optimized multi-stage Dockerfiles for any language or framework

    Also in 3 projects that use this

  • MicrosoftSkill

    simple-english

    Write or rewrite text in plain, layman-readable English in the spirit of ASD-STE100 Simplified Technical English: short sentences, active voice, simple tenses, one word one meaning, condition before command, every technical term defined at first use, no AI slop. Default mode is Plain. Strict mode applies full STE vocabulary compliance when the user names STE, ASD-STE100, or compliance. Use for documentation, READMEs, runbooks, procedures, error messages, release notes, incident reports, API guides, and explanations for readers outside the field. Also use when the user says "STE", "Simplified Technical English", "ASD-STE100", "plain English", "layman's terms", "explain it simply", "no jargon", "de-slop", "make this readable", "write for non-native readers", or asks for docs that translate well. The same rules govern the reply: answer first, prose only.

    Also in 3 projects that use this

  • GoogleSkill

    setup-matt-pocock-skills

    Configure this repo for the engineering skills — set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 19 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use pnpm install --frozen-lockfile in CI/CD pipelines to guarantee reproducible installs.

    line 109
  2. Very specific:

    Use workspace:* protocols for internal dependencies to ensure local development links without publishing.

    line 110
  3. Very specific:

    Commit the global .pnpm-store to version control.

    line 117

“Common” is measured: kept by at least 6 in 10 of the 19 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

pnpm

pnpm is a fast, disk-efficient package manager for JavaScript that uses a content-addressable store and symlinked node_modules to eliminate duplicate dependencies across projects.

When to Use

  • Fast, Disk-Efficient JavaScript Package Management: Saving gigabytes of disk space via a content-addressable hard-link store.
  • Strict Dependency Resolution: Eliminating phantom dependencies (preventing access to unlisted transitive packages).
  • Enterprise Monorepos: Scaling multi-package workspaces with pnpm-workspace.yaml and fast parallel execution.
  • Continuous Integration Optimization: Slashing CI installation times by up to 2x-3x through global store caching.

Quick Start

# Enable via Corepack
corepack enable
corepack prepare pnpm@latest --activate

pnpm add next

Core Concepts

Configuring Monorepo Workspaces (pnpm-workspace.yaml)

Declaring workspace packages and root settings:

# pnpm-workspace.yaml
packages:
  - "packages/*"
  - "apps/*"
  - "!**/test/**"
// packages/core-service/package.json
{
  "name": "@my-org/core-service",
  "version": "1.0.0",
  "dependencies": {
    "@my-org/shared-utils": "workspace:*" // Symlinks to local workspace package
  }
}

Workspace Commands & Parallel Script Execution

Running builds and tests across packages:

# Run tests in parallel across all workspace packages
pnpm --recursive run test

# Run build only for packages modified since main branch
pnpm --filter "...[origin/main]" run build

# Install a shared dependency to a specific package
pnpm --filter @my-org/web-app add lucide-react

Hard Links and Content-Addressable Store

Inspecting and pruning global package deduplication:

# Verify integrity of global content-addressable store
pnpm store status

# Clean up unreferenced packages to free disk space
pnpm store prune

Common Patterns

Monorepo Workspaces with Shared Internal Packages

Problem: Inefficient symlinking and phantom dependency hoisting in large JavaScript monorepos.

Solution: Define clean workspace structure in pnpm-workspace.yaml:

packages:
  - "apps/*"
  - "packages/*"

Consume internal package with workspace:* protocol:

{
  "dependencies": {
    "@myorg/ui": "workspace:*",
    "@myorg/utils": "workspace:*"
  }
}

Best Practices

Do:

  • Use pnpm install --frozen-lockfile in CI/CD pipelines to guarantee reproducible installs.
  • Use workspace:* protocols for internal dependencies to ensure local development links without publishing.
  • Leverage --filter to run commands only on modified packages and their dependents.
  • Manage pnpm versions via Corepack (corepack enable pnpm) to align team versions.

Don't:

  • Access transitive packages not explicitly declared in package.json; pnpm's strict layout prevents this.
  • Commit the global .pnpm-store to version control.
  • Mix multiple package managers (npm, yarn) in the same project directory.

Troubleshooting

ErrorCauseSolution
ERR_PNPM_PEER_DEP_ISSUES: Unmet peer dependenciesStrict peer dependency resolution blocking install.Configure .npmrc with auto-install-peers=true or resolve versions.
Cannot find module ... (phantom dependency)Package relies on a transitive dependency not explicitly declared in package.json.Explicitly add the missing package to package.json dependencies.
pnpm-lock.yaml out of dateRunning pnpm install --frozen-lockfile after package.json was modified.Run pnpm install locally to update lockfile and commit changes.

References

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.