Dependency Audit Skill
Comprehensive npm dependency security and health check.
Security Audit
-
Run npm audit:
npm audit -
For detailed JSON output:
npm audit --json -
Fix automatically if safe:
npm audit fix -
For breaking changes (be careful):
npm audit fix --force
Outdated Packages
-
Check for outdated:
npm outdated -
Update specific package:
npm update <package-name> -
Update to latest (major versions):
npx npm-check-updates -u npm install
License Check
-
List all licenses:
npx license-checker --summary -
Check for problematic licenses:
npx license-checker --onlyAllow "MIT;Apache-2.0;BSD-2-Clause;BSD-3-Clause;ISC"
Bundle Analysis
-
Analyze bundle size:
npx source-map-explorer dist/**/*.js -
Find duplicate dependencies:
npx npm-dedupe
Output Report
## Dependency Audit Report
### Security
- Critical: X
- High: X
- Medium: X
- Low: X
### Outdated Packages
| Package | Current | Wanted | Latest |
| ------- | ------- | ------ | ------ |
| ... | ... | ... | ... |
### Actions Required
1. [Action with priority]
2. [Action with priority]