SKILL.md--- name: node-modules-inspector description: > Inspects a project's installed node_modules and produces three reports: duplicated packages (installed in multiple versions), packages sorted by install size, and maintenance actions (dep-upgrade opportunities + publint findings, grouped by consumer/author). Use when the user wants to audit dependencies, find duplicate packages, check what's taking up disk space in node_modules, identify outdated peer/prod dependencies that newer dependents could upgrade past, or list publint problems. Available as a CLI (`npx node-modules-inspector report <duplicates|sizes|maintainers> [--json]`) or an MCP stdio server (`npx node-modules-inspector mcp`) exposing the same three reports as agent tools. Works with pnpm, npm, and bun. --- # node-modules-inspector `node-modules-inspector` is a CLI + MCP server that inspects the installed `node_modules` of the current project and produces structured reports. Three reports, same underlying analysis pipeline: | Report | Answers | |---|---| | `duplicates` | Which packages are installed in multiple versions? | | `sizes` | Which packages take up the most disk space? | | `maintainers` | Which consumers have dep-upgrade opportunities or publint issues, grouped by package and author? | Reports run against the real on-disk `node_modules` — no registry calls are required for the basic shape; npm metadata is fetched only to enrich the maintainers report (gated by config). Works with pnpm, npm, and bun. The default `npx node-modules-inspector` (with no subcommand) opens a Vue web UI for humans; agents should use the `report` and `mcp` subcommands below. ## When to reach for this Trigger on any of: - "audit my dependencies", "find duplicate packages", "node_modules cleanup" - "what's taking up disk space in node_modules" - "which deps are outdated" / "what dep-upgrade opportunities are there" - "show me publint issues across my deps" - "who maintains my dependencies" Don't reach for it for: registry-only questions (use `fast-npm-meta`), bundle-size analysis of a single package (use a bundler-specific tool), security audits (use `npm audit` / `osv-scanner`). ## CLI mode All subcommands share these options: - `--root <dir>` — project root (default: cwd) - `--config <file>` — config file (default: `node-modules-inspector.config.{ts,js,json}`) - `--depth <n>` — max dependency depth to traverse (default: `8`) - `--json` — emit JSON to stdout; pretty ANSI table otherwise Progress logs always go to stderr, so `... --json` is pipe-safe. ### duplicates ```sh npx node-modules-inspector report duplicates --json ``` Options: - `--min-versions <n>` — only include packages installed at this many versions or more (default: `2`) - `--limit <n>` — cap result count Output shape: ```json [ { "name": "@typescript-eslint/scope-manager", "versions": ["8.56.1", "8.59.1", "8.59.2", "8.59.4"], "specs": ["@type