audit-deps

audit-deps is a command for Claude Code from FlorianBruniaux/node-dep-scope. It costs 0 tokens per session (507 once invoked), scanned A, original, MIT.

A command that scans a JavaScript or TypeScript project's installed packages to find dependencies that may be removable, replaceable, duplicated, or worth reviewing. Dependencies are external code libraries the project uses.

In plain words
What is it for?
Use it to audit project packages, prepare dependency cleanup, and generate migration notes for packages marked for replacement or consolidation.
Why use it?
It helps identify unused libraries, unnecessary package entries, duplicate functionality, and cases where a small native JavaScript feature could replace a dependency.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/florianbruniaux/node-dep-scope/audit-deps
Clone the repo
git clone --depth 1 https://github.com/FlorianBruniaux/node-dep-scope

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for audit-deps

README.md
[![agentmods](https://agentmods.dev/badge/commands/florianbruniaux/node-dep-scope/audit-deps.svg)](https://agentmods.dev/commands/florianbruniaux/node-dep-scope/audit-deps)
Your own site
<a href="https://agentmods.dev/commands/florianbruniaux/node-dep-scope/audit-deps"><img src="https://agentmods.dev/badge/commands/florianbruniaux/node-dep-scope/audit-deps.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 507 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00507
Opus 5 $0.00000 $0.00253
Sonnet 5 $0.00000 $0.00101
Haiku 4.5 $0.00000 $0.00051

Measured 4d ago against content hash 68ab750b9639, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

audit-deps scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/audit-deps.md · 77 lines

What it actually says

Dependency audit with dep-scope

Analyze project dependencies with dep-scope to identify optimization opportunities.

Instructions

1. Run the scan

dep-scope scan

If sources are outside ./src:

dep-scope scan -s ./src ./app ./lib

2. Interpret verdicts

Verdict Action
✗ REMOVE Remove (check: dynamic import? CSS? config file?)
⊕ PEER_DEP Remove from package.json (will stay via peer deps)
↻ RECODE_NATIVE Migrate to native JS (uuid.v4crypto.randomUUID())
⇄ CONSOLIDATE Merge duplicates (keep the most-used lib)
? INVESTIGATE Review manually
✓ KEEP No action needed

3. Generate migration prompts

For RECODE_NATIVE or CONSOLIDATE packages:

dep-scope migrate             # auto-detect all candidates
dep-scope migrate <package>   # target one package

Each command writes .dep-scope/migrate-<pkg>.md — pipe directly into Claude Code:

claude -p "$(cat .dep-scope/migrate-lodash.md)"

4. Produce the audit report

Structure:

## Dependency Audit - [Project]

### Summary
- Total: X deps | Actionable: Y | Estimated savings: ~ZKB

### Quick Wins (< 30 min)
- [ ] `npm uninstall pkg` - reason

### Recommended Migrations
- [ ] pkg → alternative - estimated effort

### Consolidations (duplicates)
- [ ] Category: keep X, migrate Y/Z

### To Investigate
- [ ] pkg - what to check

### False Positives (to ignore)
- pkg - used in config/runtime/CSS

5. Action plan

Phase 1 - Quick Wins: Safe removals, peer deps
Phase 2 - Simple Migrations: uuid→native, classnames→clsx
Phase 3 - Refactoring: Icon consolidation, axios→fetch

Known Limitations

Not detected: @import CSS, config file references (tailwind, babel, eslint plugins).
Dynamic imports (await import()) and require() ARE detected.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 77 lines · 0 tokens per session scan A 68ab750b9639

Subscribe to this mod's changes

audit-deps is a command published in the GitHub repository FlorianBruniaux/node-dep-scope (19 stars, last pushed 3d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 507 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.