deadcode

Detect and remove dead, unused, or unreachable code across codebases.

Updated Feb 7, 2026
One-click install
npx skills add https://github.com/maggit/claude-workspace --skill deadcode
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: deadcode
Source: https://github.com/maggit/claude-workspace/tree/main/skills/deadcode
Command: npx skills add https://github.com/maggit/claude-workspace --skill deadcode

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Streamlines code hygiene by locating dead, unused, or unreachable code and suggesting safe removals to reduce technical debt.

Core Features & Use Cases

  • Dead code detection: finds unused imports, variables, exports, and unreachable branches.
  • Scope-aware analysis: supports per-file, per-module, or whole-project scans across common languages.
  • Safe recommendations: provides non-destructive suggestions and requires user confirmation before changes.
  • Orphaned files and unused imports cleanup: identifies files that are not referenced anywhere and imports that are unused.

Quick Start

Identify the target project and run a dead-code scan to detect unused or unreachable elements.

Frequently Asked Questions about deadcode

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find and remove dead code in my codebase?

Dead code detection uses static analysis to locate unused imports, variables, exports, and unreachable branches. It scans single files, modules, or entire repositories across common languages and suggests safe removals that require your confirmation before deletion.

What is unreachable code and how does static analysis identify it?

Unreachable code consists of branches or statements that cannot execute during runtime. Static analysis identifies these by parsing language-aware syntax trees to map execution paths and flag orphaned files or unused imports without running the program.

Can I scan for unused imports and orphaned files across an entire repository?

Yes, scope-aware analysis supports whole-project scans to identify orphaned files not referenced anywhere and unused imports. This detection applies across multiple common languages and generates safe, non-destructive deletion suggestions.

Does dead code detection work with multiple programming languages?

Yes, the static analysis implements language-aware parsing to handle multiple common languages. It detects unused exports, dead variables, and unreachable branches by adapting its parsing logic to the specific syntax of each language in your project.

Is it safe to run dead code cleanup automatically on my project?

Dead code cleanup is non-destructive and requires user confirmation before any code changes. It only provides safe deletion suggestions for unused imports and orphaned files, ensuring you maintain control over the refactoring process.

What's the best way to reduce technical debt by pruning unused exports?

Pruning unused exports requires static analysis to map all references across your codebase. By detecting dead exports and orphaned files, you can safely reduce technical debt through confirmed, targeted code removal.