Package Operations
This skill covers day-to-day package management operations across npm, pnpm, and bun.
How to use this skill
- If the user asks about installing or removing packages → run
python scripts/validate.py install - If the user asks about updating dependencies → run
python scripts/validate.py outdated - If the user asks about auditing for vulnerabilities → run
python scripts/validate.py audit - If the user asks about publishing packages → run
python scripts/validate.py publish - If the user asks about dependency troubleshooting → run
python scripts/validate.py doctor
Quick reference
| Task | npm | pnpm | bun |
|---|---|---|---|
| Install | npm install |
pnpm install |
bun install |
| Add dep | npm install <pkg> |
pnpm add <pkg> |
bun add <pkg> |
| Remove | npm uninstall <pkg> |
pnpm remove <pkg> |
bun remove <pkg> |
| Update all | npm update |
pnpm update |
bun update |
| Audit | npm audit |
pnpm audit |
bun pm audit |
| Outdated | npm outdated |
pnpm outdated |
bun outdated |
| Publish | npm publish |
pnpm publish |
bun publish |
| Doctor | npm doctor |
pnpm doctor |
bun --help |
Best practices
- Always review lockfile changes before committing
- Use
--frozen-lockfilein CI (npm ci,pnpm install --frozen-lockfile,bun install --frozen-lockfile) - Pin exact versions in production: set
save-exact=truein.npmrc - Audit regularly:
npm audit --audit-level=high - Keep a change log when updating dependencies
References
references/ops-guide.md— PM-specific commands for install, update, audit, publish, and troubleshootingscripts/validate.py— Validation tool for package operations