dead-code-review

Detect unreachable code, unused exports, orphaned files, and stale feature flags.

Updated May 10, 2026
One-click install
npx skills add https://github.com/rob-broadley/ai-airbase --skill dead-code-review-rob-broadley
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dead-code-review
Source: https://github.com/rob-broadley/ai-airbase/tree/main/cadre/skills/dead-code-review
Command: npx skills add https://github.com/rob-broadley/ai-airbase --skill dead-code-review-rob-broadley

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Dead code silently increases maintenance cost, adds risk by obscuring security-critical paths, and creates misleading confidence in coverage.

Core Features & Use Cases

  • Detect unreachable code: flags code blocks proven to never execute (e.g., after unconditional exits, impossible branches, unreachable switch defaults, impossible catch blocks, and never-entered loops).
  • Identify unused and orphaned artifacts: surfaces exported symbols with no external usage, and source/test/config/doc files that are not reachable from any entry points.
  • Expose feature-flag and dependency rot: finds stale flags with permanently dead branches and zombie dependencies declared in manifests but never imported.
  • Flag dead routes/endpoints and commented-out code blocks: highlights routes/handlers/subscriptions/RPC methods that are registered but never reached, and blocks of disabled-but-not-deleted code.

Quick Start

Run a full repository dead-code scan and ask for a prioritized report of unreachable code, unused exports, orphaned files, stale feature flags, zombie dependencies, dead routes/endpoints, and significant commented-out blocks.

Frequently Asked Questions about dead-code-review

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

FAQPage Schema
How do I find unreachable code and unused exports in my codebase?

To find unreachable code and unused exports, run a full repository scan to flag code blocks proven to never execute and surface exported symbols with no external usage. The scan provides a prioritized report of unreachable logic.

What is the best way to detect orphaned files and zombie dependencies?

The best way to detect orphaned files and zombie dependencies is using a dead-code review that identifies unreferenced source/config files and dependencies declared in manifests but never imported, applying tool-assisted verification to confirm.

How does dead code analysis handle stale feature flags with permanently dead branches?

Dead code analysis handles stale feature flags by exposing feature-flag rot, specifically targeting and identifying flags that contain permanently dead branches which increase maintenance burden and obscure security-relevant paths.

Can I identify dead routes and endpoints during a full-codebase review?

Yes, you can identify dead routes and endpoints during a full-codebase review. The analysis highlights routes, handlers, subscriptions, and RPC methods that are registered but never reached by any execution path.

Does static analysis for dead code work on commented-out blocks?

Yes, static analysis for dead code works on commented-out blocks by flagging significant blocks of disabled-but-not-deleted code. This targets significant commented-out areas that create misleading confidence in test coverage.