update-dependencies
Skill2 starsChanged 5 months agoMITView on GitHub
Safely update dependencies in any JavaScript/TypeScript project — npm, pnpm, yarn, or bun, single package or monorepo: discover outdated packages, research release notes for breaking changes, migrate code where needed, and verify with a clean rebuild. Use when the user asks to update, upgrade, or bump packages or dependencies, check for outdated modules, or bring the dependency tree up to date.
- Installs packages
24 other projects use a version of this.
Adopted by
Most recently taken up by
- erumkatzwan/agentic-product-startertheir own version, first seen Nov 22, 2026
- microsoft/juncotheir own version, first seen Nov 22, 2026
- torrust/torrust-trackertheir own version, first seen Nov 16, 2026
- heypinchy/pinchytheir own version, first seen Nov 16, 2026
- Krzysztof318/MailFathomtheir own version, first seen Nov 15, 2026
- Kindness-Kismet/Storage-redirection-X-Publictheir own version, first seen Nov 9, 2026
Used with
Projects with it also use review-pr and tdd.
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.
DockerSkillreview-pr
Review one or more incoming Docker documentation pull requests as a maintainer. Independently validate technical claims, assess editorial fit and information architecture, choose a verdict, and draft exact inline or PR-wide feedback behind a confirmation gate. Use for requests such as "review PR 123", "is this PR correct?", "does this information belong here?", "validate this PR", or "help review backlog PRs". Do not use to maintain or fix a PR you own; use maintain-pr for that.
Also in 3 projects that use this
GoogleSkilltdd
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 3 projects that use this
Other versions24 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 24
- microsoft/fluentui-blazor★ 4.9ksame name
- danbooru/danbooru★ 2.9ksame name
- testcontainers/testcontainers-node★ 2.7ksame name
- IndrajeetPatil/ggstatsplot★ 2.2ksame name
- GoogleCloudPlatform/magic-modules★ 979same name
- torrust/torrust-tracker★ 539same name
- Kindness-Kismet/Storage-redirection-X-Public★ 536same name
- microsoft/dcp★ 197same name
- heypinchy/pinchy★ 193same name
- nateberkopec/dotfiles★ 164same name
14 more not listed
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 repository28 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- find-skillsSkill
- skill-creatorSkill
- anti-sycophancySkill
- clear-and-shortSkill
- coding-standardsSkill
- convert-plan-to-featureSkill
- dead-code-removalSkill
- delegation-promptSkill
- document-generateSkill
- execute-changeSkill
- live-app-security-auditSkill
- new-featureSkill
- plan-eng-reviewSkill
- pr-review-requestSkill
- pr-reviewSkill
- repo-change-summarySkill
- security-vulnerability-scanSkill
- session-cleanupSkill
- session-handoffSkill
- sonar-issue-checkSkill
- sonar-issue-fixSkill
- systematic-debuggingSkill
- trim-initial-bundleSkill
- unslopSkill
- verify-frontend-changeSkill
- verify-implementationSkill
- windows-disk-cleanupSkill
The file
We split this skill into the rules it gives an agent
9 rules. 0 are common, 6 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 24 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 19
If arguments were provided ($ARGUMENTS), limit the entire workflow to those packages.
- Distinctive: line 34
Never commit or push: Leave changes on the work branch for the user to review.
- Very specific: line 38
Run this before anything else.
- Distinctive: line 50
Verify clean tree: If git status --porcelain is non-empty, stop and ask the user to stash or commit before proceeding.
- Very specific: line 57
Run the outdated command for the detected package manager — see references/package-managers.md.
- Distinctive: line 79
Update all patch/minor bumps in one pass, then prove the baseline is green before touching any major.
- Distinctive: line 97
If a "safe" bump breaks something (semver violations happen), treat that package like a major: research its release notes and either …
- Distinctive: line 107
Can't get it green: after a genuine migration effort → revert that group's version bumps, install, confirm green again, and record the …
- Distinctive: line 126
Run the gates detected in Step 0 (skip the ones that don't exist):
“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.
Files
Update Dependencies
Update dependencies using a research-first workflow: bulk-update semver-safe versions, then handle each major bump individually — read its release notes, migrate the codebase for breaking changes, and verify before moving on. Works for any package manager (npm, pnpm, yarn Classic or Berry, bun) and any layout (single package or monorepo).
If arguments were provided ($ARGUMENTS), limit the entire workflow to those packages; otherwise process everything that is outdated.
Current workspace state
Working tree status (must be empty before starting):
!git status --porcelain
Ground rules
These are non-negotiable for every run:
- No assumptions. If something is genuinely unclear — a migration path with multiple viable options, a breaking change that alters runtime behavior users depend on, a pin whose reason you can't determine — stop and ask the user with concrete options. Mechanical migrations don't need permission; decisions do.
- Your internal knowledge of package versions and APIs is outdated. Never decide "latest version is X" or "the new API is Y" from memory. Always fetch the current state: the package manager's outdated command,
npm view, and the package's own release notes / changelog / migration guide (GitHub Releases,CHANGELOG.md, official docs) via WebSearch/WebFetch. - The project's declared runtime is the target. Derive it once in Step 0 (
engines.node,.nvmrc, or.node-version; fall back to the major ofnode --versionand NOTE that fallback in the report). Do not adopt anything requiring a newer Node major: keep@types/nodeon the detected major (latest patch within it), and before any major bump checknpm view <pkg>@<version> engines— if it requires a newer Node than the project targets, skip it and record why in the report. - Never commit or push. Leave changes on the work branch for the user to review.
Step 0 — Detect environment
Run this before anything else; everything downstream depends on it. Read references/package-managers.md for the per-PM command mapping.
- Package manager (from the lockfile at repo root):
pnpm-lock.yaml→ pnpm;package-lock.json→ npm;yarn.lock→ yarn;bun.lockorbun.lockb→ bun (Bun ≥1.2 emits the textbun.lock). If multiple lockfiles are present, or none, stop and ask the user which to use. - Yarn flavor (only if yarn): distinguish Classic (v1) from Berry (≥2) via the root
packageManagerfield or the presence of.yarnrc.yml— their command sets differ materially (see the reference). Default to Classic only if neither signal is present andyarn --versionreports 1.x. - Workspace layout:
pnpm-workspace.yaml, or aworkspacesfield in the rootpackage.json→ monorepo; otherwise single-package. - Runtime target: derive from
engines.node, then.nvmrc, then.node-version. If none exist, fall back to the major ofnode --versionand NOTE that fallback in the final report.@types/nodeis capped at the detected major. - Quality gates: inspect root
package.jsonscriptsand take whichever ofbuild/typecheck/lint/testexist, plus common aliases (check,test:unit). Gates that don't exist are skipped AND reported as missing in the final report. - Manifest discovery: use the Glob tool with
**/package.json, excludingnode_modulesand build-output dirs. Note which manifest declares each dependency; the root manifest carriespackageManagerand any overrides (pnpm.overrides/overrides/resolutions). For pnpm 11+, overrides may live inpnpm-workspace.yamlinstead of (or in addition to)package.json— check both locations. - Build-output directories: identify and record the project's actual build-output directories — check
.gitignore, tsconfig/bundleroutDirconfig, or common conventions (dist,build,.next,.turbo,*.tsbuildinfo) — for reuse in Step 6's clean rebuild.
Preflight
- Verify clean tree. If
git status --porcelainis non-empty, stop and ask the user to stash or commit before proceeding. git fetch origin --prune- Detect the default branch:
git symbolic-ref refs/remotes/origin/HEAD(strip to the short name). If that fails, probeorigin/main, thenorigin/master, thenorigin/developin order. If still ambiguous, ask the user. - Create the work branch:
git checkout -B agent/update-dependencies/<timestamp>-<rand> origin/<default>.
Step 1 — Discover
Run the outdated command for the detected package manager — see references/package-managers.md. (pnpm example shown.)
pnpm outdated -rCapture the full list: package, current → latest, and which workspace manifests declare it. Note that the outdated command of npm/pnpm exits non-zero when packages are outdated — that is the success case, not an error; never gate on its exit code.
Nothing outdated → stop here. If the outdated command reports nothing at all — or nothing matching the packages named in $ARGUMENTS — there is no work to do. Return to the branch you were on (git checkout -), delete the work branch just created (git branch -D <work-branch>), and report "nothing to update" (naming the requested packages, if any). Do not run the remaining steps.
Step 2 — Classify and group
Split the outdated list into:
- Safe: patch and minor bumps.
- Major: anything crossing a major version — these get individual research.
- Pinned/excluded:
@types/nodeabove the detected major, anything whose new version requires a newer Node than the project targets, and anything the user asked to skip.
Lockstep grouping. Some package families must move together rather than one at a time — mixing majors within them causes peer-dependency chaos. Recognize a family by: packages in the same npm scope versioned in sync, and documented companion packages. See references/lockstep-ecosystems.md for known families. If a family is mirrored in root overrides, the overrides must be updated in the same change.
Step 3 — Apply safe updates
Update all patch/minor bumps in one pass, then prove the baseline is green before touching any major. Use the in-range bulk-update command for the detected PM (pnpm example):
pnpm up -r # within declared ranges
pnpm install
pnpm build && pnpm typecheck && pnpm lint && pnpm test # run the gates that existThe in-range bulk update only moves versions within declared ranges, so re-run the outdated command afterwards: any remaining non-major bump held back by a ~ or exact range needs an explicit bump-to-version (the per-PM "explicit bump" form in the reference — e.g. pnpm up -rL <pkg>@<target>), or it will silently never update.
Manifest-rewrite behaviour differs by PM: see the manifest-rewrite note in references/package-managers.md (read in Step 0). Review the manifest diff after the bulk pass regardless of PM.
Release-age gating: some package managers hold back freshly published versions by policy (pnpm 11 defaults to a 1-day minimumReleaseAge; npm has min-release-age settings; yarn has --no-time-gate; bun has install.minimumReleaseAge). If a version that should be available appears missing or held back, this is policy, not an error — report it in the final report and do not attempt to force past it.
yarn Berry has no in-range-only bulk command — yarn up resolves to latest and crosses majors, which would break this step's safe-baseline guarantee. On a Berry repo, skip the bulk pass and instead bump each non-major outdated package explicitly (yarn up <pkg>@<target>), then treat every major via Step 4 as usual.
A peer-dependency conflict is a research case, not an install-flag case — this holds for every install in the run, Step 3 and Step 4 alike. An npm ERESOLVE error, or any unmet-peer complaint from another PM, means one package's declared peer range has not caught up with what you just installed. Identify which package declares the offending range (npm view <pkg> peerDependencies), then either bump that package too — it is often a lockstep-family member (Step 2) — or revert the update that caused the conflict. Never pass --legacy-peer-deps or --force, or another package manager's equivalent escape hatch, without asking the user first: they suppress the error, not the incompatibility.
If a "safe" bump breaks something (semver violations happen), treat that package like a major: research its release notes and either migrate or revert it. Do not start majors on a red baseline.
Step 4 — Handle majors, one group at a time
For each major bump (or lockstep group) — in a monorepo, process upstream workspace libraries before their downstream consumers (no-op for a single package):
- Research first, bounded to the major boundaries. Fetch the release notes at each MAJOR version boundary crossed between current and target, plus that major's official migration guide — those are the documents to read in full. The intermediate minor/patch releases in between are only SCANNED for breaking-change markers (a
BREAKING CHANGEnote, a removal, a deprecation), not read end to end. You can parallelize this across background sub-agents — research the next group while migrating the current one — but never skip it. Identify each breaking change and check whether this codebase actually uses the affected API (Grepfor the symbols). - No breaking changes that touch our usage → run the explicit bump-to-version for the PM, install, verify, move on.
- Breaking changes that touch our usage → update the package, then migrate the code autonomously. Spawn a general-purpose sub-agent and feed it the relevant freshly fetched migration-guide excerpts — its training knowledge is as outdated as yours. If the host project defines a matching domain expert agent, delegate to it instead. Keep changes surgical: only what the migration requires.
- Verify after each group: the existing build + typecheck + lint + test gates for the affected packages. A green gate before the next group is what makes failures attributable.
- Can't get it green after a genuine migration effort → revert that group's version bumps, install, confirm green again, and record the revert with the blocking error in the report. Don't let one stubborn package stall the whole run.
- Behavioral decisions (changed runtime defaults, removed feature with several replacements, anything that alters what ships to production) → ask the user before migrating. That is rule 1, not an exception to autonomy.
Step 5 — Root metadata
packageManager/ corepack (only when the project pins a package manager; corepack applies to pnpm and yarn only): checknpm view <pm> version; if newer, update the pin (e.g.corepack use pnpm@latest). Important: corepack is only available where explicitly installed — it was bundled with Node.js experimentally through Node 24, but is not bundled with Node 25+. If the project usesdevEngines.packageManager(supported by npm ≥10.9 and pnpm 11), prefer updating that field as the modern pin. If corepack is not on PATH, fall back to the on-PATH PM binary and note it in the report.- Overrides —
pnpm.overrides(pnpm pre-11:package.json; pnpm 11+:pnpm-workspace.yamlonly — apnpm.overridesleft inpackage.jsonis silently ignored, not still-active; treat it as needing migration),overrides(npm; root manifest only),resolutions(yarn). Confirm every override still matches the now-installed versions. Overrides fail in both directions — a stale exact override silently pins transitive deps to old versions, and a loose range override (e.g.>=0.27.2) silently advances them across breaking boundaries (for 0.x packages even a minor is breaking). Check what the lockfile actually resolved for each override, not just the manifests, and disclose any override-driven jump in the report.
Step 6 — Clean rebuild
Prove everything works from scratch, not just incrementally. If the project defines a clean script, run it; otherwise remove node_modules and the detected build-output directories manually (e.g. dist, .turbo, *.tsbuildinfo — use what Step 0 actually found, not a fixed list). Then:
pnpm install # the PM's install command
pnpm build # the project's build gate, if it existsStep 7 — Final quality gates
Run the gates detected in Step 0 (skip the ones that don't exist):
pnpm typecheck && pnpm lint && pnpm testFailures caused by the updates are yours to fix (return to the Step 4 playbook). Pre-existing failures you can PROVE existed before the run (e.g., reproduce them on the base commit) are not — report them explicitly to the user as a list; never silently "fix" unrelated code, and never dismiss a failure without that proof.
Step 8 — Report
End with:
- Updated — table of package, old → new version, manifests touched.
- Migrated — each breaking change handled, with the code changes made (files + what changed and why).
- Skipped / reverted — package, reason (requires a newer runtime than the project targets, failed migration with the blocking error, user-excluded).
- Warnings — deprecation notices, peer-dependency complaints, anything the user should watch. Include any quality gates missing in Step 0, and the runtime-fallback note if
node --versionwas used to derive the target. - Branch — base (the detected default branch), branch name, changed-file count, and suggested next commands (
git diff,git status). No commits were made; say so.
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.

