package-upgrade

Upgrade npm and Cargo dependencies while auditing vulnerabilities and minimizing override debt.

Updated Oct 14, 2024
One-click install
npx skills add https://github.com/tktcorporation/food-shop-search --skill package-upgrade-tktcorporation
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: package-upgrade
Source: https://github.com/tktcorporation/food-shop-search/tree/main/.claude/skills/package-upgrade
Command: npx skills add https://github.com/tktcorporation/food-shop-search --skill package-upgrade-tktcorporation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Updating dependencies blindly risks pulling in supply-chain attacks (like Shai-Hulud worms), leaving known vulnerabilities unpatched, and accumulating override debt in pnpm.overrides or Cargo [patch.crates-io] that never gets cleaned up. This Skill turns dependency upgrades into a repeatable, security-first workflow. ## Core Features & Use Cases - Vulnerability-first triage: Starts from pnpm audit / cargo audit results and accepted-advisory ledgers to prioritize what actually needs updating, rather than bumping everything at once. - Supply-chain hardening: Respects pnpm defenses like minimumReleaseAge cooldowns, strictDepBuilds, and blockExoticSubdeps, and requires human review of lockfile diffs for unexpected transitive deps or new build scripts. - Override debt management: Treats overrides as a last resort, exhausts alternatives first (upgrading direct deps, checking upstream, accepting with records), and audits existing overrides on every run to remove ones that are no longer needed. - Use Case: When dependabot opens a PR or pnpm audit reports a new GHSA, run this workflow to safely update the package, verify the lockfile diff, decide whether an override is justified, add the right changeset, and report what debt was paid down. ## Quick Start Ask the AI to update the project's vulnerable dependencies safely and check whether any existing pnpm overrides can now be removed.

Frequently Asked Questions about package-upgrade

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I safely update npm dependencies against supply-chain attacks?▼

Update packages through pnpm update so the minimumReleaseAge cooldown filters out freshly published versions, then review the pnpm-lock.yaml diff for unexpected transitive dependencies or new build scripts before running install, lint, and tests.

How to fix pnpm audit vulnerabilities in transitive dependencies?▼

First upgrade the direct dependency that pulls the vulnerable transitive package, then check whether upstream has a fix in progress. Only add a pnpm.overrides entry as a last resort, and record why it is needed and the condition for removing it.

What is pnpm minimumReleaseAge and should I bypass it?▼

minimumReleaseAge is a pnpm setting that excludes package versions published within a cooldown window, preventing you from grabbing unvetted releases. Bypass it via minimumReleaseAgeExclude only for clear cases like a critical CVE hotfix, and clean up the exclusion afterward.

Does this workflow support Rust Cargo dependencies?▼

Yes, it covers Cargo alongside npm. It uses cargo audit and cargo outdated for triage, treats [patch.crates-io] entries as override debt to minimize, and runs cargo build and cargo test for updated crates.

When should I add a changeset for a dependency update?▼

Add a bump-level changeset whenever the update changes runtime artifacts, such as libraries shipped to users; security fixes are usually patch bumps. Updates limited to devDependencies or CI tooling can use an empty changeset or none, depending on CI requirements.

Why does pnpm install fail with ERR_PNPM_IGNORED_BUILDS after updating?▼

The strictDepBuilds setting blocks build scripts from dependencies not on the allowBuilds allowlist, causing install to fail. Investigate what the new postinstall script does before allowlisting it, since injected build scripts are a common worm propagation path.