depguard_sweep
Scan project for unused npm packages and phantom dependencies by cross-referencing imports with package.json.
Instructions
Find unused npm packages in the project. Scans source files for imports and cross-references with package.json. Also detects phantom deps (installed but not declared). Call this after a coding session where you installed multiple packages — some may no longer be needed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to project root (must contain package.json) | |
| includeDevDependencies | No | Include devDependencies in scan (default: false) |