Skip to content
Development
Command

/dead-code

Report unreachable files, unused exports, and zombie packages, tiered by confidence.

From plugin
repowise
8.1k17 skills17 commands1 MCP
> /plugin marketplace add repowise-dev/repowise
> /plugin install repowise@repowise

Command definition

dead-code.md
description: Report unreachable files, unused exports, and zombie packages, tiered by confidence.
allowed-tools: Bash(repowise dead-code:*), Read
disable-model-invocation: true

Repowise Dead Code

Find dead code through graph reachability + git context. No LLM — works in index-only mode. Findings are tiered by confidence; only `safe_to_delete` ones should be proposed for removal.

Steps

1. If `.repowise/` doesn't exist: "This repo isn't indexed yet. Run `/repowise:init` first." Stop. 2. Run `repowise dead-code` (with any filters from `$ARGUMENTS`). 3. Present findings grouped by confidence. Mark which are `safe_to_delete`. For lower-confidence ones, frame them as "candidates to investigate," not deletions.

Filters from `$ARGUMENTS`

  • A path → `repowise dead-code <path>`
  • "safe" → `--safe-only` (only safe_to_delete findings)
  • "files" → `--kind unreachable_file`
  • "exports" → `--kind unused_export`
  • "packages" / "zombie" → `--kind zombie_package`
  • "strict" → `--min-confidence 0.7` (default is 0.4)

Other flags: `--format json`, `--include-internals` (aggressive, private-symbol scan; higher false-positive rate), `--include-zombie-packages` / `--no-include-zombie-packages`, `--no-unreachable`, `--no-unused-exports`, `--repo <alias>` / `--no-workspace`.

For per-directory or per-owner rollups, use the `get_dead_code` MCP tool with `group_by="directory"` or `group_by="owner"` (these are tool params, not CLI flags). If your client does not list `get_dead_code`, add `+get_dead_code` to `mcp.tools` in `.repowise/config.yaml` and restart the MCP server.

Before suggesting any deletion

  • Confirm with the user; show the name, confidence, and why it looks dead.
  • Recently-touched "dead" code is more likely a false positive — flag it.
  • Dynamically-loaded patterns (plugins, handlers, adapters, framework routes)

can look unused but aren't. Repowise filters the common cases; edge cases remain.

  • Double-check blast radius with `repowise risk --target <path>` before removing files

or exported symbols.

Read more
@repowise-dev
Ships withrepowise

Codebase intelligence for AI and humans: code health scores, auto-generated docs, git analytics, dead code detection, and architectural decisions via MCP.

8.1k8 skills1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
8.1k
Star history of repowise-dev/repowise on GitHub, a chart by star-history.com

Other commands on repowise.

ask

ask

Command

Ask a codebase question and get a cited, synthesised answer with a confidence rating (costs an LLM call).

@repowise-dev@repowise-devInstall Command
context

context

Command

Triage card for files, modules, or symbols — layer, hotspot, fix history, freshness (relationships, not source bytes).

@repowise-dev@repowise-devInstall Command
coverage

coverage

Command

Ingest or inspect test-coverage reports (LCOV, Cobertura, Clover, Go cover profiles, JaCoCo, Salesforce Apex JSON, or repowise…

@repowise-dev@repowise-devInstall Command
decision

decision

Command

Work with architectural decisions — list, inspect health, add, or confirm auto-proposed decisions.

@repowise-dev@repowise-devInstall Command
doctor

doctor

Command

Diagnose the Repowise setup — install, API keys, index/store drift — and optionally repair it.

@repowise-dev@repowise-devInstall Command
export

export

Command

Export the wiki (or architecture model) to markdown, HTML, JSON, or Structurizr DSL.

@repowise-dev@repowise-devInstall Command

More commands from other plugins.

build
Auto-invoked

build

Command

Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.

@addyosmani@addyosmaniInstall Command