greglas75/zuvo/dependency-audit

Claude Code and agent skill by greglas75/zuvo

Trust tier 3
  • community
Source check pending

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-audit

SKILL.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-scanner exit 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 query selectors 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.

CORE FILES LOADED:
1. ../../shared/includes/codesift-setup.md -- [READ | MISSING -> STOP]
2. ../../shared/includes/env-compat.md -- [READ | MISSING -> STOP]
3. ../../rules/cq-patterns.md -- [READ | MISSING -> STOP]
4. ../../shared/includes/run-logger.md -- [READ | MISSING -> STOP]
5. ../../shared/includes/retrospective.md -- [READ | MISSING -> STOP]

If any file is MISSING, STOP. Do not proceed from memory.


Argument Parsing

TokenBehavior
_(empty)_ or fullAll 11 dimensions, scope = project root
[path]Scope to a package or directory (see scope rules below)
--supply-chainD1 (CVE) + D11 (integrity) only
--couplingD6, D7, D8, D9 only
--deadD3 only
--bundleD5 only
--lock-inD7 vendor lock-in focus
--no-apiSkip Bundlephobia and OpenSSF API calls

Path scope rules:

Path points toManifest found?D1-D5, D11 (external)D6-D10 (internal)
Package root (own package.json)YesScore for this packageScore within path
Subdirectory within a packageInherited from parentMark INHERITEDScore within path
No package.json aboveNoMark SKIPPEDScore 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.

ToolTriggerReasonSkip allowed?
find_dead_codeAlwaysKEY — unused exports = dead code = candidate dead depsNO
find_unused_importsAlwaysKEY — barrel-file health, dead transitive depsNO
find_circular_depsAlwaysKEY — circular module detection (D6)NO
fan_in_fan_outAlwaysKEY — coupling metrics (D7)NO
check_boundariesAlwaysD8 architecture boundary violationsNO
audit_scanAlwaysCompound CQ + dep pattern checkNO
analyze_python_depsPython detectedD1 supply-chain CVE check via PyPINO when Python
Stack-specific toolsFramework/language detectedStack-specific dep gatesNO 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)
Mandatory-tools-acknowledgment: I will run find_dead_code + find_unused_imports + find_circular_deps + fan_in_fan_out + check_boundaries + audit_scan + analyze_python_deps (when Python) + stack-specific tools for this dependency audit. Every D-dim finding will cite a `path/to/file.ext:LINE` resolving in the current tree.
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
Step 1: Find package.json at TARGET_ROOT, walk up to project root if needed.
If not found -> STOP: "No package.json. This skill requires Node.js."
Step 2: Find lockfile (package-lock.json, pnpm-lock.yaml, yarn.lock, bun.lockb).
Step 3: Validate package manager works: <pm> ls --json 2>&1
Decision matrix:
| Manifest | Lockfile | node_modules | Action |
|----------|----------|-------------|--------|
| Yes | Yes | Yes | Full audit D1-D11 |
| Yes | Yes | No | STOP: "Run <pm> install first." |
| Yes | No | Yes | D1 capped at 6/15. D1.5 = CRITICAL. |
| Yes | No | No | STOP: "No lockfile and no node_modules." |
| No | -- | -- | STOP: "No package.json found." |
0.2 Package Manager Detection
SignalPM
package-lock.jsonnpm
pnpm-lock.yamlpnpm
yarn.lockYarn (detect version: yarn --version, 1.x = Classic, 2+ = Berry)
bun.lockb or bun.lockBun
0.3 Framework Detection (for D8 layer rules)
SignalFrameworkLayer Pattern
next.config.*Next.js App Routerapp/ (server) -> lib/ -> components/ (client)
nest-cli.json or @nestjs/coreNestJScontrollers -> services -> repositories
vite.config.* + no SSRVite SPApages -> features -> shared
express in depsExpressroutes -> middleware -> services
0.4 Tool Availability

Run in parallel:

bash
# Tier 1 -- PM built-in
<pm> audit --json 2>/dev/null
<pm> ls --json 2>/dev/null
<pm> outdated --json 2>/dev/null
# Tier 2 -- npx (no install)
npx knip --reporter json 2>/dev/null
npx license-checker --json --production 2>/dev/null
# Tier 3 -- check availability
npx depcruise --version 2>/dev/null
npx madge --version 2>/dev/null

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:

bash
npx --yes depcruise --no-config --output-type json --metrics TARGET_ROOT

With madge (fallback):

bash
npx --yes madge --json TARGET_ROOT
npx --yes madge --circular --json --ts-config tsconfig.json TARGET_ROOT
npx --yes madge --orphans --json TARGET_ROOT

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:

AgentDimensionsInput
Supply Chain ScannerD1, D4, D11PM audit, lockfile, license data, OSV/Socket + typosquat/confusion/postinstall heuristics
Coupling AnalyzerD6, D7, D8, D9dep-cruiser/madge output
Freshness CheckerD2, D3, D5PM 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
CheckGoodBadSeverity
Known CVEsZero critical/high CVEs in production depsUnpatched critical CVECRITICAL
Install scriptsOnly trusted packages run postinstallUnknown package with postinstallHIGH
Signature verificationLockfile signatures verifiedNo signature verificationMEDIUM
Git dependenciesZero git deps in productiongit+ URLs bypass registry auditingHIGH
Lockfile integrityCommitted, matches manifest, reproducibleMissing or diverged lockfileHIGH

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
CheckGoodBadSeverity
Major version lagWithin 1 major version of latest3+ major versions behindHIGH
Maintenance statusActive maintainer, recent releasesAbandoned (no release > 2 years)HIGH
Deprecated packagesZero deprecated depsUsing packages with npm deprecate noticeMEDIUM
D3: Dead Dependencies -- Weight 10, Max 10
CheckGoodBadSeverity
Unused production depsZero unused in dependenciesPackage in manifest, never importedHIGH
Phantom dependenciesAll imports resolve to declared depsImport works only because of hoistingMEDIUM
Duplicate functionalityOne library per task (date, HTTP, validation)lodash + underscore + ramda all installedMEDIUM

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
CheckGoodBadSeverity
Copyleft in productionZero GPL/AGPL in bundled codeGPL dependency in production appCRITICAL
Unknown licensesAll deps have declared licensesMissing license fieldMEDIUM
License compatibilityAll licenses compatible with project licenseConflicting license chainHIGH

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
CheckGoodBadSeverity
Heavy dependenciesAlternatives exist for large deps (moment -> dayjs, lodash -> native)500 KB+ dep used for one functionHIGH
Tree-shaking supportsideEffects: false in dep, ESM exportsCommonJS-only dep in frontend bundleMEDIUM
Duplicate versionsSingle version in bundle3 versions of the same packageMEDIUM
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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/greglas75/zuvo/dependency-audit/badge)](https://verified-skill.com/skills/greglas75/zuvo/dependency-audit)

Something wrong with this skill or its page? Tell us.