Manage third-party libraries, runtimes, and SaaS dependencies. Use this skill when setting an update cadence, responding to security advisories, dealing with deprecated dependencies, evaluating new dependencies, auditing what's installed, or unblocking a dependency upgrade. Triggers on dependency, package update, security patch, lockfile, deprecated, breaking change, supply chain, dependency audit, npm audit, dependabot, renovate. Also triggers when a build breaks after an update or when an advisory is published for a used package.
72
88%
Does it follow best practices?
Impact
—
No eval scenarios have been run
Advisory
Suggest reviewing before use
Decide what to depend on, keep dependencies current, respond to advisories, and reduce supply chain risk. Stack-agnostic principles; specifics vary by package manager.
code-review-web)security-baseline)vendor-evaluation)performance-optimization)Every dependency falls into one of these. The category drives the policy.
Code that runs in production and would break the system if it failed.
Examples: framework, database driver, payment SDK, authentication library.
Policy:
Code that runs in production but is replaceable or non-critical.
Examples: utility libraries, formatting, non-core integrations.
Policy:
^1.2.3)Code that runs only during development or build, not in production.
Examples: bundlers, linters, test frameworks, type checkers.
Policy:
Tools individual developers use that aren't part of shared dev environment.
Not really managed at the project level. Mentioned for completeness.
When evaluating a dependency, consider:
A dependency abandoned a year ago is a liability waiting to surface.
A small dependency that pulls in 50 transitive packages has the surface area of all 50.
A dependency you can't replace is leverage you've granted to its maintainer.
Every dependency has a cost. Free packages aren't free.
Run a dependency listing:
# npm/yarn/pnpm
npm ls --all --json
# pip
pip list
# gem
bundle listFor each top-level dependency, categorize (critical / supporting / dev). For transitives, you generally don't manage individually unless one becomes a problem.
Run the security audit:
npm audit
yarn audit
pip-audit
bundle auditFor each finding:
| Severity | Direct dep | Indirect dep |
|---|---|---|
| Critical | Patch today | Patch this week (if a fix exists; track if not) |
| High | Patch this week | Patch this month |
| Medium | Patch this month | Track; patch with next round |
| Low | Track | Track |
Critical and high in production code are emergencies. Low and medium are scheduled work.
Even patch-level updates can break things. For critical dependencies:
For supporting and dev:
Major versions break things. Plan rather than rush.
For each major upgrade:
Don't sit on major versions indefinitely. The longer you wait, the more painful the upgrade.
Document:
The policy is what survives team turnover. Without it, dependency management becomes chaotic ad hoc work.
Automation reduces toil. Manual checking doesn't scale.
Quarterly:
depcheck)Remove what's not used. Replace what's unmaintained.
Before adding a new dependency, answer:
Default: don't add. Add only when the value clearly exceeds the cost. The cost includes ongoing maintenance, not just installation.
When removing a dependency:
Removed dependencies sometimes leave config files, CI hooks, or imports behind. Search broadly.
No update cadence. Dependencies drift. When you finally upgrade, it's painful. Set a cadence.
Audit disabled in CI. "Too noisy." Tune the audit, don't disable it. Whitelist known false positives explicitly.
Pinning everything to exact versions. Stops automatic patches. Misses security fixes. Use narrow ranges with a lockfile.
Unpinned floating versions. latest in production. Builds aren't reproducible. Lockfile required.
Adding dependencies without review. "I just needed a quick utility." Now there are 50 unused dependencies. Require review for new dependencies.
Ignoring transitive dependencies. A direct dependency pulls in 50 indirect ones. Each is supply chain surface. Audit the tree, not just the top level.
Patching with major version bumps. "Updating to fix a bug" but the update is a major version. Now you have unrelated breaking changes too. Be deliberate about the version of the fix.
Vendor-bundled libraries. Some dependencies vendor copies of other dependencies. They're not visible to the audit. Periodically check.
Build-time dependencies treated as zero-risk. Build tools have access to your code and credentials. Supply chain attacks target them. Treat with appropriate care.
Fork without rebase plan. Forking a dependency to fix something. Then you own it. Plan how to rebase or merge upstream changes, or commit to maintaining the fork.
No license audit. Project ships with a GPL dependency in a commercial product. Compliance issue. Audit licenses on add and quarterly.
Update PRs piling up. Dependabot PRs go unmerged for months. Either tune to fewer PRs or commit time to merging them.
A dependency policy document includes:
references/upgrade-checklist.md: Step-by-step checklist for performing a major version upgrade of a critical dependency, from changelog reading to staged rollout.8e70d03
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.