greglas75/zuvo/dependency-audit
Claude Code and agent skill by greglas75/zuvo
- community
Checking that the SKILL.md file is still in the repository.
Dependency health and internal coupling audit for Node.js/TypeScript projects. 11 dimensions: supply chain CVEs, supply-chain integrity (typosquat/dependency-confusion/malicious-package/SBOM), freshness, dead dependencies, license compliance, bundle weight, circular dependencies, coupling metrics, architecture boundary violations, barrel file health, and change coupling. Tiered tooling with graceful degradation. Switches: zuvo:dependency-audit full | [path] | --supply-chain | --coupling | --dead | --bundle | --lock-in
Install
npx vskill@latest install greglas75/zuvo/dependency-auditSKILL.md
The same SKILL.md was published earlier as greglas75/zuvo/dependency-audit.
zuvo:dependency-audit
Audit external dependency health and internal module coupling. Scores 11 dimensions with tiered tooling -- gracefully degrades when specialized tools are unavailable.
Scope: Node.js / TypeScript projects (npm, pnpm, yarn, bun). When to use: Before releases, after adding many dependencies, periodic health check, after monorepo restructuring, before lock-in reviews. When NOT to use: Code quality (zuvo:review), DB-specific (zuvo:db-audit), full-stack performance (zuvo:performance-audit), OWASP (/security-audit).
Scanner exit codes: follow../../shared/includes/scanner-invocation.md—npm/pip-audit/osv-scannerexit non-zero WHEN they find vulns (success); never treat non-zero as failure.
Known Limitations
Dispatch follows ../../shared/includes/execution-policy.md through env-compat. Reuse existing authorization within that policy; session restrictions take precedence. Run each required gate and report its actual independence or an unmet requirement.
- Node.js/TypeScript only. Python, Go, Rust, and Java are not supported.
npm queryselectors are npm-specific. pnpm/yarn/bun fall back to lockfile
analysis.
- D5 (bundle impact) uses Bundlephobia API for triage -- not precise without
actual build statistics.
- D7 (instability metrics) requires dependency-cruiser for Ca/Ce/I. Without it,
only fan-in/fan-out via grep.
- D10 (change coupling) requires 3+ months of git history.
- Monorepo workspace scoping is partial -- tools operate on workspace root
unless filtered.
Mandatory File Loading
Read every file below before starting. Print the checklist.
If any file is MISSING, STOP. Do not proceed from memory.
Argument Parsing
| Token | Behavior | |
|---|---|---|
_(empty)_ or full | All 11 dimensions, scope = project root | |
[path] | Scope to a package or directory (see scope rules below) | |
--supply-chain | D1 (CVE) + D11 (integrity) only | |
--coupling | D6, D7, D8, D9 only | |
--dead | D3 only | |
--bundle | D5 only | |
--lock-in | D7 vendor lock-in focus | |
--no-api | Skip Bundlephobia and OpenSSF API calls |
Path scope rules:
| Path points to | Manifest found? | D1-D5, D11 (external) | D6-D10 (internal) | |
|---|---|---|---|---|
Package root (own package.json) | Yes | Score for this package | Score within path | |
| Subdirectory within a package | Inherited from parent | Mark INHERITED | Score within path | |
No package.json above | No | Mark SKIPPED | Score within path |
Safety Gate
This audit is read-only. The only write target is zuvo/audits/. Do not install, uninstall, or modify any dependency. Do not run npm audit fix or equivalent automatically.
MANDATORY TOOL CALLS — Dependency Audit Validity Gate
This audit is INVALID if any tool below is skipped when its trigger condition holds. "DEFERRED", "N/A", "no fresh deps" are NOT valid reasons.
| Tool | Trigger | Reason | Skip allowed? | |
|---|---|---|---|---|
find_dead_code | Always | KEY — unused exports = dead code = candidate dead deps | NO | |
find_unused_imports | Always | KEY — barrel-file health, dead transitive deps | NO | |
find_circular_deps | Always | KEY — circular module detection (D6) | NO | |
fan_in_fan_out | Always | KEY — coupling metrics (D7) | NO | |
check_boundaries | Always | D8 architecture boundary violations | NO | |
audit_scan | Always | Compound CQ + dep pattern check | NO | |
analyze_python_deps | Python detected | D1 supply-chain CVE check via PyPI | NO when Python | |
| Stack-specific tools | Framework/language detected | Stack-specific dep gates | NO when matches |
Forbidden escape hatches: find_dead_code: skipped, find_circular_deps: N/A, codesift: unavailable (when deferred), retrospective: skipped — all REJECTED.
Required POSTAMBLE: report on disk → retro appended → ~/.zuvo/append-runlog exit 0. Every D-dim finding needs path/to/file.ext:LINE (verify-audit gate).
Mandatory acknowledgment (REQUIRED — print verbatim before Phase 0)
CodeSift preload
Use the deterministic preload helper FIRST. Run ~/.zuvo/compute-preload dependency-audit "$PWD" before any ToolSearch. Copy [CodeSift matching trace] verbatim, issue printed ToolSearch(query="select:..."). Math gate enforced.
Phase 0: Preflight
0.1 Manifest and Lockfile
0.2 Package Manager Detection
| Signal | PM | |
|---|---|---|
package-lock.json | npm | |
pnpm-lock.yaml | pnpm | |
yarn.lock | Yarn (detect version: yarn --version, 1.x = Classic, 2+ = Berry) | |
bun.lockb or bun.lock | Bun |
0.3 Framework Detection (for D8 layer rules)
| Signal | Framework | Layer Pattern | |
|---|---|---|---|
next.config.* | Next.js App Router | app/ (server) -> lib/ -> components/ (client) | |
nest-cli.json or @nestjs/core | NestJS | controllers -> services -> repositories | |
vite.config.* + no SSR | Vite SPA | pages -> features -> shared | |
express in deps | Express | routes -> middleware -> services |
0.4 Tool Availability
Run in parallel:
Record which tools are available. Missing tools degrade specific dimensions but do not block the audit.
Phase 1: Data Collection
1.1 External Dependency Data
PM audit output: Vulnerability report with severity levels.
PM outdated output: Current vs latest version for each dependency.
Lockfile analysis:
- Install scripts (
postinstall,preinstall) - Git dependencies (
git+,github:) - Lockfile integrity (uncommitted changes, drift from manifest)
Manifest analysis: Read package.json -- count prod/dev deps, version specifier types (^, ~, exact), overrides, resolutions.
1.2 Internal Dependency Graph
With dependency-cruiser:
With madge (fallback):
Grep fallback (always available): Search for import/export statements to build an approximate dependency graph.
Phase 2: Dimension Analysis (D1-D11)
Agent Dispatch
Refer to env-compat.md for the dispatch pattern.
When parallel dispatch is available:
| Agent | Dimensions | Input | |
|---|---|---|---|
| Supply Chain Scanner | D1, D4, D11 | PM audit, lockfile, license data, OSV/Socket + typosquat/confusion/postinstall heuristics | |
| Coupling Analyzer | D6, D7, D8, D9 | dep-cruiser/madge output | |
| Freshness Checker | D2, D3, D5 | PM outdated, knip output |
D10 (Change Coupling) runs in the lead agent (requires git log).
Without parallel dispatch: Execute all dimensions sequentially.
D1: Supply Chain and Vulnerabilities -- Weight 15, Max 15, Critical Gate
| Check | Good | Bad | Severity | |
|---|---|---|---|---|
| Known CVEs | Zero critical/high CVEs in production deps | Unpatched critical CVE | CRITICAL | |
| Install scripts | Only trusted packages run postinstall | Unknown package with postinstall | HIGH | |
| Signature verification | Lockfile signatures verified | No signature verification | MEDIUM | |
| Git dependencies | Zero git deps in production | git+ URLs bypass registry auditing | HIGH | |
| Lockfile integrity | Committed, matches manifest, reproducible | Missing or diverged lockfile | HIGH |
Critical gate: known exploit-grade CVE in production → triggers FAIL. The gate fires on that FINDING; a D1 score of 0 also fires it but is not required.
D2: Freshness and Maintenance Health -- Weight 10, Max 10
| Check | Good | Bad | Severity | |
|---|---|---|---|---|
| Major version lag | Within 1 major version of latest | 3+ major versions behind | HIGH | |
| Maintenance status | Active maintainer, recent releases | Abandoned (no release > 2 years) | HIGH | |
| Deprecated packages | Zero deprecated deps | Using packages with npm deprecate notice | MEDIUM |
D3: Dead Dependencies -- Weight 10, Max 10
| Check | Good | Bad | Severity | |
|---|---|---|---|---|
| Unused production deps | Zero unused in dependencies | Package in manifest, never imported | HIGH | |
| Phantom dependencies | All imports resolve to declared deps | Import works only because of hoisting | MEDIUM | |
| Duplicate functionality | One library per task (date, HTTP, validation) | lodash + underscore + ramda all installed | MEDIUM |
Use knip output when available. Otherwise grep for import statements and cross-reference against package.json dependencies.
D4: License Compliance -- Weight 8, Max 8, Critical Gate
| Check | Good | Bad | Severity | |
|---|---|---|---|---|
| Copyleft in production | Zero GPL/AGPL in bundled code | GPL dependency in production app | CRITICAL | |
| Unknown licenses | All deps have declared licenses | Missing license field | MEDIUM | |
| License compatibility | All licenses compatible with project license | Conflicting license chain | HIGH |
Critical gate: GPL in production closed-source app → triggers FAIL. The gate fires on that FINDING; a D4 score of 0 also fires it but is not required.
D5: Bundle and Weight Impact -- Weight 8, Max 8
| Check | Good | Bad | Severity | |
|---|---|---|---|---|
| Heavy dependencies | Alternatives exist for large deps (moment -> dayjs, lodash -> native) | 500 KB+ dep used for one function | HIGH | |
| Tree-shaking support | sideEffects: false in dep, ESM exports | CommonJS-only dep in frontend bundle | MEDIUM | |
| Duplicate versions | Single version in bundle | 3 versions of the same package | MEDIUM |
D6: Circular Dependencies -- Weight 12, Max 12, Critical Gate
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/dependency-audit/SKILL.md
Popularity
- Repository stars
- 8
- 7-day trend score
- 11
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/greglas75/zuvo/dependency-audit)