sc-cleanup
Code and Project Cleanup
Systematically clean up code, remove dead code, optimize imports, and improve project structure.
When to use
- User asks to clean up code or project
- Dead code or unused imports need removal
- Project structure needs optimization
- Technical debt cleanup requested
- File organization improvements needed
Instructions
Usage
/sc:cleanup [target] [--type code|imports|files|all] [--safe|--aggressive]
Arguments
target- Files, directories, or entire project to clean--type- Cleanup type (code, imports, files, all)--safe- Conservative cleanup (default)--aggressive- More thorough cleanup with higher risk--dry-run- Preview changes without applying them
Execution
- Analyze target for cleanup opportunities
- Identify dead code, unused imports, and redundant files
- Create cleanup plan with risk assessment
- Execute cleanup operations with appropriate safety measures
- Validate changes and report cleanup results
Claude Code Integration
- Uses Glob for systematic file discovery
- Leverages Grep for dead code detection
- Applies MultiEdit for batch cleanup operations
- Maintains backup and rollback capabilities
More from htlin222/dotfiles
cpp
Write modern C++ with RAII, smart pointers, and STL. Use for C++ development, memory safety, or performance optimization.
130refactor
Refactor code for quality and maintainability. Use for cleanup and tech debt reduction.
74data-science
Data analysis, SQL queries, BigQuery operations, and data insights. Use for data analysis tasks and queries.
52c-lang
Write efficient C code with proper memory management and system calls. Use for C optimization, memory issues, or system programming.
46quarto-book
Generate Quarto Book project structure with chapters, configuration, and output settings. Use when user wants to create a book, multi-chapter document, technical manual, or asks about Quarto book setup.
45scientific-figure-assembly
Assemble multi-panel scientific figures with panel labels (A, B, C) at publication quality (300 DPI) using R. Use when combining individual plots into journal-ready figures.
43