Audit unused dep
Pause, resume, edit, and audit Claude Code cron jobs (e.g. /loop) without losing state.
npx -y skills add thepictishbeast/claude-tools --skill audit-unused-depAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Scan a Cargo.toml + src/ tree for zero-call-site direct dependencies. Reports candidates with confidence levels; doesn't modify Cargo.toml. Faster + more inspectable than cargo-machete for the common case; complements machete (not a replacement).
SKILL.md
2.4 KB, 550 tokens by cl100k_base, as published. Nobody here has run it
/audit-unused-dep — list direct deps with no code references
Thin wrapper around the audit-unused-dep binary (installed at
~/.local/bin/audit-unused-dep; built by install.sh). Binary
owns: Cargo.toml parse, recursive .rs scan, comment-stripping, +/-
grep, confidence classification.
Steps
-
Invoke the binary (defaults to current dir's Cargo.toml + src/):
audit-unused-dep [--manifest Cargo.toml] [--src src] [--extra-dir bin] [--human]Stdout is JSON (default) or a human-readable table (
--human). Each candidate carries:nameconfidence:high(0 matches anywhere) ormedium(0 in code, N in comments — verify before removing)rationale
-
Triage each
high-confidence candidate:- Verify against
cargo tree -i <name>(sometimes a transitive pulls the same crate; removing the direct dep doesn't help) - Check Cargo.toml
[features]— features may reference deps withoutusein source - Remove the line from
Cargo.toml, runcargo build, run any relevant tests. If clean, commit.
- Verify against
-
Triage
medium-confidence candidates more carefully — the comment matches mean the crate name appears in a doc-string or string literal. Could be:- Documentation reference (keep dep)
- Static-analysis rule that names the crate (keep dep)
- Stale comment from a removed call site (safe to remove)
Net visible tool calls per audit
1–2 total: Bash (audit-unused-dep) + optional Bash
(cargo tree -i for verification).
Compared with cargo-machete: this tool is more inspectable (rationale per candidate) but slightly noisier (medium-confidence candidates are FPs for machete-style "strict no-comments" rules). Use both for cross-check.
When to NOT remove
- Feature-flag-only deps (only
used under#[cfg(feature = "X")]that's off by default) — false-positive for both tools. - Build-time-only deps that show up as
[build-dependencies](this tool already ignores them). - proc-macro deps without an explicit
use(rare but possible — e.g. some derives bring their crate into scope implicitly).