refactor-cleaner

Remove dead code and unused exports from TypeScript and JavaScript projects.

Updated Nov 17, 2025
One-click install
npx skills add https://github.com/itou-daiki/easy_stat_edu --skill refactor-cleaner
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactor-cleaner
Source: https://github.com/itou-daiki/easy_stat_edu/tree/main/.agent/skills/refactor-cleaner
Command: npx skills add https://github.com/itou-daiki/easy_stat_edu --skill refactor-cleaner

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Dead code, duplicates, and unused exports clutter codebases, slowing development and increasing risk. This skill provides a systematic, safe approach to identify and remove unused code while preserving functionality.

Core Features & Use Cases

  • Detect dead code and unused exports with tooling (knip, depcheck, ts-prune)
  • Consolidate duplicates and simplify dependencies
  • Document removals in DELETION_LOG.md and maintain a clean, maintainable codebase

Quick Start

Run an incremental refactor pass across the repository and log each deletion.

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 TypeScript project?

Removing dead code in TypeScript involves analyzing exports and dependencies to identify unused code. This skill performs safe removals with a detailed deletion log and ensures tests pass after changes.

What is the best way to clean up unused exports and duplicates in a JavaScript codebase?

Cleaning up unused exports and duplicates requires a multi-stage workflow of analysis, risk assessment, and consolidation. This skill systematically identifies and removes unused code to streamline your codebase.

How does static analysis help with code maintenance and refactor cleanup?

Static analysis detects dead code, unused exports, and duplicates to streamline code maintenance. This skill uses static-analysis tooling to perform safe removals, reducing development risks and clutter.

Can I use refactor-cleaner for incremental codebase cleanup?

You can perform incremental refactor passes across your repository. The skill logs each deletion in DELETION_LOG.md, maintaining a clean codebase through safe, staged removals.

Does the dead code removal process ensure tests still pass?

Yes, the dead code removal process enforces a multi-stage workflow including analysis, risk assessment, and removal. It ensures tests pass after changes to preserve functionality.