audit-dead-code

Audit codebases to detect and classify dead code by priority.

1|Updated Feb 27, 2026
One-click install
npx skills add https://github.com/SebKay/skills --skill audit-dead-code
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: audit-dead-code
Source: https://github.com/SebKay/skills/tree/main/audit-dead-code
Command: npx skills add https://github.com/SebKay/skills --skill audit-dead-code

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps identify and remove code that is no longer used, referenced, or needed, leading to cleaner, more maintainable, and potentially smaller codebases.

Core Features & Use Cases

  • Unused Export Detection: Finds exported symbols that are not imported or used elsewhere.
  • Unreachable Code Identification: Flags code paths that cannot be executed under normal circumstances.
  • Orphaned File Discovery: Locates files or modules that are not imported or utilized by any part of the application.
  • Stale Feature Flag Management: Identifies feature flags that are permanently enabled or disabled, or whose rollout is complete.
  • Dead Registration/Compatibility Layer Finding: Detects code kept for old systems or integrations that are no longer active.
  • Use Case: Before a major refactor or a bundle size optimization effort, use this skill to systematically audit the codebase for dead code, ensuring that only necessary code remains.

Quick Start

Use the audit-dead-code skill to find all unused exports in the current project.

Frequently Asked Questions about audit-dead-code

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

FAQPage Schema
What is dead code and how do I identify unused exports and orphaned files in my project?

Dead code includes unused exports, unreachable branches, and orphaned files. You identify it by mapping entrypoints, searching for dead-code signals, and classifying findings by priority to systematically guide cleanup efforts.

How do I audit my codebase for unreachable branches and stale feature flags before a refactor?

Audit stale feature flags and unreachable branches by systematically mapping code entrypoints, searching for dead-code signals, and classifying findings by priority (P1-P4) to ensure only necessary code remains before refactoring.

Can I safely auto-fix dead code and obsolete compatibility layers during a bundle size optimization effort?

Safe auto-fixing dead code depends on proving reachability first. The audit classifies findings by priority, offering guidance on safe auto-fixing versus manual intervention for high-risk changes like obsolete compatibility layers.

What is the best way to classify dead code findings by priority for code cleanup?

The best way to classify dead code for cleanup is mapping entrypoints and searching for signals to categorize findings into priorities (P1-P4), which guides safe removal and ensures only necessary code remains.

When should I manually remove dead code instead of auto-fixing it during maintainability refactoring?

You should manually remove dead code when changes are high-risk. The audit emphasizes proving reachability and provides guidance on when manual intervention is necessary versus when safe auto-fixing is appropriate.