Catalogue / dep-upgrade
dep-upgrade
MITSignedUpgrades a uv project's dependencies behind pip-audit and tests. Use when the user wants dependencies upgraded or vuln-checked. Not for adding one (uv add).--- name: dep-upgrade description: Upgrades a uv project's dependencies behind pip-audit and tests. Use when the user wants dependencies upgraded or vuln-checked. Not for adding one (uv add). argument-hint: "uv.lock.bak uv.lock" user-invocable: true metadata: section: python ---
dep-upgrade
Upgrades a uv-managed project's dependencies under a safety net: snapshot, lock, audit for CVEs, gate on the test suite, then classify what broke.
CANARY: dep-upgrade-loaded-2026-06-04-ea39c2b5-719c61e6e84e1453
When to load
Load for a deliberate upgrade of a uv project — refreshing the lockfile, chasing CVEs, pulling newer versions. Adding one package is a plain uv add; tooling scaffolding belongs to python-bootstrap.
Step 1 — Snapshot, then upgrade
cp uv.lock uv.lock.bak # keeps the change reviewable and revertible uv lock --upgrade # or --upgrade-package NAME for one targeted bump uv sync # lock rewrites the file only; tests need the new install
Prefer --upgrade-package when chasing one CVE or feature, because a repo-wide upgrade folds dozens of changes into one diff and hides the culprit.
Step 2 — See what changed
python3 "${CLAUDE_SKILL_DIR}/scripts/compare_lockfile.py" uv.lock.bak uv.lockIt splits changed into direct (declared in pyproject.toml) and transitive, with counts, plus added and removed — read this rather than the raw git diff uv.lock, which is mostly hash noise. Read the transitive bumps: they can pass locally on a cached wheel and fail a clean install, so re-resolve in a clean environment before trusting green.
Step 3 — Audit for CVEs
uv run --with pip-audit pip-audit
Run it through uv run so it audits the project's environment; a bare uvx pip-audit audits only its own isolated tool environment. Answer a finding by moving forward to the patched release; pinning back onto the vulnerable version reintroduces it. Surface any advisory with no fixed version as a risk.
Step 4 — Test gate and classify
make test # or: uv run pytest
Green: rm uv.lock.bak (a git add -A would commit a second lockfile), then report the upgrade with the direct/transitive breakdown and any CVE findings. Red: classify each failure as a behaviour change in a direct dep (read its changelog), a transitive bump exposing a latent bug, or a real incompatibility. Pin the minimum necessary in pyproject.toml, re-lock and re-run; fix the code or the pin rather than the test.
| File | Size | SHA-256 |
|---|---|---|
| SKILL.md | 2.5 kB | e356f1d44357 |
| SKILVAULT_SOURCE.json | 1.3 kB | 1b1b9208cdd9 |
| THIRD_PARTY_NOTICES.md | 1.1 kB | 6139d641c9a6 |
| evals/loading_verification.json | 728 B | 68d7370c88c1 |
| scripts/compare_lockfile.py | 5.0 kB | 2be9222ba0c7 |
Published verbatim from the pinned commit. Nothing is rewritten.
| Version | Pinned commit | Signed | |
|---|---|---|---|
| 0.1.0 Current | 47b135f39834 | 2 Dec 2026 |
Locking a skill to one version needs Pro.