Dependency Updater
Overview
This skill analyzes your project's dependency tree to find outdated packages, known vulnerabilities, and breaking API changes. It produces a prioritized upgrade plan with specific migration steps, ordered to minimize risk and maximize safety.
Instructions
1. Parse the Dependency File
- Read
package.json + lockfile (npm/yarn/pnpm), requirements.txt/pyproject.toml, or go.mod
- List all direct dependencies with current pinned versions
- Note version constraints (^, ~, exact, ranges)
2. Check Each Package
For each dependency:
- Latest version: What's available on the registry
- Version gap: How many major/minor/patch versions behind
- Security: Known CVEs from npm audit, Snyk, or GitHub Advisory Database
- Maintenance: Last publish date, open issues count, whether it's deprecated
- Breaking changes: Read CHANGELOG.md or GitHub releases for breaking change notes between current and latest
3. Classify by Risk
Group packages into four tiers:
- Critical: Known CVE with severity HIGH or CRITICAL — update immediately
- Major: Major version bump with confirmed breaking API changes — needs migration
- Minor: Minor/patch updates with no breaking changes — safe to batch update
- Stale: Package unmaintained (no release in >12 months) — consider replacement
4. Scan for Impact
For Major-tier packages:
- Read the changelog/migration guide for the new version
- Search the codebase for imports and usages of changed APIs
- List affected files with line numbers
- Estimate effort: how many patterns need changing and whether they're automatable
5. Generate Upgrade Plan
Produce an ordered plan:
- Critical (CVE fixes) first — usually patch-level, zero code changes
- Minor/patch batch — single
npm update command
- Each Major upgrade individually, with:
- Exact install command (
npm install package@version)
- Code changes needed (as diffs when possible)
- Test commands to verify
Examples
Example 1: Node.js Project Audit
Input: User provides package.json with 94 dependencies.
Output:
Dependency Audit — 94 packages
CRITICAL (2 packages):
lodash 4.17.20 → 4.17.21
CVE-2021-23337 (Command Injection, HIGH)
Fix: npm install lodash@4.17.21 (patch, no code changes)
node-fetch 2.6.1 → 2.6.13
CVE-2022-0235 (Information Exposure, MEDIUM)
Fix: npm install node-fetch@2.6.13 (patch, no code changes)
MAJOR (1 package):
express 4.18.2 → 5.0.0
Breaking: req.host now returns host without port
Breaking: app.del() removed, use app.delete()
Affected files: src/server.ts:45 (uses req.host), src/routes/legacy.ts:12 (uses app.del)
Migration effort: Low — 2 files, 2 line changes
MINOR (18 packages):
Can be batch-updated: npm update (no breaking changes detected)
STALE (1 package):
request 2.88.2 — DEPRECATED, last release Feb 2020
Recommended replacement: undici or node-fetch
Used in: src/lib/http-client.ts (3 call sites)
Upgrade Order:
Step 1: npm install lodash@4.17.21 node-fetch@2.6.13
Step 2: npm update
Step 3: npm install express@5.0.0 (apply 2 code changes first)
Step 4: Replace request with undici (separate PR recommended)
Example 2: Python Requirements
Input: User provides requirements.txt with pinned versions.
Output:
Dependency Audit — 23 packages
CRITICAL:
django==3.2.18 → 3.2.25
CVE-2024-24680 (DoS via intcomma, MEDIUM)
Fix: pip install django==3.2.25 (patch within same minor)
MAJOR:
django==3.2.25 → 5.0.6 (if full upgrade desired)
Breaking: DEFAULT_AUTO_FIELD must be set explicitly
Breaking: url() removed, use path()
Affected: 8 files in urls/, settings.py
Guidelines
- Never recommend upgrading all major versions at once — one at a time, with tests between each
- For monorepos, check if packages have peer dependency conflicts before recommending upgrades
- If a package is deprecated with no CVE, it's STALE not CRITICAL — don't panic the user
- Always check if the project has a test suite (
npm test, pytest) and recommend running it after each step
- When generating diffs, use the project's actual code, not generic examples
- For workspaces/monorepos, note which workspace each dependency belongs to
1---2name: dependency-updater3description: >-4 Audit project dependencies for outdated packages, security vulnerabilities, and breaking changes.5 Use when someone asks to "check for outdated packages", "audit dependencies", "find vulnerable6 dependencies", "plan dependency upgrades", "detect breaking changes", or "update npm packages safely".7 Analyzes package.json/lock files, cross-references changelogs, and produces ordered upgrade plans.8license: Apache-2.09compatibility: "Supports npm (package.json), yarn (yarn.lock), pnpm (pnpm-lock.yaml), pip (requirements.txt), and Go (go.mod)"10metadata:11 source: https://skillmd.com/skills/eliferjunior/dependency-updater12 author: terminal-skills13 version: "1.0.0"14 category: development15 tags: ["dependencies", "npm", "security", "upgrades", "semver"]16---1718# Dependency Updater1920## Overview2122This skill analyzes your project's dependency tree to find outdated packages, known vulnerabilities, and breaking API changes. It produces a prioritized upgrade plan with specific migration steps, ordered to minimize risk and maximize safety.2324## Instructions2526### 1. Parse the Dependency File2728- Read `package.json` + lockfile (npm/yarn/pnpm), `requirements.txt`/`pyproject.toml`, or `go.mod`29- List all direct dependencies with current pinned versions30- Note version constraints (^, ~, exact, ranges)3132### 2. Check Each Package3334For each dependency:35- **Latest version**: What's available on the registry36- **Version gap**: How many major/minor/patch versions behind37- **Security**: Known CVEs from npm audit, Snyk, or GitHub Advisory Database38- **Maintenance**: Last publish date, open issues count, whether it's deprecated39- **Breaking changes**: Read CHANGELOG.md or GitHub releases for breaking change notes between current and latest4041### 3. Classify by Risk4243Group packages into four tiers:44- **Critical**: Known CVE with severity HIGH or CRITICAL — update immediately45- **Major**: Major version bump with confirmed breaking API changes — needs migration46- **Minor**: Minor/patch updates with no breaking changes — safe to batch update47- **Stale**: Package unmaintained (no release in >12 months) — consider replacement4849### 4. Scan for Impact5051For Major-tier packages:52- Read the changelog/migration guide for the new version53- Search the codebase for imports and usages of changed APIs54- List affected files with line numbers55- Estimate effort: how many patterns need changing and whether they're automatable5657### 5. Generate Upgrade Plan5859Produce an ordered plan:601. Critical (CVE fixes) first — usually patch-level, zero code changes612. Minor/patch batch — single `npm update` command623. Each Major upgrade individually, with:63 - Exact install command (`npm install package@version`)64 - Code changes needed (as diffs when possible)65 - Test commands to verify6667## Examples6869### Example 1: Node.js Project Audit7071**Input**: User provides package.json with 94 dependencies.7273**Output**:74```75Dependency Audit — 94 packages7677CRITICAL (2 packages):78 lodash 4.17.20 → 4.17.2179 CVE-2021-23337 (Command Injection, HIGH)80 Fix: npm install lodash@4.17.21 (patch, no code changes)8182 node-fetch 2.6.1 → 2.6.1383 CVE-2022-0235 (Information Exposure, MEDIUM)84 Fix: npm install node-fetch@2.6.13 (patch, no code changes)8586MAJOR (1 package):87 express 4.18.2 → 5.0.088 Breaking: req.host now returns host without port89 Breaking: app.del() removed, use app.delete()90 Affected files: src/server.ts:45 (uses req.host), src/routes/legacy.ts:12 (uses app.del)91 Migration effort: Low — 2 files, 2 line changes9293MINOR (18 packages):94 Can be batch-updated: npm update (no breaking changes detected)9596STALE (1 package):97 request 2.88.2 — DEPRECATED, last release Feb 202098 Recommended replacement: undici or node-fetch99 Used in: src/lib/http-client.ts (3 call sites)100101Upgrade Order:102 Step 1: npm install lodash@4.17.21 node-fetch@2.6.13103 Step 2: npm update104 Step 3: npm install express@5.0.0 (apply 2 code changes first)105 Step 4: Replace request with undici (separate PR recommended)106```107108### Example 2: Python Requirements109110**Input**: User provides requirements.txt with pinned versions.111112**Output**:113```114Dependency Audit — 23 packages115116CRITICAL:117 django==3.2.18 → 3.2.25118 CVE-2024-24680 (DoS via intcomma, MEDIUM)119 Fix: pip install django==3.2.25 (patch within same minor)120121MAJOR:122 django==3.2.25 → 5.0.6 (if full upgrade desired)123 Breaking: DEFAULT_AUTO_FIELD must be set explicitly124 Breaking: url() removed, use path()125 Affected: 8 files in urls/, settings.py126```127128## Guidelines129130- Never recommend upgrading all major versions at once — one at a time, with tests between each131- For monorepos, check if packages have peer dependency conflicts before recommending upgrades132- If a package is deprecated with no CVE, it's STALE not CRITICAL — don't panic the user133- Always check if the project has a test suite (`npm test`, `pytest`) and recommend running it after each step134- When generating diffs, use the project's actual code, not generic examples135- For workspaces/monorepos, note which workspace each dependency belongs to