Skip to main content
command CX Codex

remove-unused-dependencies — Claude Code command

remove-unused-dependencies audits selected dependencies inside an approved package and lockfile scope, then checks imports, tests, builds, and packaging before removal.

AGPL-3.0-or-later ★ 96 updated 2026-10-18

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add legioncodeinc/vibe-coding-tools
/plugin install repository-modernization-tools@wasp-nest
Open on GitHub

What remove-unused-dependencies does

The command reviews manually selected dependency removals across the affected packages and workspaces. It checks package names, aliases, subpaths, CLI entries, dynamic loading, tool configuration, generated entry points, scripts, tests, optional branches, public types, peer dependencies, and consumer-facing contracts. Each item is retained, marked unresolved, or prepared as a removal candidate with file and line evidence.

It records the baseline revision, dirty paths, workspace boundaries, package-manager details, existing checks, and their results before editing. Afterward, it inspects the complete manifest and lockfile diff and repeats import, type, test, build, and package checks under matching conditions. A direct declaration can be removed while a transitive instance remains, so that case is tracked separately.

The command is listed for Claude Code and Codex. In Claude Code, it is installed through repository-modernization-tools. Audit approval does not authorize deletion: the package scope and affected files must be approved first, and dynamic or peer usage prevents a behavior-preserving removal.

What it helps with

  • audit selected dependencies across affected workspaces
  • trace dynamic imports and framework registrations
  • verify manifest and lockfile changes
  • compare baseline and candidate build checks
  • record transitive instances that remain

Example prompts for the agent

  • Run /repository-modernization-tools:remove-unused-dependencies for the approved package scope and inspect every proposed removal.
  • Check whether lodash can be removed, including aliases, dynamic loading, tests, builds, and public consumers.
  • Compare the baseline and candidate results for package-name, then report the exact manifest and lockfile diff.

How to install remove-unused-dependencies

1Plugin marketplace

/plugin marketplace add legioncodeinc/vibe-coding-tools
/plugin install repository-modernization-tools@wasp-nest

2Manually: put the files in place

.claude/commands/remove-unused-dependencies.md

Call it with /remove-unused-dependencies. For all projects use ~/.claude/commands/

Questions about remove-unused-dependencies

How do I install remove-unused-dependencies in Claude Code?

Add the marketplace with /plugin marketplace add legioncodeinc/vibe-coding-tools, install the plugin with /plugin install repository-modernization-tools@wasp-nest, then use .claude/commands/remove-unused-dependencies.md.

What does remove-unused-dependencies do?

It examines approved dependency-removal candidates, checks static and dynamic usage, and compares the proposed change with imports, lockfiles, tests, builds, types, and package contracts.

Can it prove that a dependency disappeared from the final artifact?

No. Removing a direct declaration can leave transitive instances. Artifact, vulnerability, and shipped-code claims require separate measured evidence.

Similar slash commands

All slash commands for Code review and refactoring →

From the same set172

The whole set →
natural-photography-stinger natural-photography-stinger is a Claude Code skill that generates and retouches realistic photos with consented models and strict EXIF rules. CX Codex +1 ★ 96repo stars discovery-research-stinger discovery-research-stinger is a Claude Code skill that shapes discovery before development by examining assumptions and defining a first version. CX Codex +1 ★ 96repo stars app-store-submission-stinger app-store-submission-stinger guides an app through App Store and Google Play submission: ASO, privacy forms, rejection fixes. Use it before the first release or after a rejected build. CX Codex +1 ★ 96repo stars agile-scrum-wasp-drone agile-scrum-wasp-drone — a subagent for auditing team workflows against the 2020 Scrum Guide, diagnosing process anti-patterns, and writing Definition of Done templates. CX Codex ★ 96repo stars harness-integration-stinger harness-integration-stinger — a skill for Claude Code and Codex that explains how to wire a single capability—skill, agent, hook, or MCP server—across four platforms: Claude Code, Cursor, Codex, and Cowork. CX Codex +1 ★ 96repo stars font-loading-wasp-drone font-loading-wasp-drone audits font loading pipelines, eliminates CLS shifts from font swaps, and configures Next.js font delivery. CX Codex ★ 96repo stars db-stinger The db-stinger skill guides PostgreSQL schema work, migration planning, and query-performance reviews. Use it when assessing a database layer or choosing an ORM or serverless platform. CX Codex +1 ★ 96repo stars technical-seo-stinger technical-seo-stinger is a Claude Code skill that audits technical SEO across 100 pages, checking crawlability, indexability, sitemaps, robots.txt, canonicalization, and crawl-budget use to assess an external site's technical health. CX Codex +1 ★ 96repo stars

Project sponsors

Companies that keep this analytics open