What problem does it solve? Codebases accumulate technical debt through complex functions, duplicated logic, and design issues that are hard to spot manually. This Skill automates the detection of refactoring opportunities and produces a prioritized report with concrete before-and-after fixes. ## Core Features & Use Cases - Complexity Analysis: Flags functions with cyclomatic complexity above 10, nesting deeper than 4 levels, and methods exceeding 50 lines. - Duplication & Code Smell Detection: Identifies repeated code blocks, god classes, feature envy, long parameter lists, magic numbers, and dead code. - Prioritized Report with Fixes: Outputs a Markdown report ranking issues as High/Medium/Low with before-and-after code examples, and can apply refactorings directly with the --apply flag. - Use Case: Run /refactor on a legacy Python module to get a summary table of complexity, duplication, and smell counts, plus actionable refactoring steps like extracting a 87-line function into validate/transform/save helpers. ## Quick Start Ask Claude to run /refactor on a specific file or directory, for example: refactor the module at src/utils/ and show the highest priority issues.