pnpm

$npx mdskill add onmax/nuxt-skills/pnpm

Manage Node.js dependencies and monorepos with pnpm.

  • Installs packages, configures workspaces, and patches third-party libraries.
  • Integrates with npm, CI/CD pipelines, and content-addressable stores.
  • Decides actions by analyzing dependency conflicts and catalog versions.
  • Delivers results via command execution and workspace protocol commands.

SKILL.md

.github/skills/pnpmView on GitHub ↗
---
name: pnpm
description: Use when managing Node.js dependencies with pnpm - install packages, configure monorepo workspaces, set up pnpm catalogs, resolve dependency conflicts with overrides, patch third-party packages, and configure CI pipelines for pnpm projects
license: MIT
---

# pnpm

Content-addressable store, strict deps, workspace protocol, catalogs.

## When to Use

- Installing/managing npm packages
- Monorepo workspace setup with catalogs
- Overriding transitive dependencies
- Patching third-party packages
- CI/CD configuration for pnpm projects
- Supply chain security hardening

## Quick Start

```bash
pnpm install                      # Install deps
pnpm add <pkg>                    # Add dep
pnpm add -D <pkg>                 # Dev dep
pnpm -r run build                 # Run in all packages
pnpm --filter @myorg/app build    # Run in specific package
```

## Workspace Setup

```yaml
# pnpm-workspace.yaml
packages:
  - 'packages/*'
  - 'apps/*'

# Catalogs for centralized version management
catalog:
  react: ^18.2.0
  typescript: ~5.3.0
```

```json
// package.json - Use workspace protocol and catalogs
{
  "packageManager": "pnpm@10.28.2",
  "dependencies": {
    "@myorg/utils": "workspace:^",
    "react": "catalog:"
  }
}
```

## Reference Files

| Task                             | File                                      |
| -------------------------------- | ----------------------------------------- |
| Commands, scripts, filtering     | [cli.md](references/cli.md)               |
| Workspaces, catalogs, config     | [workspaces.md](references/workspaces.md) |
| Overrides, patches, hooks, store | [features.md](references/features.md)     |
| CI/CD, Docker, migration         | [ci.md](references/ci.md)                 |

## Loading Files

**Consider loading these reference files based on your task:**

- [ ] [references/cli.md](references/cli.md) - if using pnpm commands, scripts, or filtering
- [ ] [references/workspaces.md](references/workspaces.md) - if setting up monorepo, catalogs, or workspace config
- [ ] [references/features.md](references/features.md) - if using overrides, patches, hooks, or managing store
- [ ] [references/ci.md](references/ci.md) - if configuring CI/CD, Docker, or migrating from npm/yarn

**DO NOT load all files at once.** Load only what's relevant to your current task.

## Verify Setup

After configuring a workspace, verify it works:

```bash
pnpm install          # Install all deps
pnpm ls --depth 0     # Verify workspace links
pnpm -r run build     # Build all packages
```

## Cross-Skill References

- **TypeScript libs** → Use `ts-library` skill for library patterns
- **Build tooling** → Use `tsdown` or `vite` skills

More from onmax/nuxt-skills

SkillDescription
document-writerUse when writing blog posts or documentation markdown files - provides writing style guide (active voice, present tense), content structure patterns, and MDC component usage. Overrides brevity rules for proper grammar. Use nuxt-content for MDC syntax, nuxt-ui for component props.
motionUse when adding animations with Motion Vue (motion-v) - provides motion component API, gesture animations, scroll-linked effects, layout transitions, and composables for Vue 3/Nuxt
nuxtUse when working on Nuxt 4+ projects - provides server routes, file-based routing, middleware patterns, Nuxt-specific composables, and configuration with latest docs. Covers h3 v1 helpers (validation, WebSocket, SSE) and nitropack v2 patterns. Updated for Nuxt 4.3+.
nuxt-better-authUse when implementing auth in Nuxt apps with @onmax/nuxt-better-auth - provides useUserSession composable, server auth helpers, route protection, and Better Auth plugins integration.
nuxt-contentUse when working with Nuxt Content v3, markdown content, or CMS features in Nuxt - provides collections (local/remote/API sources), queryCollection API, MDC rendering, database configuration, NuxtStudio integration, hooks, i18n patterns, and LLMs integration
nuxt-modulesUse when creating Nuxt modules: (1) Published npm modules (@nuxtjs/, nuxt-), (2) Local project modules (modules/ directory), (3) Runtime extensions (components, composables, plugins), (4) Server extensions (API routes, middleware), (5) Releasing/publishing modules to npm, (6) Setting up CI/CD workflows for modules. Provides defineNuxtModule patterns, Kit utilities, hooks, E2E testing, and release automation.
nuxt-seoNuxt SEO meta-module with robots, sitemap, og-image, schema-org. Use when configuring SEO, generating sitemaps, creating OG images, or adding structured data.
nuxt-studioUse when working with Nuxt Studio, the self-hosted open-source CMS for Nuxt Content sites - provides visual editing, media management, Git-based publishing, auth providers, and AI content assistance
nuxt-uiUse when building styled UI with @nuxt/ui v4 components - create forms with validation, implement data tables with sorting, build modal dialogs and overlays, configure Tailwind Variants theming. Use vue skill for raw component patterns, reka-ui for headless primitives.
nuxthubUse when building NuxtHub v0.10.6 applications - provides database (Drizzle ORM with sqlite/postgresql/mysql), KV storage, blob storage, and cache APIs. Covers configuration, schema definition, migrations, multi-cloud deployment (Cloudflare, Vercel), and the new hub:db, hub:kv, hub:blob virtual module imports.