← ClaudeAtlas

refactorlisted

Identifies code quality issues and suggests refactoring. Triggers on requests to clean up, improve, or refactor code.
dagonet/claude-code-toolkit · ★ 3 · Code & Development · score 69
Install: claude install-skill dagonet/claude-code-toolkit
# Refactor Skill Identify code quality issues and refactor problematic code. ## When to Use This skill auto-activates when: - User asks to "refactor", "clean up", or "improve" code - User mentions "code smell", "technical debt", or "messy code" - User asks about code quality or maintainability - User wants to simplify or restructure existing code ## Workflow 1. **Identify scope** - If path provided, focus on that area - If "all" or empty, analyze entire solution 2. **Run quality analysis** (in parallel) - Call `analyze_method_complexity(root, threshold=10)` - Call `find_god_classes(root, method_threshold=20, field_threshold=15)` - Call `find_large_files(root, line_threshold=500)` - Call `analyze_namespace_conflicts(root)` 3. **Compile findings** ``` ## Code Quality Report ### Critical Issues - [File:Line] Method complexity: X (threshold: 10) ### High Priority - [File] God class: X methods, Y fields ### Medium Priority - [File] Large file: X lines ### Conflicts - [Type] defined in multiple locations ``` 4. **Prioritize refactoring** - CRITICAL: Namespace conflicts (blocks compilation) - HIGH: God classes (maintainability risk) - MEDIUM: Complex methods (bug risk) - LOW: Large files (readability) 5. **Propose refactoring strategy** For each issue, suggest specific refactoring: **Complex methods:** - Extract Method - Replace Conditional with Polymorphism - Introduce Parameter Object *