| name | dependency-management |
| description | Manage project dependencies effectively. Use when adding, updating, or auditing dependencies. Covers version management, security scanning, and lockfiles. |
| allowed-tools | Read, Bash, Glob, Grep |
Dependency Management
Workflows
Security Scanning
npm audit
pnpm audit
pip-audit
safety check
govulncheck ./...
cargo audit
Version Management
Semantic Versioning
- Major (1.0.0): Breaking changes
- Minor (0.1.0): New features, backward compatible
- Patch (0.0.1): Bug fixes, backward compatible
Version Constraints
{
"dependencies": {
"exact": "1.2.3",
"patch": "~1.2.3",
"minor": "^1.2.3",
"range": ">=1.2.3 <2.0.0"
}
}
Lockfiles
Always commit lockfiles for reproducible builds:
package-lock.json or pnpm-lock.yaml (Node.js)
poetry.lock or uv.lock (Python)
go.sum (Go)
Cargo.lock (Rust)
Best Practices
- Pin Versions in Production: Use exact versions or lockfiles
- Update Regularly: Don't let dependencies get too stale
- Review Changelogs: Check breaking changes before major updates
- Test After Updates: Run full test suite after dependency changes
- Minimize Dependencies: Each dependency is a liability
Removing Unused Dependencies
npx depcheck
pip-autoremove
go mod tidy