refactor-cleaner

Remove dead code and unused imports while preserving program behavior.

Updated Jan 7, 2026
One-click install
npx skills add https://github.com/aimskr/aims-claude-toolkit --skill refactor-cleaner-aimskr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactor-cleaner
Source: https://github.com/aimskr/aims-claude-toolkit/tree/main/skills/refactor-cleaner
Command: npx skills add https://github.com/aimskr/aims-claude-toolkit --skill refactor-cleaner-aimskr

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Identifies and safely removes dead code, unused imports, and redundant logic to reduce technical debt while preserving behavior.

Core Features & Use Cases

  • Phase-guided cleanup using static analysis to locate dead paths, unused imports, and refactoring opportunities.
  • Safe verification and documentation of changes to ensure tests pass after cleanup.
  • Use cases include cleaning up legacy or large multi-language codebases to improve maintainability and build performance.

Quick Start

Run the cleanup workflow to safely identify and remove dead code and unused imports.

Frequently Asked Questions about refactor-cleaner

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

FAQPage Schema
How do I safely remove dead code and unused imports from a large codebase?

Static analysis identifies dead code, unused imports, and redundant logic by running code-explorer, grep, and lint-based checks to locate dead paths and verify references before removing them.

Can I clean up unused imports across multiple programming languages?

Yes, unused imports and dead code cleanup applies to Python, JS/TS, Java, and other languages, targeting moderate-to-large codebases to reduce technical debt and improve build performance.

What is the best way to clean up legacy modules without breaking existing tests?

The best way to clean up legacy modules without breaking tests is using a phase-guided process that verifies references and documents a rollback process, ensuring tests pass after dead code removal.

Does static analysis work for finding redundant logic in moderate-to-large codebases?

Static analysis works for finding redundant logic in moderate-to-large codebases by running lint-based checks and code exploration to identify dead paths and refactoring opportunities.

How do I verify references before removing dead code paths?

To verify references before removing dead code paths, the cleanup workflow performs safe verification of references during static analysis steps to ensure program behavior is preserved.