2

    dead-code-eliminator

    by Markus Isaksson

    Keep your codebase lean by identifying and safely removing unused exports, unreachable code, and dead dependencies.

    Updated May 2026
    Security scanned
    One-time purchase

    $5

    One-time purchase

    ⚡ Also available via Agensi MCP — your AI agent can load this skill on demand via MCP. Learn more →

    Included in download

    • Prune unreferenced exports and imports across large TypeScript projects
    • Identify and remove stale feature flags and their dead execution branches
    • file_read, file_write automation included
    • Includes example output and usage patterns
    • Instant install

    See it in action

    # Dead Code Report
    Summary: 12 findings, ~450 lines removed.
    
    High-confidence findings:
    - Unused import: 'capitalize' from 'lodash' in src/utils/format.ts
    - Unreachable code: 'if (false)' block in src/api/client.ts
    
    Medium-confidence findings:
    - 'deprecatedHelper' commented out in src/utils/index.ts.

    About This Skill

    Streamline Your Codebase with Precision

    The Dead Code Eliminator is a sophisticated static analysis tool designed to prune bloated repositories. It doesn't just look for unused variables; it maps your entire dependency and export graph to find unreferenced code, unreachable execution paths, and stale feature flags that are slowing down your team and increasing your bundle size.

    What it does

    • Unused Export Detection: Identifies functions, classes, and types that are exported but never imported, including complex re-exports in barrel files.
    • Reachability Analysis: Finds code trapped behind constant false conditions or following unconditional exit statements.
    • Dependency Auditing: Flags packages in your manifest files (package.json, pyproject.toml, etc.) that have no references in your source code.
    • Confidence-Rated Patches: Categorizes findings into High (safe for deletion), Medium (comment out for safety), and Low (flag for review) to prevent breaking dynamic runtime patterns.

    Supported Ecosystems

    Works across major languages including TypeScript, JavaScript, Python, Go, Java, and Rust. It understands language-specific nuances like Python's __all__, Go's exported identifiers, and TypeScript's never type.

    Why use this over basic linting?

    While linters find local unused variables, this skill performs cross-file reference tracking and understands complex patterns like reflection and dynamic imports. It provides ready-to-apply diffs rather than just a list of warnings, significantly reducing the manual labor of large-scale refactoring.

    📖 Learn more: Best DevOps & Deployment Skills for Claude Code →

    Use Cases

    • Prune unreferenced exports and imports across large TypeScript projects
    • Identify and remove stale feature flags and their dead execution branches
    • Audit manifest files to find and delete unused third-party dependencies
    • Generate safe patches that distinguish between static and dynamic code usage

    Reviews

    No reviews yet - be the first to share your experience.

    Only users who have downloaded or purchased this skill can leave a review.

    Security Scanned

    Passed automated security review

    Permissions

    Read Files
    Write Files

    Reads source files and the project manifest, then applies deletions and comment-outs based on confidence level. Public API surfaces (exports of published packages) are always flagged for human review rather than modified. Does not modify lockfiles or build configuration.

    Frequently Asked Questions

    Similar Skills

    $5

    One-time