ce-deadcode-hunter

Identify and classify dead or unreachable code in a codebase.

78|15|Updated May 1, 2023
One-click install
npx skills add https://github.com/Moffran/calibrated_explanations --skill ce-deadcode-hunter
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ce-deadcode-hunter
Source: https://github.com/Moffran/calibrated_explanations/tree/main/.claude/skills/ce-deadcode-hunter
Command: npx skills add https://github.com/Moffran/calibrated_explanations --skill ce-deadcode-hunter

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Identify unreachable or non-contributing source code and separate true dead code from merely untested reachable paths, with Test Quality Method Option A/B/C routing.

Core Features & Use Cases

  • Identify truly unreachable code paths.
  • Distinguish dead code from untested but reachable code.
  • Produce evidence-backed removal candidates with risk labels.

Quick Start

Run the analysis workflow with a chosen focus option (A, B, or C) to begin dead-code auditing.

Frequently Asked Questions about ce-deadcode-hunter

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

FAQPage Schema
How do I find unreachable code in a large Python codebase?

Dead code analysis identifies unreachable code by cross-checking structural evidence, coverage artifacts, and dynamic reachability validation. It handles complex module wiring and conditional imports to accurately classify unreachable paths.

What is the difference between dead code and untested code?

Dead code is truly unreachable, while untested code is reachable but lacks test coverage. This analysis separates the two by validating dynamic reachability and classifying paths into Dead, Untested, or Needs investigation categories.

How do I safely remove dead code from a project with low test coverage?

Safe dead code removal requires evidence-backed classification with risk labels. This tool produces removal candidates by cross-checking coverage artifacts and structural evidence, ensuring only non-contributing code is pruned.

Can static analysis handle conditional imports and complex module wiring?

Static analysis can handle conditional imports and complex module wiring by applying dynamic reachability validation. This ensures accurate detection of unreachable code paths even in codebases with non-standard import structures.

What is the best way to audit dead code in Python with Test Quality Method options?

Dead code auditing uses Test Quality Method Option A, B, or C routing to focus the analysis. Selecting an option initiates the workflow to classify unreachable and untested paths with evidence-backed risk labels.

When should I not use automated dead code removal?

Automated dead code removal should be approached cautiously when test coverage gaps exist. Code classified as Needs investigation requires manual review, as dynamic reachability cannot be fully validated without comprehensive test artifacts.