work-clean

Detect and remove dead code, unused imports, and duplicates in Node.js, Rust, Go, and Python projects.

Updated Sep 12, 2023
One-click install
npx skills add https://github.com/byunghak-dable/.dotfiles --skill work-clean
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: work-clean
Source: https://github.com/byunghak-dable/.dotfiles/tree/main/claude/.claude/skills/work-clean
Command: npx skills add https://github.com/byunghak-dable/.dotfiles --skill work-clean

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill automates the process of identifying and removing dead code, unused imports, and duplicate code patterns, leading to a cleaner and more maintainable codebase.

Core Features & Use Cases

  • Dead Code Detection: Identifies and suggests removal of unused exports, functions, classes, and variables.
  • Dependency Cleanup: Helps in removing unused dependencies from project manifests.
  • Code Duplication Reduction: Finds and flags repetitive code patterns for consolidation.
  • Use Case: After completing a feature, use this Skill to ensure no leftover dead code or unnecessary dependencies are included in the final commit.

Quick Start

Run the work-clean skill to tidy up the current project's codebase.

Frequently Asked Questions about work-clean

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

FAQPage Schema
How do I automatically detect and remove dead code in a Node.js or Rust project?

Automated dead code detection in Node.js or Rust projects is handled by scanning files with tools like knip, depcheck, and cargo-udeps to identify unused exports, functions, and variables for removal. The Skill categorizes deletions into SAFE, CAUTION, and DANGER levels, only auto-deleting SAFE modifications.

What is the best way to clean up unused dependencies and imports in my codebase?

Cleaning up unused dependencies and imports is best done by scanning project manifests and files to detect and remove redundant code patterns. This Skill targets Node.js, Rust, Go, and Python environments, ensuring code safety by categorizing changes into SAFE, CAUTION, and DANGER levels before applying automated deletions.

Does this automated code cleanup tool work with Go and Python projects?

Yes, automated code cleanup works with Go and Python projects, utilizing tools like go mod tidy for dependency analysis and scoping. It detects dead code, unused imports, and duplicate patterns across these project files while categorizing all suggested modifications into SAFE, CAUTION, and DANGER levels.

How safe is automated dead code deletion for my project files?

Automated dead code deletion is kept safe by categorizing all detected changes into SAFE, CAUTION, and DANGER levels. The Skill only performs automated deletion for modifications classified as SAFE, ensuring that uncertain or potentially breaking code changes require manual review.

When should I run a code cleanup and refactoring scan on my repository?

You should run a code cleanup scan after completing a feature to ensure no leftover dead code, unused imports, or unnecessary dependencies are included in the final commit. This prevents code duplication and maintains a cleaner, more maintainable codebase across Node.js, Rust, Go, and Python projects.