dead-code-remover

Detect and remove unused code with user approval and build verification.

1|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/dokdo2013/claude-code-skills --skill dead-code-remover
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dead-code-remover
Source: https://github.com/dokdo2013/claude-code-skills/tree/main/plugins/dead-code-remover/skills/dead-code-remover
Command: npx skills add https://github.com/dokdo2013/claude-code-skills --skill dead-code-remover

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Current repositories often accumulate unused code that increases maintenance burden and risk; this skill detects dead code and guides safe removal with build/test verification after changes.

Core Features & Use Cases

  • Dead code detection across languages (imports, functions, classes, and exports)
  • User-guided removal with an approval step
  • Post-deletion build and test verification to ensure safety

Quick Start

Run the Dead Code Remover and follow the prompts to approve each deletion before the build-and-test verification.

Frequently Asked Questions about dead-code-remover

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

FAQPage Schema
How do I safely detect and remove dead code from a multi-language repository?

Dead code removal detects unused imports, functions, classes, and exports across multiple languages, then validates changes with build and test verification to ensure nothing breaks before final deletion.

Can I rollback code changes if dead code removal breaks my build?

Yes, if post-deletion build and test verification fails, you can rollback code changes using git checkout to restore the repository to its previous working state.

Does static analysis for dead code preserve framework-decorated functions and API exports?

Yes, static analysis for dead code explicitly preserves framework-decorated and API-exported elements by enforcing an explicit review gate to prevent accidental deletion of active code paths.

What is the best way to automate code cleanup without breaking existing tests?

The best way to automate code cleanup without breaking tests is to enforce an approval gate before deletion and run post-deletion build and test verification to catch unsafe changes immediately.

When should I use an automated dead code remover instead of manual code cleanup?

You should use an automated dead code remover when maintaining large repositories with accumulated unused code, as it safely handles multi-language detection and build verification that manual cleanup cannot easily validate.

Why does dead code removal require an explicit review gate before deleting files?

Dead code removal requires an explicit review gate to ensure user approval before deletion, preventing the removal of necessary code and allowing build and test verification before changes are finalized.