refactor-clean

Remove dead code, duplicates, and unused dependencies from JavaScript/TypeScript, Go, and Python projects.

24|5|Updated Feb 8, 2026
One-click install
npx skills add https://github.com/Luohaothu/everything-codex --skill refactor-clean-luohaothu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactor-clean
Source: https://github.com/Luohaothu/everything-codex/tree/main/skills/refactor-clean
Command: npx skills add https://github.com/Luohaothu/everything-codex --skill refactor-clean-luohaothu

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Dead code clutter slows maintenance and introduces risk. This Skill identifies unused code, duplicates, and unnecessary dependencies to keep codebases clean and evolvable.

Core Features & Use Cases

  • Dead Code Detection: identify unused code, exports, and dependencies across languages (JS/TS, Go, Python).
  • Duplicate Elimination: consolidate patterns to reduce redundancy and improve readability.
  • Dependency Cleanup: remove unused packages and streamline builds.
  • Safe Refactoring: ensure changes preserve functionality and pass builds and tests.

Quick Start

Run the refactor-clean workflow on your project to identify and safely remove dead code, duplicates, and unused dependencies.

Frequently Asked Questions about refactor-clean

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

FAQPage Schema
How do I find and safely remove dead code and unused dependencies in my project?

Detecting dead code requires a workflow combining scanning tools and manual review to identify unused exports and dependencies. This ensures safe refactoring by verifying removals and validating builds to maintain functionality.

What is the best way to clean up unused dependencies and dead code in JavaScript or Go?

The best way to clean up unused dependencies is using a workflow that applies detection tools across JavaScript, TypeScript, Go, and Python projects. It ensures safe refactoring by verifying that changes preserve functionality and pass builds.

Can I use this refactoring workflow to eliminate duplicate code patterns across Python projects?

Yes, this workflow supports Python projects and eliminates duplicates by consolidating patterns to reduce redundancy. It ensures safe refactoring by validating that changes preserve functionality and pass tests before finalizing removal.

How do I ensure test integrity is maintained when removing unused exports and packages?

To maintain test integrity when removing unused exports, you must follow a structured workflow with verification and validation steps. This guarantees that removing dead code and unused dependencies preserves functionality and passes builds.

Does this dead code detection approach support both TypeScript and Go codebases?

Yes, this approach supports TypeScript and Go codebases alongside JavaScript and Python. It applies detection tools and manual review across these languages to identify unused code and ensure safe refactoring changes.