razor-unused

Solid

Audits a project's manifest for dependencies no source file imports — the reverse of razor's write-time gates (which block NEW dependencies), this finds EXISTING dead weight. Report-only; never edits any file.

AI & Automation 4 stars 1 forks Updated 4 days ago MIT

Install

View on GitHub

Quality Score: 83/100

Stars 20%
23
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# razor:unused Runs a mechanical audit — declared dependencies (`package.json`, `requirements.txt`/`pyproject.toml`) with no matching import anywhere in the project's source — and presents the findings. Never removes a dependency itself; the user decides. ## 1. Run the script ``` node "${CLAUDE_PLUGIN_ROOT}/scripts/unused-deps.js" <projectDir> ``` Default `<projectDir>` to the current working directory if the user didn't name one. The script: - reads declared deps for whichever ecosystems have a manifest present (node, python — the ecosystems razor's gates already cover), - walks source files (skipping `node_modules`, `dist`, `.git`, and other generated/vendored dirs; test files ARE included — a test-only import still counts as used), - normalizes declared names against import roots in the suppressing direction (e.g. `python-dotenv` counts as used when the code imports `dotenv`) — a false "unused" is the failure mode the script avoids, not the one it risks, - splits misses into two buckets: **unused** (no mention anywhere — source imports, `package.json` scripts, or a root config file) and **needs a resolver-grade check** (the name turns up in a script or config file — eslint/babel/webpack/vite/jest/etc. — or is a `@types/*`/toolchain dep, meaning it's likely invoked as a CLI tool, plugin, or type-only package rather than imported). For a node project, the script also detects whether **knip** is installed or resolvable from the target project. Grep genuinely cannot resol...

Details

Author
V-Songbird
Repository
V-Songbird/razor
Created
3 weeks ago
Last Updated
4 days ago
Language
JavaScript
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category