python-dependency-update
Skill16 starsChanged 25 days agoMITView on GitHub
Update dependencies in Python projects. Use for Dependabot security alerts, package upgrades, and transitive dependency updates. Use when: (1) resolving Dependabot security alerts, (2) updating a specific package, (3) patching a security vulnerability.
In this repository34 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .claude/conventions/AGENTS.mdAGENTS.md
- python/AGENTS.mdAGENTS.md
- swift/AGENTS.mdAGENTS.md
- typescript/AGENTS.mdAGENTS.md
- .claude/conventions/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- python/CLAUDE.mdCLAUDE.md
- swift/CLAUDE.mdCLAUDE.md
- typescript/CLAUDE.mdCLAUDE.md
- add-conventionSkill
- ci-optimizationSkill
- code-reviewSkill
- convention-auditSkill
- create-prSkill
- dependabot-alertsSkill
- e2e-debuggingSkill
- frontend-designSkill
- github-markdown-bodiesSkill
- living-spec-auditSkill
- openapi-client-genSkill
- python-dependency-managementSkill
- python-dependency-tree-analysisSkill
- python-quality-checkSkill
- ship-featureSkill
- ship-prSkill
- skill-creatorSkill
- spec-reviewSkill
- stacked-prsSkill
- technical-feature-designSkill
- typescript-dependency-tree-analysisSkill
- typescript-dependency-updateSkill
- typescript-quality-checkSkill
- ui-visual-reviewSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 6 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Run uv commands from the relevant subproject directory.
- Very specific: line 55
If several projects use the same package, update every relevant pyproject.toml together.
- Very specific: line 72
If --upgrade-package does not update the dependency, the cause is not lowest-direct.
- Very specific: line 83
If a parent dependency pins an old version, uv lock --upgrade-package alone will not solve it.
- Distinctive: line 92
Update the parent dependency first, using Case A or Case B.
- Distinctive: line 94
If it still cannot be resolved, stop and explain clearly:
- Distinctive: line 112
When processing multiple alerts at once:
- Very specific: line 131
Do not use [tool.uv.override].
- Very specific: line 132
Do not edit uv.lock manually.
- Distinctive: line 133
Do not run uv commands from the repository root.
- Distinctive: line 134
After the update, run git diff --stat and confirm no unrelated files changed.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Python Dependency Update
Workflow for updating dependencies in the Python monorepo, which uses uv workspaces.
Preparation
Run uv commands from the relevant subproject directory.
cd /path/to/azents/python/apps/{project-name}
# or
cd /path/to/azents/python/libs/{project-name}Update flow
Step 1: Identify the target
Determine whether the package to update is a direct dependency or a transitive dependency.
# Check whether it is explicitly listed in pyproject.toml
grep -r "{package-name}" python/apps/*/pyproject.toml python/libs/*/pyproject.toml
# Check the current version in the lockfile
grep -A2 'name = "{package-name}"' python/apps/{project}/uv.lockStep 2: Run the update
Case A: Direct dependency (present in pyproject.toml)
Edit the version in pyproject.toml, then refresh the lockfile.
Version specifier rules are the same as in the python-dependency-management skill:
- Runtime dependencies in apps (
apps/*): exact version (==) - Dev dependencies in apps (
apps/*): minimum version (>=) - All dependencies in libraries (
libs/*): minimum version (>=)
# Edit pyproject.toml directly with the Edit tool.
# App example: "aiohttp==3.9.0" → "aiohttp==3.11.12"
# Library example: "aiohttp>=3.9.0" → "aiohttp>=3.11.12"
cd /path/to/azents/python/apps/{project-name}
uv lockIf several projects use the same package, update every relevant pyproject.toml together.
Case B: Transitive dependency (not present in pyproject.toml)
The lowest-direct resolution strategy does not pin transitive dependencies. Transitive dependencies usually resolve to the latest compatible version. Update only the lockfile:
cd /path/to/azents/python/apps/{project-name}
uv lock --upgrade-package {package-name}Confirm that the lockfile version changed:
grep -A2 'name = "{package-name}"' uv.lockIf --upgrade-package does not update the dependency, the cause is not lowest-direct; check these possibilities:
- Lockfile preference: uv prefers the existing lockfile version. Add an explicit version constraint to force the target:
uv lock --upgrade-package '{package-name}>={target-version}' - Parent dependency constraint: another package sets an upper bound such as
{package-name}<X.Y. - Compatibility conflict: required version ranges from multiple packages do not overlap.
Case C: Another dependency blocks the update
If a parent dependency pins an old version, uv lock --upgrade-package alone will not solve it.
- Find which package requires the dependency:
# Search uv.lock for entries that list the package as a dependency
grep -B10 '{package-name}' uv.lock- Update the parent dependency first, using Case A or Case B.
- If it still cannot be resolved, stop and explain clearly:
- Which parent package constrains the version
- Whether the latest version of that parent package still has the constraint
- Options the user can evaluate, such as replacing the parent package or opening an upstream issue
Step 3: Verify
# Confirm the target version in the lockfile
grep -A2 'name = "{package-name}"' uv.lock
# Run the subproject type checker
cd /path/to/azents/python/apps/{project-name}
uv run ty check --error-on-warningHandling Dependabot security alerts in batches
When processing multiple alerts at once:
# List open alerts
gh api repos/{owner}/{repo}/dependabot/alerts \
--jq '.[] | select(.state=="open") | {
number,
severity: .security_advisory.severity,
package: .security_vulnerability.package.name,
patched: .security_vulnerability.first_patched_version.identifier
}'Group alerts for the same package and target the highest patched version among them.
A Python package may be used by several subprojects, so inspect every relevant lockfile.
Notes
- Do not use
[tool.uv.override]; forced versions unrelated to dependency constraints are hard to track. - Do not edit
uv.lockmanually; always refresh it with uv commands. - Do not run uv commands from the repository root; run them from the subproject directory.
- After the update, run
git diff --statand confirm no unrelated files changed. - Tell the user when a major version upgrade may include breaking changes.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

