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.

Step 0: Detect Active Agent and Doc Folder

Before reporting or editing, detect which agent is running:

Related skills

More from afu-it/safe-code

Installs
7
GitHub Stars
2
First Seen
Apr 23, 2026