一键导入
dep-upgrade
Upgrade Rust dependencies one at a time using cargo outdated. Analyzes impact, checks for API changes, and produces a recommendation before upgrading.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Upgrade Rust dependencies one at a time using cargo outdated. Analyzes impact, checks for API changes, and produces a recommendation before upgrading.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Run and analyze performance benchmarks. Use when working on performance-critical code or comparing changes.
Look up Rust crate documentation in Markdown format from target/doc-md/.
Run all Rust quality checks (fmt, clippy, test, bench). Use before committing or when validating code changes.
Prepare a pull request with quality checks, commit, and PR creation. Use when ready to submit changes for review.
Run security audit on dependencies and review code for vulnerabilities. Use before releases or when updating dependencies.
| name | dep-upgrade |
| description | Upgrade Rust dependencies one at a time using cargo outdated. Analyzes impact, checks for API changes, and produces a recommendation before upgrading. |
Safely upgrade Rust dependencies one crate at a time with full impact analysis.
cargo outdated -R
This shows direct dependencies only (-R excludes transitive). The output columns:
Split the outdated list into three categories:
Patch/minor compatible (Compat column has a version): Safe to upgrade via
cargo update <crate> without changing Cargo.toml. These rarely break anything.
Major version bump (Compat is ---): Requires editing Cargo.toml to change
the version requirement. These may have breaking API changes.
Dev-dependencies (Kind = Development): Lower risk since they don't affect
the published crate. Still verify tests pass.
For each crate, follow this exact sequence:
# Update Cargo.lock without changing Cargo.toml
cargo update <crate>
# Verify it compiles and tests pass
cargo fmt && cargo clippy -- -D warnings && cargo test
# 1. Read the changelog/release notes for the new version
# Look for: breaking changes, removed APIs, renamed types, new required features
# 2. Check what depends on the crate in our code
grep -r "<crate_name>" src/ --include="*.rs" -l
# 3. Generate local docs for the NEW version to understand API changes
# (after updating Cargo.toml)
# 4. Edit Cargo.toml to the new version
# e.g., change `rust-yaml = "1.1"` to `rust-yaml = "1.2"`
# 5. Update the lock file
cargo update <crate>
# 6. Try to compile - fix any breaking changes
cargo check
# 7. If compilation fails, analyze the errors and fix imports/API usage
# 8. Run the full quality gate
cargo fmt && cargo clippy -- -D warnings && cargo test
# 9. If the upgrade is too disruptive, ROLLBACK:
git checkout Cargo.toml Cargo.lock
For each upgrade, assess:
cargo tree -i <crate> before and after.After processing all upgrades, produce a summary table:
| Crate | From | To | Type | Status | Notes |
|------------|--------|--------|---------|-----------|------------------------------|
| clap | 4.6.1 | 4.6.3 | patch | Upgraded | No API changes |
| rust-yaml | 1.1.0 | 1.2.0 | minor | Upgraded | Additive, no breakage |
| criterion | 0.5 | 0.8 | major | Upgraded | dev-dep; bench API unchanged |
cargo audit reports a vulnerability in an outdated dependency