refactor-clean

Identify and remove dead code with test verification and rollback.

Updated Jan 16, 2026
One-click install
npx skills add https://github.com/Eotel/claude-marketplace --skill refactor-clean
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactor-clean
Source: https://github.com/Eotel/claude-marketplace/tree/main/plugins/base/skills/refactor-clean
Command: npx skills add https://github.com/Eotel/claude-marketplace --skill refactor-clean

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Safely identify and remove dead code with test verification helps teams maintain clean codebases by eliminating unused or risky code while ensuring behavior remains correct.

Core Features & Use Cases

  • Dead code analysis: identify unused exports, files, and dependencies
  • Safe deletion workflow: verify tests before deletions, rollback capability
  • Report generation: produce a consolidated dead-code-analysis.md

Quick Start

Run the refactor-clean skill on a codebase to identify dead code and generate a verification report.

Frequently Asked Questions about refactor-clean

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

FAQPage Schema
How do I safely remove dead code from a large repository with an evolving test suite?

To safely remove dead code from a large repository, you need a workflow that identifies unused exports and dependencies, verifies tests pass before applying deletions, and provides a deterministic rollback if behavior breaks. This ensures correctness while cleaning up evolving codebases.

What is dead code analysis with test verification and when do I need it?

Dead code analysis with test verification identifies unused files, exports, and dependencies, then runs tests to confirm behavior remains correct before deletion. You need it when maintaining large codebases where risky deletions must be detected and reviewed before integration.

How do I generate a dead code analysis report for unused exports and dependencies?

You can generate a dead code analysis report by running static analysis on a codebase to identify unused exports, files, and dependencies, verifying tests before deletions, and consolidating the findings into a consolidated dead-code-analysis.md report for review.

Does dead code cleanup work with existing test runners and static analysis tools?

Dead code cleanup requires integration with existing test runners and static analysis tools to verify correctness before applying changes. It uses a deterministic rollback workflow to confirm tests pass, ensuring safe deletions within large repositories.

What is the best way to handle risky deletions of unused dependencies during a refactor?

The best way to handle risky deletions during a refactor is to use a safe deletion workflow that verifies tests before removing unused dependencies, provides rollback capability, and generates a review report to ensure no behavior breaks before integration.

When should I not use automated dead code removal in my codebase?

You should not use automated dead code removal without test verification when your repository lacks a deterministic test suite, as risky deletions of unused exports or dependencies require passing tests and rollback capability to confirm correctness before integration.