dead-code-sweep

Identify and report dead code, orphaned files, and unused exports.

42|11|Updated Dec 26, 2025
One-click install
npx skills add https://github.com/petekp/claude-code-setup --skill dead-code-sweep
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dead-code-sweep
Source: https://github.com/petekp/claude-code-setup/tree/main/skills/dead-code-sweep
Command: npx skills add https://github.com/petekp/claude-code-setup --skill dead-code-sweep

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill systematically identifies and helps remove dead code, redundant implementations, and orphaned artifacts from codebases, especially those that have undergone multiple agent-driven refactors.

Core Features & Use Cases

  • Orphaned File Detection: Finds files that are no longer referenced by any part of the codebase.
  • Unused Export Identification: Locates exported functions, classes, or types that are never imported.
  • Redundancy Analysis: Detects multiple implementations of the same logic.
  • Use Case: After a series of automated refactors, your codebase has grown bloated with old functions and unused imports. This skill will scan your project, report on all identified dead code, and guide you through its safe removal.

Quick Start

Use the dead-code-sweep skill to find and report on all dead code in the current project.

Frequently Asked Questions about dead-code-sweep

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

FAQPage Schema
How do I find dead code and orphaned files in my codebase after refactoring?

Unused export identification locates exported functions, classes, or types that are never imported by tracing references from entry points while respecting module boundaries to avoid false positives.

Can I detect orphaned tests and dependencies during a code audit?

Yes, a systematic code audit can report on orphaned tests and orphaned dependencies alongside dead branches and stale compatibility code by verifying references across the entire software project structure.

What's the best way to clean up redundant implementations in a software project?

Redundancy analysis detects multiple implementations of the same logic by systematically scanning and verifying references from entry points, ensuring safe removal without breaking module boundaries.

Does dead code sweep work for codebases that have undergone multiple automated refactors?

Yes, it is designed for codebases bloated with old functions and unused imports after multiple agent-driven refactors, scanning the project to report all identified dead code and guide safe removal.

How does dead code detection avoid false positives when removing code cruft?

It requires systematic scanning and verification to avoid false positives by accurately tracing references from entry points and respecting module boundaries before reporting any dead code.