/code-quality-plugin:code-dead-code path or directory to scan for dead codefrom code-quality-plugin
Detect dead code, unused exports, unreachable branches, and orphaned files. Use when reducing maintenance burden, cleaning up after refactors, or auditing codebase health.
Ships in code-quality-plugin. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Detect and report dead code across languages.
| Use this skill when... | Use something else when... |
|---|---|
| Cleaning up after a major refactor | Setting up dead code tooling → /configure:dead-code |
| Auditing codebase for unused exports | Looking for duplicated code → /code:dry-consolidation |
| Reducing bundle size by removing dead code | Looking for anti-patterns → /code:antipatterns |
| Pre-merge cleanup of feature branches | Need full code review → /code:review |
find . -maxdepth 1 \( -name "package.json" -o -name "pyproject.toml" -o -name "Cargo.toml" \) -type ffind . -maxdepth 1 \( -name "knip.json" -o -name "knip.jsonc" -o -name ".knip.json" \) -type f$1: Path to scan (defaults to current directory)--tool: Force specific tool (knip, vulture, machete)--fix: Automatically remove detected dead code where safeExecute this dead code detection workflow:
Check which languages are present and which dead code tools are available:
If no tool is available, report which tool to install and suggest /configure:dead-code to set up the project.
JavaScript/TypeScript (Knip):
npx knip --reporter compact
If Knip is not configured:
npx knip --reporter compact --include files,exports,dependencies
Python (Vulture):
vulture ${1:-.} --min-confidence 80
Rust (cargo-machete):
cargo machete
Group results by severity:
| Category | Severity | Action |
|---|---|---|
| Unused dependencies | High | Remove from package manifest |
| Unused exports | Medium | Remove export, check downstream |
| Unused files | Medium | Delete after confirming no dynamic imports |
| Unused variables/functions | Low | Remove if truly dead |
If --fix flag is set:
If --fix is not set, present a summary report with actionable items.
Print summary:
Dead Code Report
================
Unused files: N
Unused exports: N
Unused dependencies: N
Total dead code: N items
Top items to remove:
- [file:export] reason
npm prune or equivalent/configure:dead-code/test:run| Context | Command |
|---|---|
| Quick JS/TS scan | npx knip --reporter compact --include files,exports |
| Python scan | vulture . --min-confidence 80 |
| Rust scan | cargo machete |
| CI mode | npx knip --reporter json |
| Exports only | npx knip --include exports --reporter compact |
What SKILL.md sets; muted values are Claude Code's defaults
sonnetThree short reads, in order
npx claudepluginhub laurigates/claude-plugins --plugin code-quality-plugin19 skills in this plugin
/ast-grep-searchFind and replace code patterns structurally with ast-grep. Use when matching code by AST structure, finding functions with specific signatures, or detecting anti-patterns regex cannot match./bulk-sweep-classifyClassify every regex match before a bulk find-replace/syntax-modernization sweep — four match categories, scoped transform, allowlist-aware verification. Use when bulk-renaming commands/tools/paths or migrating syntax across many files./code-antipatternsAnalyze a codebase for anti-patterns using ast-grep. Use when finding magic numbers, console.logs, var usage, excessive any, eval/innerHTML security issues, or deep nesting./code-complexityAnalyze code complexity metrics (cyclomatic, cognitive, function length, coupling). Use when identifying refactoring targets, tracking codebase health, or reviewing large changes./code-context-leakageAudit a repo for names and defaults tied to one person's setup — home paths, personal channels, dated tags, OS-only commands, stale repo names. Use when preparing a project for reuse./code-dep-auditAudit dependencies for security vulnerabilities, outdated packages, and license compliance. Use when checking supply chain security, preparing releases, or responding to CVEs.Other plugins' skills for the same job