dead-code-elimination

Installation
SKILL.md

Automated Dead Code Elimination (Static Tree-Shaking Protocol)

Overview

Legacy codebases and rapidly evolving features accumulate Dead Code: uncalled helper functions, unused variable declarations, commented-out legacy blocks, and orphan imports.

When an AI agent ingests files with dead code, it suffers from two major problems:

  1. Context Bloat: Up to 35% of ingested tokens are consumed by functions that are never executed in production.
  2. Phantom Refactoring: The model spends time refactoring and writing unit tests for obsolete functions that the engineering team intended to delete.

The Dead Code Elimination Protocol runs local static analysis tree-shakers (knip, vulture, autoflake) via CLI to prune dead code before passing files to LLM context.


Dead Code Ingestion vs. Static Tree-Shaking

Installs
1
GitHub Stars
2
First Seen
Oct 23, 2026