update-dependencies — Claude Code command for dependency updates
This command checks for outdated packages and security issues, then guides dependency updates by strategy. Use it for routine upgrades or a security-focused pass.
npx claude-code-templates@latest --command setup/update-dependenciesWhat update-dependencies does
The command inspects project manifests and lock files, then checks package versions and security issues. It looks for package.json, requirements.txt, or Cargo.toml and their corresponding lock files. Choose an update strategy with --patch, --minor, --major, or --security-only.
It lays out staged upgrades, with tests and build checks between stages. The workflow also calls for reviewing breaking changes and preparing rollback steps and documentation updates. The checks vary by stack: Node.js uses npm audit, while Python uses pip check, so confirm that the suggested command fits the package manager in your project.
What it helps with
- find outdated packages in a project
- check dependencies for security issues
- limit upgrades to security fixes
- stage package updates with checks between them
- prepare rollback and migration notes
Example prompts for the agent
- Check the project and apply security-only dependency updates:
/update-dependencies --security-only. - Review patch upgrades and test the project between stages:
/update-dependencies --patch. - Assess major version upgrades, including breaking changes:
/update-dependencies --major.
How to install update-dependencies
1claude-code-templates
npx claude-code-templates@latest --command setup/update-dependencies2Manually: put the files in place
.claude/commands/update-dependencies.mdCall it with /update-dependencies. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/update-dependencies.mdCall it with /prompts:update-dependencies. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/update-dependencies.prompt.mdManually: put the files in place
.gemini/commands/update-dependencies.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
Questions about update-dependencies
How do I install update-dependencies in Claude Code?
Run npx claude-code-templates@latest --command setup/update-dependencies. The command file is at .claude/commands/update-dependencies.md.
What does update-dependencies do?
It checks package versions and security issues, then guides dependency upgrades with testing and compatibility checks. Pass a strategy such as --patch or --security-only.
Which update strategies can I use?
Choose --patch, --minor, --major, or --security-only. The workflow calls for checks between upgrade stages.
Source text
update-dependencies.md · MIT
--- allowed-tools: Read, Write, Edit, Bash argument-hint: "[update-strategy] | --patch | --minor | --major | --security-only" description: Update and modernize project dependencies with comprehensive testing and compatibility checks --- # Update Dependencies Update and modernize project dependencies with safety checks: **$ARGUMENTS** ## Current Dependencies State - Package manager: @package.json or @requirements.txt or @Cargo.toml (detect package manager) - Outdated packages: !`npm outdated 2>/dev/null || pip list --outdated 2>/dev/null || echo "Manual check needed"` - Security issues: !`npm audit --audit-level=moderate 2>/dev/null || pip check 2>/dev/null || echo "Run security audit"` - Lock files: @package-lock.json or @poetry.lock or @Cargo.lock ## Task Systematically update project dependencies with comprehensive testing and compatibility validation: **Update Strategy**: Use $ARGUMENTS to specify patch updates, minor updates, major updates, or security-only updates **Update Process**: 1. **Dependency Analysis** - Audit current versions, identify outdated packages, assess security vulnerabilities 2. **Impact Assessment** - Check changelogs, breaking changes, deprecation warnings, compatibility matrix 3. **Staged Updates** - Apply patch updates first, then minor, finally major versions with testing between stages 4. **Testing & Validation** - Run full test suite, build verification, integration testing, performance checks 5. **Rollback Strategy** - Document changes, create restore points, maintain rollback procedures 6. **Documentation Updates** - Update README, dependencies list, migration guides, team notifications **Safety Features**: Automated testing between updates, dependency conflict resolution, security vulnerability prioritization. **Output**: Updated dependency manifest with comprehensive testing results, security audit report, and upgrade documentation.
© davila7 · MIT · davila7/claude-code-templates