refactor-cleaner

Identify and remove unused exports, dead code, and redundant dependencies.

2|Updated Jan 16, 2026
One-click install
npx skills add https://github.com/seikaikyo/dash-skills --skill refactor-cleaner-seikaikyo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactor-cleaner
Source: https://github.com/seikaikyo/dash-skills/tree/main/skills/refactor-cleaner
Command: npx skills add https://github.com/seikaikyo/dash-skills --skill refactor-cleaner-seikaikyo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Dead or duplicated code bloats a codebase, introduces risk, and slows development. This Skill identifies unused exports, orphaned dependencies, and duplicated patterns, then guides safe removal and consolidation to improve maintainability and bundle size.

Core Features & Use Cases

  • Dead code detection: locate unused exports, variables, and dependencies.
  • Dependency cleanup: remove unused packages and imports with safety checks.
  • Code consolidation: merge duplicate implementations into a single, reusable component.
  • Audit logging: document changes in DELETION_LOG.md for traceability.

Quick Start

Inspect the repository, then run the refactor-cleaner workflow to identify and safely remove dead code with incremental confirmations.

Frequently Asked Questions about refactor-cleaner

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

FAQPage Schema
How do I find and remove dead code in a monorepo?

Dead code in a monorepo is identified by locating unused exports, variables, and redundant dependencies, then safely removing them with validation and testing. Changes are documented in DELETION_LOG.md to maintain traceability and prevent regressions.

What is the safest way to clean up unused dependencies in a legacy project?

The safest way to clean up unused dependencies is through incremental removal with safety checks and validation. You document every change in DELETION_LOG.md and run tests to ensure no regressions occur during the refactoring process.

How do I consolidate duplicate code implementations safely?

Consolidating duplicate code involves merging redundant implementations into a single reusable component. This refactoring is performed with incremental confirmations and validation steps to ensure the consolidated code maintains functionality.

Does dead code removal work across multiple modules in a monorepo?

Dead code removal works across multiple modules in a monorepo by identifying unused exports and dependencies spanning the entire project. It safely cleans and consolidates code across modules while logging deletions for traceability.

What are the limitations of refactoring legacy codebases for dead code?

Refactoring legacy codebases requires careful validation and testing to avoid regressions. Limitations include the risk of breaking hidden dynamic imports, which necessitates incremental confirmations and audit logging during the cleanup process.