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
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
# pnpm-workspace.yaml
packages:
- 'packages/*'
- 'apps/*'
# Catalogs for centralized version management
catalog:
react: ^18.2.0
typescript: ~5.3.0
// 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 |
| Workspaces, catalogs, config |
workspaces.md |
| Overrides, patches, hooks, store |
features.md |
| CI/CD, Docker, migration |
ci.md |
Loading Files
Consider loading these reference files based on your task:
DO NOT load all files at once. Load only what's relevant to your current task.
Cross-Skill References
- TypeScript libs → Use
ts-library skill for library patterns
- Build tooling → Use
tsdown or vite skills
1---2name: pnpm3description: Use when managing Node.js dependencies with pnpm - provides workspace setup, catalogs, CLI commands, overrides, and CI configuration4license: MIT5---6
7# pnpm
8
9Content-addressable store, strict deps, workspace protocol, catalogs.
10
11## When to Use
12
13- Installing/managing npm packages
14- Monorepo workspace setup with catalogs
15- Overriding transitive dependencies
16- Patching third-party packages
17- CI/CD configuration for pnpm projects
18- Supply chain security hardening
19
20## Quick Start
21
22```bash
23pnpm install # Install deps
24pnpm add <pkg> # Add dep
25pnpm add -D <pkg> # Dev dep
26pnpm -r run build # Run in all packages
27pnpm --filter @myorg/app build # Run in specific package
28```
29
30## Workspace Setup
31
32```yaml
33# pnpm-workspace.yaml
34packages:
35 - 'packages/*'
36 - 'apps/*'
37
38# Catalogs for centralized version management
39catalog:
40 react: ^18.2.0
41 typescript: ~5.3.0
42```
43
44```json
45// package.json - Use workspace protocol and catalogs
46{
47 "packageManager": "pnpm@10.28.2",
48 "dependencies": {
49 "@myorg/utils": "workspace:^",
50 "react": "catalog:"
51 }
52}
53```
54
55## Reference Files
56
57| Task | File |
58| -------------------------------- | ----------------------------------------- |
59| Commands, scripts, filtering | [cli.md](references/cli.md) |
60| Workspaces, catalogs, config | [workspaces.md](references/workspaces.md) |
61| Overrides, patches, hooks, store | [features.md](references/features.md) |
62| CI/CD, Docker, migration | [ci.md](references/ci.md) |
63
64## Loading Files
65
66**Consider loading these reference files based on your task:**
67
68- [ ] [references/cli.md](references/cli.md) - if using pnpm commands, scripts, or filtering
69- [ ] [references/workspaces.md](references/workspaces.md) - if setting up monorepo, catalogs, or workspace config
70- [ ] [references/features.md](references/features.md) - if using overrides, patches, hooks, or managing store
71- [ ] [references/ci.md](references/ci.md) - if configuring CI/CD, Docker, or migrating from npm/yarn
72
73**DO NOT load all files at once.** Load only what's relevant to your current task.
74
75## Cross-Skill References
76
77- **TypeScript libs** → Use `ts-library` skill for library patterns
78- **Build tooling** → Use `tsdown` or `vite` skills