| name | dependency-manager |
| description | Manage project dependencies — update packages, audit vulnerabilities, resolve conflicts, and keep dependencies healthy. Use when updating packages, fixing vulnerability alerts, or resolving dependency issues. |
| allowed-tools | ["Read","Grep","Glob","Bash"] |
| tags | ["dependencies","npm","yarn","pip","packages","vulnerabilities","security","updates","audit"] |
| platforms | ["Claude","ChatGPT","Gemini"] |
| author | locusai |
Dependency Manager
When to use this skill
- Updating outdated dependencies
- Fixing security vulnerability alerts (Dependabot, npm audit)
- Resolving dependency conflicts or version mismatches
- Adding new packages (choosing the right ones)
- Cleaning up unused dependencies
- Migrating between package managers
Step 1: Assess current state
Node.js / npm / yarn
npm outdated
yarn outdated
npm audit
yarn audit
npm ls --depth=0
npm ls <package-name>
npx depcheck
Python / pip
pip list --outdated
pip-audit
safety check
pipdeptree
Step 2: Update strategy
Semantic versioning guide
MAJOR.MINOR.PATCH
^2.1.0 → allows 2.x.x (minor + patch updates)
~2.1.0 → allows 2.1.x (patch updates only)
2.1.0 → exact version (no updates)
Safe update order
-
Patch updates first — bug fixes, lowest risk:
npm update
-
Minor updates — new features, backward compatible:
npx npm-check-updates --target minor -u
npm install
npm test
-
Major updates — one at a time, may have breaking changes:
npm install <package>@latest
Step 3: Handle vulnerabilities
npm audit
npm audit fix
npm audit fix --force
npm ls <vulnerable-package>
{
"overrides": {
"vulnerable-package": "^2.0.1"
}
}
Step 4: Resolve conflicts
Peer dependency conflicts
npm install --dry-run
npm install --legacy-peer-deps
Lock file conflicts
rm package-lock.json node_modules -rf
npm install
rm yarn.lock node_modules -rf
yarn install
Step 5: Evaluate new packages
Before adding a dependency, check:
npm view <package> time.modified
npm view <package> maintainers
npx package-phobia <package>
npx bundlephobia <package>
npx npm-compare <pkg1> <pkg2>
Decision criteria:
- Maintenance: Last published < 6 months ago?
- Popularity: Reasonable download count?
- Size: Justified for the functionality?
- License: Compatible with your project?
- Dependencies: Minimal transitive deps?
- Alternatives: Can you do this with existing deps or stdlib?
Step 6: Clean up
npx depcheck
npm uninstall <package>
rm -rf node_modules package-lock.json
npm install
npm dedupe
Checklist