agentleFS
kwhornekwhorne/elyra-skills/skills/dependency-update/SKILL.md

dependency-update

Skill1 starsChanged 6 months agoMITView on GitHub

Safely update project dependencies - assess risk, batch by risk level, verify with tests, and produce a clean changelog. Use when the user asks to update dependencies, bump packages, audit outdated deps, or handle a security advisory.

  • Deletes or force-pushes
  • Installs packages

5 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 1

    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:

    Migration guide: if one exists

    line 164
  2. Very specific:

    Keep a dependency-policy.md if your team has rules (no GPL, no abandoned, etc.)

    line 230

“Common” is measured: kept by at least 6 in 10 of the 4 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 Update

Updating dependencies is mostly safe — until it isn't. The discipline: know what you're changing, change it in reviewable chunks, verify each chunk.

When to use

  • "Update dependencies"
  • "What's outdated?"
  • "Bump <package>"
  • "Address this security advisory"
  • "Renovate / Dependabot PR needs review"

Procedure

1. Detect the ecosystem

ls package.json composer.json pyproject.toml Cargo.toml go.mod Gemfile 2>/dev/null
EcosystemList outdatedAuditLockfile
npmnpm outdatednpm auditpackage-lock.json
pnpmpnpm outdatedpnpm auditpnpm-lock.yaml
yarnyarn outdatedyarn audityarn.lock
composercomposer outdatedcomposer auditcomposer.lock
pippip list --outdatedpip-auditrequirements.txt / poetry.lock
cargocargo outdated (plugin)cargo auditCargo.lock
gogo list -u -m allgovulncheck ./...go.sum
bundlerbundle outdatedbundle auditGemfile.lock

Lockfile must be committed. If it isn't, fix that first.

2. Classify each update by risk

RiskIncludesStrategy
🟢 LowPatch bumps (1.2.3 → 1.2.4), dev-only deps, well-maintained libsBatch many in one PR
🟡 MediumMinor bumps (1.2.x → 1.3.0), runtime depsSmall batches, one ecosystem area at a time
🔴 HighMajor bumps (1.x → 2.0), core framework, deps with sprawling APIsOne per PR, read the changelog first
🚨 SecurityCVE / advisoryPrioritize, but still verify — don't break prod to fix theoretical risk

Always read the changelog/release notes for medium and high risk. "Just bump it" is how prod goes down on a Friday.

3. Choose a batching strategy

StrategyWhen
Patch sweepAll patches at once. Quick PR, full test run.
Minor by areaGroup related minors (all React-ecosystem packages together, all build tools together).
One major per PRAlways. Even when "small".
Security firstAddress advisories before voluntary updates.

4. Apply

# npm — interactive
npx npm-check-updates -i

# pnpm — interactive
pnpm update -i

# Targeted bump
npm install lodash@^4.17.21
composer require vendor/pkg:^2.0
pip install --upgrade somepkg
cargo update -p somecrate

5. Verify

For each batch:

  1. Install clean: delete node_modules/etc, reinstall from lockfile
  2. Build passes
  3. Type-check / lint passes
  4. Test suite passes (full, not just affected)
  5. Manually smoke-test the affected areas (especially for medium+ risk)
  6. Run the audit again to confirm advisories are resolved
# npm example
rm -rf node_modules
npm ci
npm run build
npm run test
npm audit

6. Commit & PR

One commit per logical batch:

chore(deps): patch sweep — 12 packages

Patches only, no API changes. Full test suite passes.

- lodash 4.17.20 → 4.17.21
- @types/node 20.10.0 → 20.10.5
- … (see lockfile diff)

For majors, link the relevant changelog:

chore(deps): upgrade react-router 6.x → 7.0 (BREAKING)

Migration notes: https://reactrouter.com/upgrading/v7

Changes required:
- `<Routes>` API split — see commit 1
- Loader signature change — see commit 2

Handling a security advisory

  1. Read the advisory — what's the actual vulnerable code path?
  2. Check reachability — is the vulnerable code actually called from your app? npm audit often flags transitive deps in build tools that never run in prod
  3. Prefer the minimal fix — patch bump > minor > major
  4. If no fix is published:
    • Override the transitive dep (overrides/resolutions in package.json, replace in go.mod, etc.)
    • Pin to a known-safe version
    • Mitigate at the app level (input validation, disabling the affected feature)
  5. Document what you decided and why — silence on a known CVE looks bad in a future audit
# npm — force a resolution
# package.json
{
  "overrides": {
    "vulnerable-pkg": "1.2.3-patched"
  }
}

# pnpm
# package.json
{
  "pnpm": {
    "overrides": {
      "vulnerable-pkg": "1.2.3-patched"
    }
  }
}

Reading a changelog/diff before bumping

For medium/high-risk updates, skim:

  • Breaking changes section — non-negotiable
  • Migration guide if one exists
  • Default behavior changes — these are the silent killers
  • Dropped support (Node version, browser, runtime)
  • Removed/renamed APIs — grep your codebase for them
# Quick: what changed since current version?
# (npm)
npm view <pkg> versions --json
# Browse changelog:
npm view <pkg> repository.url

When NOT to update

  • Right before a release — wait until after
  • On Friday afternoon — wait until Monday
  • Without a working test suite — the suite is the safety net; fix that first
  • If you don't have time to read the changelog for a major
  • For a "newer is better" reason with no actual benefit

Output format

## Dependency update report

**Ecosystem:** <npm / pnpm / composer / …>
**Lockfile diff:** +<n> -<m> entries
**Audit status:** <n> advisories before → <m> after

### Updated (batched by risk)
- 🟢 Patches (n packages): lodash, @types/node, …
- 🟡 Minors (n packages): vite 5.0 → 5.4, …
- 🔴 Majors: react-router 6 → 7 (separate PR)

### Skipped (with reason)
- pkg-x — major bump deferred: depends on N codepaths, needs migration plan
- pkg-y — advisory not reachable in our usage (build-time only)

### Verification
- ✅ Clean install
- ✅ Build
- ✅ Type-check
- ✅ Test suite (n passed, 0 failed)
- ✅ Smoke-tested: <areas>
- ✅ Audit: <result>

### Follow-ups
- …

Anti-patterns

  • ❌ npm audit fix --force without understanding what it changes
  • ❌ Bumping a major across the codebase in one commit
  • ❌ "Updated deps" PR with 50 packages and no notes
  • ❌ Ignoring lockfile changes ("they're auto-generated") — they're the contract
  • ❌ Updating during a release freeze
  • ❌ Adding overrides/resolutions without a comment explaining why
  • ❌ Bumping a dep purely because it's red on npm outdated

Tips

  • Set up Renovate or Dependabot to surface updates as PRs continuously — much easier than batched manual audits
  • Configure auto-merge for patches with passing CI, manual review for minor/major
  • Track license changes when bumping majors (license-checker --summary)
  • Keep a dependency-policy.md if your team has rules (no GPL, no abandoned, etc.)

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.