dead-code-cleaner

Detect and remove unused functions, imports, and feature flags from codebases.

Updated Feb 18, 2026
One-click install
npx skills add https://github.com/Greenmamba29/skillsdotmd_web --skill dead-code-cleaner
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dead-code-cleaner
Source: https://github.com/Greenmamba29/skillsdotmd_web/tree/main/.agents/skills/dead-code-cleaner
Command: npx skills add https://github.com/Greenmamba29/skillsdotmd_web --skill dead-code-cleaner

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses the accumulation of technical debt by identifying and removing unused code, imports, and feature flags, leading to a cleaner and more maintainable codebase.

Core Features & Use Cases

  • Unused Code Detection: Scans for and identifies functions, variables, and imports that are no longer referenced.
  • Stale Feature Flag Removal: Detects hardcoded feature flags that are no longer active.
  • Automated PR Creation: Generates a pull request with all identified safe removals, grouped by file.
  • Use Case: Regularly run this skill on your main development branch to keep the codebase lean and prevent the build-up of dead code that can confuse developers and increase build times.

Quick Start

Scan my repository for dead code and open a pull request with the suggested removals.

Frequently Asked Questions about dead-code-cleaner

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

FAQPage Schema
How do I automatically detect and remove unused code and stale feature flags?

To remove unused code and stale feature flags, this skill scans your repository using static analysis tools like eslint and pylint to identify dead variables and flags, then creates a pull request with the suggested safe removals.

Does dead code cleanup work with Python and JavaScript repositories?

Yes, dead code cleanup supports both Python and JavaScript repositories by running static analysis tools like pylint and eslint to detect unreferenced functions, unused imports, and dead variables across your codebase.

How do I safely clean up technical debt without breaking existing tests?

To safely clean up technical debt without breaking tests, this skill verifies all identified dead code removals against your existing test suites before generating a pull request summarizing the code size reduction.

What is the best way to scan my repository for unreferenced functions and imports?

The best way to scan your repository for unreferenced functions and imports is to run a static analysis skill that groups identified dead code by file and opens a pull request with the suggested removals.

Can I automate stale feature flag removal in my main development branch?

Yes, you can automate stale feature flag removal by regularly running this skill on your main development branch to detect hardcoded flags that are no longer active and keep the codebase lean.

Are there limitations to using static analysis for dead code detection?

A limitation of using static analysis for dead code detection is that it identifies unused functions, imports, and variables based on references, meaning dynamic code execution paths may require manual verification before removal.