Dependency Audit
Purpose
Understand and assess the dependency tree: what's installed, its risk (vulnerabilities, maintenance, license), and whether additions are justified — so the project stays lean and safe.
When to Use
- During an existing-project audit or before a migration.
- When evaluating whether to add a dependency.
- For a security/quality pass touching supply chain.
- Not to add packages speculatively.
Inputs
- The manifest and lockfile (read-only).
- The task's need (for add/remove decisions).
Discovery Questions
- What does each major dependency provide, and is it still used?
- Any known advisories (from
npm/pnpm/yarn audit or equivalent)?
- Are there duplicates, unused, or abandoned packages?
- Does a proposed addition justify its weight/lock-in?
Responsibilities
- Inventory dependencies and versions from manifest + lockfile.
- Identify known vulnerabilities (advisories) and their severity.
- Flag unused, duplicate, or abandoned packages.
- Assess license and maintenance risk.
- Judge new additions on need vs weight/lock-in.
- Recommend changes with justification (no unrequested installs).
Required Workflow
- Read manifest + lockfile.
- Run available advisory tooling —
agentflow drift for npm projects (installed vs latest stable, advisories, deprecations, Node EOL, smallest safe version), plus the ecosystem's own audit — and quote results (or mark "unverified until run").
- Identify unused/duplicate/abandoned packages.
- Assess license/maintenance risk.
- Recommend add/remove/upgrade with justification. Report drift as available vs recommended: a newer version is not by itself a reason — recommend an upgrade only for a trigger in
../../system/TECHNOLOGY_GOVERNANCE_RULES.md §4 (vulnerability, end of life, required feature, compatibility, deprecation), with its urgency.
Decision Rules
- Address Critical/High advisories before release (
../../system/SECURITY_RULES.md).
- Prefer removing/upgrading over adding.
- A new dependency needs a clear need and a weight/lock-in note.
- Don't upgrade blindly across majors — flag breaking changes (feeds
migration-planning).
Rules
- Read-only inventory; no installs without approval.
- Quote advisory output; flag unrun checks.
- Don't add packages "to be safe."
Anti-Patterns
- Bloating the tree with convenience libraries.
- Ignoring advisories.
- Blind major upgrades without a migration plan.
- Claiming a clean tree without running audit tooling.
Validation Checklist
Definition of Done
A dependency report: inventory, advisories with severity, unused/duplicate/abandoned findings, license/maintenance risks, and justified recommendations — with no unapproved installs.
Related Skills
existing-project-audit, environment-audit, security-review, migration-planning, stack-recommendation, final-quality-audit.
Related Knowledge
../../knowledge/ (stack decisions).
Related References
../../mcp/RECOMMENDED_SERVERS.md if a tool is needed.
Context Loading Guidance
- Requires: manifest + lockfile; the add/remove need if relevant.
- Does not require: full source, unrelated references, planning skills' bodies.
- May load:
security-review for advisory severity; migration-planning for upgrades.
- Stop when: the dependency report is recorded.
Token Efficiency Guidance
Work from the manifest/lockfile and tool output, not the whole codebase. Summarize; quote only decisive advisory lines.
1---2name: dependency-audit3description: Use to inventory and assess a project's dependencies — versions, known vulnerabilities, unused/duplicate packages, license and maintenance risk, and heavy additions. Recommends changes with justification; never bloats the tree "to be safe."4metadata:5 source: https://skillmd.com/skills/ahtishamshahzad/dependency-audit6---78# Dependency Audit910## Purpose1112Understand and assess the dependency tree: what's installed, its risk (vulnerabilities, maintenance, license), and whether additions are justified — so the project stays lean and safe.1314## When to Use1516- During an existing-project audit or before a migration.17- When evaluating whether to add a dependency.18- For a security/quality pass touching supply chain.19- **Not** to add packages speculatively.2021## Inputs2223- The manifest and lockfile (read-only).24- The task's need (for add/remove decisions).2526## Discovery Questions2728- What does each major dependency provide, and is it still used?29- Any known advisories (from `npm/pnpm/yarn audit` or equivalent)?30- Are there duplicates, unused, or abandoned packages?31- Does a proposed addition justify its weight/lock-in?3233## Responsibilities3435- Inventory dependencies and versions from manifest + lockfile.36- Identify **known vulnerabilities** (advisories) and their severity.37- Flag **unused, duplicate, or abandoned** packages.38- Assess **license and maintenance** risk.39- Judge **new additions** on need vs weight/lock-in.40- Recommend changes with justification (no unrequested installs).4142## Required Workflow43441. Read manifest + lockfile.452. Run available advisory tooling — `agentflow drift` for npm projects (installed vs latest stable, advisories, deprecations, Node EOL, smallest safe version), plus the ecosystem's own audit — and quote results (or mark "unverified until run").463. Identify unused/duplicate/abandoned packages.474. Assess license/maintenance risk.485. Recommend add/remove/upgrade with justification. Report drift as **available vs recommended**: a newer version is not by itself a reason — recommend an upgrade only for a trigger in `../../system/TECHNOLOGY_GOVERNANCE_RULES.md` §4 (vulnerability, end of life, required feature, compatibility, deprecation), with its urgency.4950## Decision Rules5152- Address Critical/High advisories before release (`../../system/SECURITY_RULES.md`).53- Prefer removing/upgrading over adding.54- A new dependency needs a clear need and a weight/lock-in note.55- Don't upgrade blindly across majors — flag breaking changes (feeds `migration-planning`).5657## Rules5859- Read-only inventory; no installs without approval.60- Quote advisory output; flag unrun checks.61- Don't add packages "to be safe."6263## Anti-Patterns6465- Bloating the tree with convenience libraries.66- Ignoring advisories.67- Blind major upgrades without a migration plan.68- Claiming a clean tree without running audit tooling.6970## Validation Checklist7172- [ ] Dependencies + versions inventoried.73- [ ] Advisories checked (or flagged unrun).74- [ ] Unused/duplicate/abandoned flagged.75- [ ] License/maintenance risk assessed.76- [ ] Add/remove/upgrade recommendations justified.7778## Definition of Done7980A dependency report: inventory, advisories with severity, unused/duplicate/abandoned findings, license/maintenance risks, and justified recommendations — with no unapproved installs.8182## Related Skills8384`existing-project-audit`, `environment-audit`, `security-review`, `migration-planning`, `stack-recommendation`, `final-quality-audit`.8586## Related Knowledge8788`../../knowledge/` (stack decisions).8990## Related References9192`../../mcp/RECOMMENDED_SERVERS.md` if a tool is needed.9394## Context Loading Guidance9596- **Requires:** manifest + lockfile; the add/remove need if relevant.97- **Does not require:** full source, unrelated references, planning skills' bodies.98- **May load:** `security-review` for advisory severity; `migration-planning` for upgrades.99- **Stop when:** the dependency report is recorded.100101## Token Efficiency Guidance102103Work from the manifest/lockfile and tool output, not the whole codebase. Summarize; quote only decisive advisory lines.