agentleFS
juzoreijuzorei/bumpmap/skills/dependency-upgrade/SKILL.md

dependency-upgrade

Skill0 starsChanged 17 days agoMITView on GitHub

Land a breaking dependency upgrade safely — read the changelog's breaking changes, bump one dependency at a time, codemod the code, run the tests, bisect the failure. Use whenever the user asks to "upgrade", "update" or "bump" a dependency, mentions a major version migration (pydantic v1→v2, requests→httpx, FastAPI, Django major), a Renovate/Dependabot PR is failing CI and needs landing, requirements/pyproject are outdated, or asks "can we upgrade to X". For planning which pins are risky, and for executing the upgrade end-to-end. Not a blind `pip install -U` — that's what this skill exists to prevent.

  • Installs packages

25 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use incident-response, code-review and 3 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • AnthropicSkill

    incident-response

    Run an incident response workflow — triage, communicate, and write postmortem. Trigger with "we have an incident", "production is down", an alert that needs severity assessment, a status update mid-incident, or when writing a blameless postmortem after resolution.

    Also in 3 projects that use this

  • GoogleSkill

    code-review

    Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.

    Also in 6 projects that use this

  • GoogleSkill

    tdd

    Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.

    Also in 4 projects that use this

  • MicrosoftSkill

    handoff

    Compact the current conversation into a handoff document for another agent to pick up.

    Also in 3 projects that use this

  • +1 more from google

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 24 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Tests must exist before the bump: If coverage of the affected area is thin, write characterization tests *against the old version* first — …

    line 53
  2. Distinctive:

    Run the app's real entrypoint once (import errors and plugin loading failures don't show in unit tests).

    line 59
  3. Very specific:

    Check for deprecated-API warnings from the new version (-W error::DeprecationWarning in pytest) — they're next major's breaking changes, …

    line 60
  4. Distinctive:

    If the project has a lockfile, regenerate it in the same commit.

    line 61

“Common” is measured: kept by at least 6 in 10 of the 24 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Dependency upgrade

Renovate and Dependabot open the PR. This skill lands it: a breaking major upgrade is code migration work, and "just bump the version" is how production breaks. The contract: one dependency at a time, changelog before bump, tests after every step, and a bisect when something breaks.

Install the CLI:

pip install bumpmap

1. Plan: which upgrades are even dangerous

bumpmap plan pyproject.toml            # or requirements*.txt; --json for agents
== requirements.txt
  [MAJOR   ] pydantic     1.10.13  -> 2.7.4
            major jump 1.10.13 -> 2.7.4: read the changelog's breaking changes and plan code changes before bumping
  [MINOR   ] requests     2.31.0   -> 2.32.3
            changelog: https://requests.readthedocs.io/en/latest/community/updates/

Risk classes: latest (already current), minor (same major — usually safe, tests still decide), major (breaking changes possible — the real work), unpinned (pin it first, an unpinned dependency can't be planned). Exit 1 on any major — CI-gateable. --from-cache pypi.json replays a saved PyPI lookup offline.

Work in this order: all minor bumps in one commit (tests decide), then major jumps one dependency per commit — a break after a combined commit is unbisectable.

2. Read the changelog like a migration guide, not like news

For a major jump, open the changelog/migration guide and extract the exhaustive list of breaking changes that touch the code. Then grep the codebase for each affected API before bumping:

grep -rn "from pydantic import" --include="*.py" | wc -l     # blast radius first

If the blast radius is a handful of call sites, the migration is a bounded task; if it's 200 files, say so and propose doing it in modules. The changelog's own migration sections (pydantic v2, httpx, pytest 8…) usually include codemod tools — run the official codemod first, fix what it leaves.

3. The loop: bump → run → fix → commit

pip install "pydantic==2.7.4"       # bump the pin too, in the same commit
pytest -q                            # the tests decide
# fix what broke; repeat until green
git commit -m "upgrade pydantic 1.10 -> 2.7 (breaking; migration notes applied)"
  • Tests must exist before the bump. If coverage of the affected area is thin, write characterization tests against the old version first — they encode current behavior the migration must preserve (or deliberately change, with a note).
  • One break that you can't fix quickly? Bisect it the same way: which test, which API, which changelog entry. A dead end after honest effort is a result: report "blocked by X, Y unchanged" instead of half-reverting.
  • Don't mix an upgrade commit with feature work — the revert of an upgrade should be one revert.

4. Verify beyond the tests

  • Run the app's real entrypoint once (import errors and plugin loading failures don't show in unit tests).
  • Check for deprecated-API warnings from the new version (-W error::DeprecationWarning in pytest) — they're next major's breaking changes, cheaper to fix now.
  • If the project has a lockfile, regenerate it in the same commit; a half-updated lock is a broken deploy.
  • Re-run bumpmap plan after: the dependency should now read latest, and no new major lines should appear.

5. Report

upgraded: pydantic 1.10.13 → 2.7.4 (major; 14 call sites migrated, official codemod + 3 manual fixes)
verified: 231 tests green; entrypoint boots; deprecation warnings: 0
not touched: flask 2.x→3.x (next; separate commit), requests 2.32.3 (minor, landed with the batch)

Say what was upgraded, what was deliberately left, and what the next follow-up is — an upgrade report with "not touched" lines is a plan, not an excuse.

Scope

Upgrades in projects you own. The skill assumes the project has runnable tests; upgrading a major without any tests is a different conversation — propose writing characterization tests first instead of bumping blind.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.