dead-code-detector

Detect unused, unreachable, and orphaned code across 7 programming languages and SQL databases.

3|2|Updated Jan 23, 2026
One-click install
npx skills add https://github.com/robotijn/ctoc --skill dead-code-detector-robotijn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dead-code-detector
Source: https://github.com/robotijn/ctoc/tree/main/skills/quality/dead-code-detector
Command: npx skills add https://github.com/robotijn/ctoc --skill dead-code-detector-robotijn

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Dead code (unused imports, unreachable branches, orphan files, unused dependencies, and dead database objects) clutters codebases, increases build and bundle size, hides latent bugs, and adds unnecessary maintenance overhead for development teams.

Core Features & Use Cases

  • Multi-type dead code detection: Identifies unreachable code, unused imports/parameters, unused private members, orphan files, unused dependencies, dead database columns/tables/procs/indexes, and feature-flagged unused branches across 7 programming languages and SQL databases.
  • False positive mitigation: Built-in handling for reflection, dynamic dispatch, plugin APIs, deserialization targets, ORM callbacks, and library vs application reachability to minimize incorrect deletion recommendations.
  • Use Case: A development team maintaining a mid-sized SaaS application can use this skill to scan their codebase, identify 40+ unused imports, 2 orphan utility files, and 3 dead database columns no longer referenced by any API endpoint, then safely remove them to reduce build time and technical debt.

Quick Start

Use the dead-code-detector skill to scan your current project for all unused code, unreachable branches, and orphan files, then receive a prioritized report of safe-to-delete items with confidence levels and suggested actions.

Frequently Asked Questions about dead-code-detector

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

FAQPage Schema
How do I detect dead code and unused imports in my codebase?

Dead code detection scans application and library codebases to identify unused imports, unreachable branches, and orphan files across 7 programming languages. It uses mark-and-sweep reachability algorithms to locate and report safe-to-delete items.

Can static analysis find unused database objects like dead columns and tables?

Static analysis finds dead database objects by cross-referencing SQL databases against application code. It identifies unused columns, tables, procs, and indexes no longer referenced by API endpoints to reduce technical debt.

How does dead code detection handle reflection and dynamic dispatch to avoid false positives?

Dead code detection minimizes false positives by using built-in handling for reflection, dynamic dispatch, plugin APIs, and ORM callbacks. It cross-references dynamic usage patterns to assign accurate confidence levels to findings.

What is the best way to audit unused dependencies and reduce technical debt?

Auditing unused dependencies involves scanning library codebases to eliminate technical debt and reduce build overhead. The detector identifies unused exports and dependencies, providing a prioritized report of safe-to-delete items.

Does dead code detection work for feature-flagged unused branches?

Dead code detection works for feature-flagged unused branches by scanning application codebases to identify unreachable code. It assigns confidence levels to all findings to ensure safe removal without breaking active features.

When should I not use automated dead code elimination?

Automated dead code elimination requires caution with deserialization targets and library reachability. You should review confidence levels before deleting, as dynamic dispatch and plugin APIs may reference code that static analysis misses.