update-node-deps
Skill12 starsChanged 2 months agoMITView on GitHub
Audit and update Node.js/JavaScript project dependencies using native package-manager commands (npm, pnpm, yarn, bun). Auto-applies patch updates silently, asks before minor, and confirms each major individually. Cross-checks changelogs via Context7 and security advisories before each batch. Use when the user asks to update dependencies, bump packages, check outdated packages, or audit security in a JS/TS project.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- ivklgn/bag-of-skillsword for word, first seen Sep 4, 2026
Other versions1 project uses a version of this.
Word for word · 1
- ivklgn/bag-of-skills★ 12100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository22 other files it gives its agents.
- AGENTS.mdAGENTS.md
- new-skillSkill
- review-and-releaseSkill
- 12-factor-appsSkill
- ask-meSkill
- audit-websiteSkill
- can-i-useSkill
- code-reviewerSkill
- compatibility-auditSkill
- explain-branch-changesSkill
- humanizer-ruSkill
- humanizerSkill
- jsdocSkill
- load-branch-changesSkill
- nextjs-developerSkill
- recapSkill
- reset-permissionsSkill
- review-golangSkill
- seo-auditSkill
- simplify-code-commentsSkill
- test-health-checkSkill
- update-golang-depsSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
17 rules. About 0 are common, 9 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 21
If multiple lockfiles exist, ask the user which one is authoritative.
- Very specific: line 22
If no lockfile and no packageManager field, default to npm and note it.
- Distinctive: line 26
Read the matching reference file for exact native commands — do not hardcode them in this workflow:
- Very specific: line 35
Check for: workspaces array in root package.json, pnpm-workspace.yaml, turbo.json, nx.json, or lerna.json.
- Distinctive: line 37
If detected, ask the user whether to:
- Very specific: line 44
Run git status --porcelain -- package.json '*lock*'.
- Distinctive: line 48
Use the PM's native outdated command (from the reference file) with JSON output.
- Distinctive: line 58
Run the PM's native audit command (from the reference file) in JSON mode.
- Distinctive: line 105
Ask the user: approve the batch, deselect specific packages, or skip tier entirely.
- Distinctive: line 115
Ask per-package: apply / skip / defer-to-later.
- Distinctive: line 119
Run after each tier (and after each individual major):
- Very specific: line 122
If tsconfig.json exists: run npx tsc --noEmit (or the typecheck script if defined in package.json).
- Very specific: line 123
If scripts.build exists in package.json: run it via the PM.
- Very specific: line 124
If scripts.test exists: offer to run it (don't force — tests can be slow).
- Distinctive: line 129
Do not proceed to the next tier.
- Very specific: line 167
Respect
engines.node: if a major update's changelog says it requires a newer Node than engines.node, flag and skip. - Very specific: line 168
One PM at a time: do not mix (e.g., do not npm install in a pnpm project).
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Update Node.js Dependencies
Audit and update Node.js project dependencies safely, one semver tier at a time. Use native package-manager commands only — no npm-check-updates or other third-party wrappers.
Step 1: Detect the package manager
Determine the PM in this order (stop at first match):
packageManagerfield inpackage.json(corepack convention:"pnpm@9.x","yarn@4.x", etc.).- Lockfile presence:
pnpm-lock.yaml→ pnpmyarn.lock→ yarn (detect classic vs berry via.yarnrc.ymlpresence oryarn --version)bun.lockborbun.lock→ bunpackage-lock.json→ npm
- If multiple lockfiles exist, ask the user which one is authoritative.
- If no lockfile and no
packageManagerfield, default to npm and note it.
Step 2: Load the PM reference
Read the matching reference file for exact native commands — do not hardcode them in this workflow:
- npm → references/npm.md
- pnpm → references/pnpm.md
- yarn (classic or berry) → references/yarn.md
- bun → references/bun.md
Step 3: Detect workspaces / monorepo
Check for: workspaces array in root package.json, pnpm-workspace.yaml, turbo.json, nx.json, or lerna.json.
If detected, ask the user whether to:
- Target the root
package.jsononly - Target a single workspace (list discovered workspace paths)
- Iterate all workspaces sequentially
Step 4: Check git cleanliness
Run git status --porcelain -- package.json '*lock*'. If either package.json or the lockfile is dirty, warn the user — a dirty baseline makes tier rollback ambiguous. Ask whether to continue, stash, or abort.
Step 5: List outdated packages
Use the PM's native outdated command (from the reference file) with JSON output. Parse into rows:
{ name, current, wanted, latest, dependencyType }Exclude packages using workspace: / catalog: / link: / file: / git+ protocols — these are local or pinned on purpose.
Step 6: Run the security audit
Run the PM's native audit command (from the reference file) in JSON mode. Record advisories keyed by package name, with severity (critical / high / moderate / low) and the fixed-in version.
Step 7: Categorize by semver
For each outdated package, classify the jump from current to latest:
- Patch:
1.2.3→1.2.5(same major.minor). - Minor:
1.2.3→1.3.0(same major). - Major:
1.2.3→2.0.0(major bump).
Pre-1.0 rule (enforce strictly — pre-1.0 libraries break often):
0.2.3→0.2.9= patch0.2.3→0.3.0= major (not minor — treat minor-in-zeromajor as breaking)0.2.3→1.0.0= major
Step 8: Fetch changelogs (minor + major only)
Patch changelogs are noise — skip them. For each minor and major update, fetch release notes in this order:
- Context7 MCP:
mcp__context7__resolve-library-idwith the package namemcp__context7__query-docswith the resolved ID andquery="changelog"(retry withquery="releases"orquery="breaking changes"if empty)
- GitHub releases via
gh:- Find repo URL:
npm view <pkg> repository.url --json 2>/dev/null gh release view v<version> -R <owner>/<repo>(try with and without thevprefix)- Or
gh release list -R <owner>/<repo> --limit 10to inspect multiple hops
- Find repo URL:
- WebFetch fallback:
https://github.com/<owner>/<repo>/releasesorhttps://www.npmjs.com/package/<pkg>
Summarize each into one line: "Adds X. Deprecates Y. **Breaking:** Z." — keep breaking-change callouts prominent.
Step 9: Apply updates in tiers
Apply in strict order: patch → minor → major. After each tier, run verification (Step 10) before proceeding to the next tier. If verification fails, offer rollback and stop.
Tier 1 — Patches (auto-apply)
Apply all patch updates and all security-fix updates (regardless of semver range) as one batch. Use the PM's batch patch-update command from the reference. Do not prompt. Report count after.
Tier 2 — Minor (approval gate)
Present the full minor batch as a markdown table:
| Package | Current → Latest | Fixes advisory? | Changelog summary |Ask the user: approve the batch, deselect specific packages, or skip tier entirely. Apply approved packages; report.
Tier 3 — Major (per-package confirmation)
Iterate majors one at a time. For each:
- Show
current → latest - Show changelog summary with breaking changes flagged
- Link codemod / migration guide if found in the changelog
- Note any type-definition changes (
@types/*jumps often come with API shifts)
Ask per-package: apply / skip / defer-to-later. Apply each approved major individually, run install, then immediately run verification (Step 10). If verification fails for a specific major, offer rollback of just that package and continue to the next major.
Step 10: Verify
Run after each tier (and after each individual major):
- Install must have exited 0.
- If
tsconfig.jsonexists: runnpx tsc --noEmit(or thetypecheckscript if defined inpackage.json). - If
scripts.buildexists inpackage.json: run it via the PM. - If
scripts.testexists: offer to run it (don't force — tests can be slow).
On failure:
- Report the exact error (first 50 lines).
- Offer rollback:
git checkout -- package.json <lockfile>then re-run the PM's install. - Do not proceed to the next tier.
Step 11: Final report
Emit a concise markdown report:
# Node.js Dependencies Update Report
**Package manager:** pnpm (detected via pnpm-lock.yaml)
**Scope:** root (or workspace path)
## Applied
- patch: 12 packages (2 fixed advisories)
- minor: 5 packages (1 fixed advisory)
- major: 2 packages
## Skipped / deferred
- `react@19.0.0` — deferred, needs app-wide migration review
- `eslint@9.0.0` — skipped, flat-config migration blocker
## Security advisories
- Resolved: 3 (HIGH: 1, MODERATE: 2)
- Remaining: 1 (LOW — no fix available upstream)
## Verification
- install: ok
- typecheck: ok
- build: ok
- tests: not run (user declined)Guardrails
- Never use
--forceor--legacy-peer-depswithout explicit user approval. Peer-dep errors are signal, not noise. - Never bypass git hooks. Never commit or push. The user reviews and commits themselves.
- Skip
overrides/resolutionsentries inpackage.json— they exist to pin problem versions; mention them in the report instead. - Preserve
workspace:/catalog:/link:/file:protocols — do not rewrite to literal versions. - Respect
engines.node: if a major update's changelog says it requires a newer Node thanengines.node, flag and skip. - One PM at a time: do not mix (e.g., do not
npm installin a pnpm project).
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.

