ywc-refactor-clean

Identify and remove dead code with tiered safety verification.

8|1|Updated May 13, 2026
One-click install
npx skills add https://github.com/yongwoon/ywc-agent-toolkit --skill ywc-refactor-clean
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ywc-refactor-clean
Source: https://github.com/yongwoon/ywc-agent-toolkit/tree/main/claude-code/skills/ywc-refactor-clean
Command: npx skills add https://github.com/yongwoon/ywc-agent-toolkit --skill ywc-refactor-clean

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill solves the problem of accumulating dead code, unused dependencies, and redundant utilities that clutter codebases and hinder architectural comprehension, while preventing the common regressions caused by manual, unverified cleanup.

Core Features & Use Cases

  • Tiered Cleanup: Automatically classifies findings into SAFE, CAUTION, and DANGER tiers to ensure high-risk deletions are handled with human oversight.
  • Iron-Clad Verification: Enforces a strict discipline of detection, grep-based reference checking, and per-batch test verification to guarantee system stability.
  • Use Case: Use this skill after a sprint or during a monthly hygiene pass to remove unused exports, stale dependencies, and dead functions without breaking dynamic imports or public APIs.

Quick Start

Invoke the ywc-refactor-clean skill to remove unused code within the src directory using the safe tier.

Frequently Asked Questions about ywc-refactor-clean

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

FAQPage Schema
How do I safely remove dead code and unused dependencies without breaking dynamic imports?

Dead code removal is automated by classifying findings into safety tiers and enforcing a per-item verification loop with test suite validation. This approach classifies findings into SAFE, CAUTION, and DANGER tiers to ensure high-risk deletions are handled with human oversight.

What is the best way to automate unused exports and stale dependency cleanup?

Automating unused exports and stale dependency cleanup requires classifying findings into safety tiers and enforcing per-batch test verification. This ensures byte-for-byte equivalence and prevents behavioral regressions across various programming ecosystems.

Can I use knip or vulture for dead code detection with automated cleanup?

Yes, automated dead code cleanup integrates with language-specific detection tools like knip, vulture, or deadcode. These tools identify unused code, while the cleanup process enforces reference checking and test validation before removal.

How do I prevent regressions during a codebase hygiene pass?

Preventing regressions during a codebase hygiene pass requires a strict discipline of detection, grep-based reference checking, and per-batch test verification. This mandatory verification loop guarantees system stability when removing unused code or redundant utilities.

When should I not use automated dead code removal?

Automated dead code removal should be approached with caution for high-risk deletions classified in the DANGER tier. These items require human oversight, and the process should not bypass the mandatory per-item verification loop to avoid behavioral regressions.