codebase-pruner

Installation
SKILL.md

Codebase Pruner

Audit a repo for dead code, estimate deletion risk, and remove only high-confidence candidates in small verified slices. Reason from real entrypoints, config references, and runtime wiring instead of guessing from filenames.

Core Rules

  • Treat dead code as code with no live path from any entrypoint, config reference, or runtime hook.
  • Map references before deleting anything. One missed reference invalidates the deletion.
  • Prefer Audit first. Use Execute only after the dead-code inventory is clear enough to act safely.
  • If a candidate has dynamic dispatch risk, reflection risk, or external integration risk, flag it instead of deleting it automatically.
  • Never delete generated files. Update the generator or generated output flow instead.
  • Never mix pruning with unrelated feature work or refactors.
  • Prefer narrow, reversible slices with verification after each slice.
  • Use the codegraph index when available. Treat graph output as evidence, not permission to delete.

Graph-Aware Audit Path

Use this path before manual scanning when a codegraph index is available:

Installs
16
GitHub Stars
4
First Seen
Apr 23, 2026