specialist-refactor-cleaner

Remove dead code, unused exports, and dependencies from TypeScript/JavaScript projects.

42|1|Updated Mar 24, 2026
One-click install
npx skills add https://github.com/VenTheZone/pi-dots --skill specialist-refactor-cleaner
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: specialist-refactor-cleaner
Source: https://github.com/VenTheZone/pi-dots/tree/main/pi-dotfiles-specialist-skills/skills/specialist-refactor-cleaner
Command: npx skills add https://github.com/VenTheZone/pi-dots --skill specialist-refactor-cleaner

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Clear, maintainable code requires removing dead code, unused exports, and duplicates that bloat the base.

Core Features & Use Cases

  • Dead Code Detection: Identify unused files, exports, and dependencies to reduce surface area.
  • Duplicate Elimination: Detect and consolidate identical logic to avoid drift.
  • Dependency Cleanup: Remove unused packages and imports to streamline builds and audits.
  • Safe Refactoring: Follow a structured workflow to ensure changes don’t break functionality.
  • Documentation: Record all deletions in DELETION_LOG.md for traceability.

Quick Start

Run knip, depcheck, and ts-prune to detect issues, then follow the safe removal workflow to prune dead code and duplicates.

Frequently Asked Questions about specialist-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?

To remove dead code in a TypeScript project, run detection tools like knip, depcheck, and ts-prune to identify unused files, exports, and dependencies, then follow a structured removal workflow to prune them safely while keeping builds green.

What is the safest way to clean up unused dependencies during a migration?

The safest way to clean up unused dependencies during a migration is to use a risk-based removal process that documents all deletions in a DELETION_LOG.md audit trail, ensuring builds and tests remain green throughout the refactoring workflow.

Can I consolidate duplicate logic across JavaScript files without breaking builds?

You can consolidate duplicate logic across JavaScript files without breaking builds by detecting identical code, applying a structured refactoring workflow to merge duplicates, and verifying that tests remain green throughout the removal process.

Does knip or depcheck work better for finding unused exports in npm projects?

Knip and depcheck are integrated together to identify unused exports and dependencies in npm or yarn projects, combining knip's export analysis and depcheck's package detection to enable comprehensive dead code removal and safe refactoring.

How do I keep track of deleted files and exports during code cleanup?

You can keep track of deleted files and exports during code cleanup by recording all removals in a DELETION_LOG.md file, which provides a structured audit trail for traceability and maintenance verification.