cruft-cleaner

Detect and remove dead code, stale comments, and over-abstraction across codebases.

7|4|Updated Mar 2, 2026
One-click install
npx skills add https://github.com/nklisch/skills --skill cruft-cleaner
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cruft-cleaner
Source: https://github.com/nklisch/skills/tree/main/plugins/workflow/skills/cruft-cleaner
Command: npx skills add https://github.com/nklisch/skills --skill cruft-cleaner

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

AI‑generated projects often accumulate dead code, stale comments, compatibility shims, defensive bloat, and over‑abstraction, which degrade maintainability and increase technical debt. The cruft‑cleaner skill systematically identifies and removes this unwanted cruft.

Core Features & Use Cases

  • Multi‑phase detection: Language‑aware tooling, heuristic grep patterns, and taxonomy references to uncover high‑, medium‑, and low‑confidence cruft.
  • User‑guided triage: Interactive checkpoints let users approve or reject findings by confidence tier.
  • Scalable cleanup: Plans and orchestrates parallel agents with optional git worktree isolation for large codebases.

Quick Start

Run the cruft‑cleaner skill to sweep the entire repository for dead code and stale comments.

Frequently Asked Questions about cruft-cleaner

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

FAQPage Schema
How do I automatically detect and remove dead code generated by AI in my repository?

To automatically detect and remove dead code, you can run a multi-phase cleanup skill that uses language-aware tooling and heuristic grep patterns to identify stale comments, compatibility shims, and defensive bloat for user-guided triage and removal.

What is AI-accumulated cruft in a codebase and how do I clean it up?

AI-accumulated cruft consists of dead code, stale comments, compatibility shims, defensive bloat, and over-abstraction that degrade maintainability. Cleanup involves systematically scanning the repository to identify this technical debt and orchestrating parallel agents to remove it.

Does this dead code cleanup tool work with TypeScript, Python, Go, and Rust?

Yes, the dead code cleanup tool works with TypeScript, Python, Go, and Rust. It applies language-aware tooling to scan these codebases and uncover high, medium, and low-confidence cruft for interactive triage.

How do I clean up over-abstraction and defensive bloat across a large codebase?

To clean up over-abstraction and defensive bloat across a large codebase, the tool orchestrates parallel agents with optional git worktree isolation, allowing scalable cleanup while providing interactive checkpoints to approve or reject findings.

Do I need git worktree permissions to run automated code cleanup?

Yes, you need permission to create git worktrees and edit source files to run automated code cleanup. The skill requires repository file access and the ability to execute language-specific tooling.

Can I review and approve dead code findings before they are removed?

Yes, you can review and approve dead code findings before removal through user-guided triage. The skill provides interactive checkpoints that let you approve or reject findings categorized by high, medium, and low-confidence tiers.