One-click install
npx skills add https://github.com/abpai/skills --skill dead-code-eliminator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dead-code-eliminator
Source: https://github.com/abpai/skills/tree/main/dead-code-eliminator
Command: npx skills add https://github.com/abpai/skills --skill dead-code-eliminator

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Audit a codebase to identify dead code by tracing live call paths from all entry points, auditing correctness and algorithmic soundness, and producing a clear report of unused and unreachable elements.

Core Features & Use Cases

  • Live-call path tracing from all entry points to identify unreachable code, orphaned classes, and stale feature code.
  • Audit correctness and algorithmic soundness of live code and generate an ASCII call graph and categorized dead code report.
  • Use cases include large refactors, removed features leaving behind support code, or when asked to "find dead code" or "clean up unused code".

Quick Start

Switch to Dead Code Elimination mode and run the analyzer to produce a live call graph and a dead code report.

Frequently Asked Questions about dead-code-eliminator

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

FAQPage Schema
How do I find dead code and unused functions in a codebase?

To find dead code, the analyzer traces live call paths from all entry points to identify unreachable code, orphaned classes, and stale support code. It audits correctness and algorithmic soundness, then produces a categorized dead code report.

What is static analysis for unreachable code and how does a call graph help?

Static analysis for unreachable code maps live execution paths without running the application. Generating an ASCII call graph visually traces function invocations from entry points, making it easy to spot orphaned entities and dead code elimination targets.

How do I clean up orphaned functions after a large refactor?

Cleaning up orphaned functions after a large refactor involves tracing live call paths to detect stale feature code left behind. The analyzer audits the refactored codebase, identifies unused imports and orphaned classes, and generates a refactor cleanup report.

Does dead code elimination work for large refactors with removed features?

Dead code elimination works for large refactors by auditing correctness and algorithmic soundness across the project. It traces live paths from all entry points to find stale support code remaining from removed features, ensuring safe cleanup.

What is the best way to audit a codebase for unused imports and orphaned classes?

The best way to audit a codebase for unused imports and orphaned classes is using static analysis to trace live call paths from all entry points. This algorithmic soundness check generates an ASCII call graph and a categorized dead code report.