This walks you through the full dependency maintenance workflow: running npm audit for vulnerabilities, finding outdated packages with npm-check-updates, detecting unused deps with depcheck, and analyzing bundle size impact. It's got good defensive advice too, like which packages depcheck wrongly flags as unused (TypeScript types, ESLint plugins, config-referenced tools). The conservative versus aggressive update strategies are practical, and the lock file reminders are the kind of thing everyone forgets until CI breaks. If you maintain any JavaScript project and currently just run npm install when things break, this gives you a proper checklist to stay ahead of security issues and bloat.
npx -y skills add onewave-ai/claude-skills --skill dependency-auditor --agent claude-codeInstalls into .claude/skills of the current project.
When auditing dependencies:
# NPM audit
npm audit
# Get JSON output for processing
npm audit --json
# Fix automatically (safe fixes only)
npm audit fix
# Force fix (may have breaking changes)
npm audit fix --force
# PNPM
pnpm audit
# Yarn
yarn audit
# NPM
npm outdated
# Interactive update
npx npm-check-updates -i
# Update all to latest
npx npm-check-updates -u
npm install
# Check specific package
npm view <package> versions
# Using depcheck
npx depcheck
# With details
npx depcheck --detailed
# Ignore patterns
npx depcheck --ignores="@types/*,eslint-*"
Depcheck may flag these as unused when they're actually needed:
@types/* packages (used by TypeScript)# For Next.js
npx @next/bundle-analyzer
# General purpose
npx source-map-explorer dist/**/*.js
# Check package size before installing
npx package-phobia <package-name>
# Compare alternatives
npx bundlephobia-cli compare lodash ramda
# Update patch versions only
npm update
# Update specific package
npm install package@latest
# Update everything
npx npm-check-updates -u
npm install
npm test
npx npm-check-updates -i
# Options:
# a - update all
# space - toggle selection
# enter - apply selected
{
"dependencies": {
// Runtime dependencies only
},
"devDependencies": {
// Build/test tools only
},
"peerDependencies": {
// For libraries only
},
"optionalDependencies": {
// Platform-specific (rare)
}
}
npm ci in CI/CD (not npm install)# .github/dependabot.yml
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
groups:
dev-dependencies:
dependency-type: "development"
juliusbrussee/caveman
mattpocock/skills
shadcn/improve
obra/superpowers
forrestchang/andrej-karpathy-skills
vercel-labs/skills