cruft-code-sweep

Coordinate three agents to audit codebases and generate cruft-safety reports.

35|Updated Feb 15, 2026
One-click install
npx skills add https://github.com/sean-sunagaku/claude-code-plugin --skill cruft-code-sweep
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cruft-code-sweep
Source: https://github.com/sean-sunagaku/claude-code-plugin/tree/main/cruft-code-sweep/skills/cruft-code-sweep
Command: npx skills add https://github.com/sean-sunagaku/claude-code-plugin --skill cruft-code-sweep

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Cruft Code Sweep detects and safely eliminates cruft, dead code, and compatibility hacks by coordinating three specialized agents (cruft-scanner, historian, verifier) to provide context and safeguards.

Core Features & Use Cases

  • Coordinated three-agent workflow: scanner explores, historian adds time-context, verifier validates safe deletion.
  • Pattern-based and history-informed cruft detection using references/patterns.
  • Generates a final safety report and remediation guidance for large codebases.

Quick Start

Run the cruft-code-sweep skill against your repository to generate a comprehensive cruft-safety report.

Frequently Asked Questions about cruft-code-sweep

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

FAQPage Schema
How do I safely remove dead code and deprecated patterns from a large codebase?

Dead code removal is performed by coordinating a scanner, historian, and verifier agent to audit your repository, surface risky leftovers, and validate deletions using historical context. This generates a structured safety report with remediation guidance.

What is cruft and how does a code audit identify it?

Cruft refers to dead code, deprecated patterns, and compatibility hacks lingering in a repository. A code audit identifies cruft using pattern-based detection and history-informed analysis, then verifies safe deletion by checking dependencies, tests, and potential side effects.

How do I check if deleting unused code will break dependencies or tests?

Checking deletion safety involves verifying proposed removals against historical context and dependency graphs. The audit process generates a risk assessment that considers dependencies, tests, and potential side effects before recommending any code elimination.

Can I run a static analysis code audit on any repository?

Yes, you can apply the static analysis code audit to any repository to detect cruft. It explores the codebase to surface dead code and risky leftovers, then delivers remediation guidance tailored to the specific dependencies and tests found.

What's the best way to eliminate compatibility hacks without introducing regressions?

Eliminating compatibility hacks safely requires a coordinated workflow where a scanner finds the hacks, a historian adds time-context, and a verifier validates safe deletion. This approach ensures removals are checked against dependencies and tests to prevent regressions.

Why does historical context matter when removing deprecated code patterns?

Historical context matters because it explains why deprecated code patterns were introduced, helping the verifier validate safe deletion. Without this time-context, removing leftover compatibility hacks risks breaking hidden dependencies or bypassing necessary tests.