Engineering
Dependency Upgrade
Upgrade dependencies one major at a time with changelogs read, breaking changes fixed, lockfile committed, tests green, and a staged rollout.
- Skill
dependency-upgrade- Version
- 1.0.0
- License
- MIT
- By
- Christensen Equity · Austin Christensen
- dependencies
- security
- maintenance
- npm
- upgrades
Use this skill
Claude Code: install for your user
curl -fsSL --create-dirs -o ~/.claude/skills/dependency-upgrade/SKILL.md https://www.austinchristensen.tech/skills/dependency-upgrade/SKILL.mdOr download SKILL.md and drop it in .claude/skills/dependency-upgrade/ in a project, upload it in Claude.ai under Settings → Capabilities → Skills, or view the source.
When the agent uses it
Upgrade project dependencies safely, one major version or tightly related group at a time, by reading changelogs and migration guides, applying breaking-change fixes, updating the lockfile, running the full test and build suite, and rolling out in stages. Use when the user asks to "update dependencies", "bump X to v5", "fix these Dependabot PRs", "patch this CVE", or "upgrade the framework". Works for npm, pnpm, yarn, pip/uv/poetry, bundler, cargo, and go modules. Not for adding a brand-new library or rewriting the stack, and never merges or deploys without approval.
Dependency Upgrade
Upgrades break in two ways: many changes land at once so nobody can tell which one broke things, or the changelog said exactly what would break and nobody read it. This skill does one thing at a time and reads first.
When to use
- Routine maintenance, a security advisory, or a framework major version.
- A pile of automated update PRs that needs triage.
Inputs
- The repo and its package manager (look for the lockfile:
package-lock.json,pnpm-lock.yaml,yarn.lock,uv.lock,poetry.lock,Gemfile.lock,Cargo.lock,go.sum). - Which packages, or "everything that's outdated".
- The test, typecheck, lint, and build commands, and whether CI runs them.
Workflow
- Inventory. List outdated packages and known vulnerabilities:
Sort into patch, minor, and major. Flag anything with a security advisory.npm outdated; npm audit --omit=dev # or: pnpm outdated, pip list --outdated, bundle outdated, cargo outdated - Plan batches. Patches and minors of unrelated packages can go together. Each major gets its own branch and PR. Packages that must move together (a framework and its plugins, a type package and its library) are one batch. Security fixes go first.
- Read before changing. For each major: the changelog or release notes between the current and target version, the migration guide, deprecations, new minimum runtime versions (Node, Python), and peer-dependency changes. Write down every breaking change that touches this codebase. Check the package is still maintained and the release is not a few hours old.
- Upgrade on a fresh branch.
Use the package manager so the lockfile is regenerated, never hand-edited. Run any official codemods the migration guide provides.git checkout -b deps/next-15 origin/main npm install next@15 eslint-config-next@15 - Fix breakages. Work through the list from step 3, then whatever the compiler and tests find. Keep changes limited to what the upgrade needs.
- Verify everything. Clean install, then lint, typecheck, unit and integration tests, production build, and a smoke run of the app's critical path. Compare bundle size or startup time if the dependency is central.
- Open the PR with the old and new versions, a link to the changelog, the breaking changes handled, what was tested, and how to roll back (revert the PR, restoring the previous lockfile). Commit the lockfile with the manifest.
- Roll out in stages. Deploy to a preview or staging environment first, then production with the health check watching errors and latency. Back out quickly if errors climb.
Output
Per batch, a PR plus a short summary:
## next 14.2.35 -> 15.1.0
Changelog: <link> · Migration guide: <link>
Breaking changes handled:
- async request APIs: updated `cookies()` calls in 3 route handlers
- fetch no longer cached by default: added explicit cache options on 2 pages
Verified: clean install, lint, typecheck, 212 tests, build, manual checkout flow on preview
Not upgraded: react 19 (separate PR, peer dependency of a charting library not ready)
Rollback: revert this PR
Guardrails
- One major per PR. Never "update all" across majors in a single change.
- Never delete and regenerate the whole lockfile to make an error go away; it silently upgrades everything.
- Don't add
--forceor--legacy-peer-depswithout explaining the conflict and getting agreement. - Don't disable or skip tests to get a green build.
- Be wary of brand-new releases and packages that changed maintainers; a short delay is cheap insurance against a compromised publish.
- Never merge, deploy, or publish without the user's approval.
Handoff
Write the PR body with pr-description. Watch production after the deploy with app-health-check. For many parallel upgrade branches run by agents, track them with coding-agent-handoff.
Works well with
- PR DescriptionWrite a PR title and body from the real diff, covering what changed, why, how it was tested, the risks, and what the reviewer should look at first.
- Review to PRsAudit a subsystem, file one issue per bug, then ship one small tested PR per fix that a reviewer can merge or revert on its own.
- App Health CheckCheck uptime, errors, and core funnel metrics for a live app, log the result, and alert only when a human needs to act.
- Coding Agent HandoffKeep a written ledger of every spawned coding agent, check it is alive, and never report done without a PR link or commit hash.