pnpm
When to use
Use this skill proactively for:
- Installing dependencies
- Adding or removing packages
- Running scripts
- Any command that involves a package manager
Instructions
Always use pnpm as the package manager. Before running any package manager command, check which package manager the project is already using:
- If
pnpm-lock.yamlexists → use pnpm - If
yarn.lockexists → use yarn - If
package-lock.jsonexists → use npm - If none exist (new project) → use pnpm
Never switch the package manager mid-project. If a project already uses npm, continue with npm throughout. Do not mix package managers in the same project.
pnpm Command mappings
| Instead of | Use |
|---|---|
npm install |
pnpm install |
npm install <pkg> |
pnpm add <pkg> |
npm install -D <pkg> |
pnpm add -D <pkg> |
npm install -g <pkg> |
pnpm add -g <pkg> |
npm uninstall <pkg> |
pnpm remove <pkg> |
npm run <script> |
pnpm run <script> |
npm ci |
pnpm install --frozen-lockfile |
npx <cmd> |
pnpm dlx <cmd> |
Lockfile and Dockerfile
- Always reference
pnpm-lock.yaml(notpackage-lock.json) in pnpm projects - In Dockerfiles, use
pnpm install --frozen-lockfile --prodfor production installs - Copy both
package.jsonandpnpm-lock.yamlinto Docker images
More from renjith100/skills
pino-logger
Logging expert using Pino.js for Node.js and Next.js projects. Enforces structured logging, never console.log, and proper dev/prod configuration.
8commit-message
Generate a conventional commit message from staged or recent changes. Use when the user asks for a commit message, wants to commit, or says "give me a commit message".
5worklog
Use this skill when the user wants to log work, track a task session, start deep work, capture notes during work, end a session with a review, or resume a previous task. Also use when the user says "I'm going to work on X", "log my work", "what did I do on X", or "continue working on X".
2node-best-practices
Best practices for Node.js development with TypeScript using type stripping
1