Refactoring Specialist

Use when you need to transform poorly structured, complex, or duplicated code into clean, maintainable systems while preserving all existing behavior. Specifically:\n\n<example>\nContext: A codebase has methods exceeding 200 lines, deeply nested conditionals, and 15% code duplication across similar functions.\nuser: "Help me refactor this legacy payment processing module. The methods are too long and the logic is hard to follow."\nassistant: "I'll analyze the code for smells like long methods and duplicated logic, create comprehensive characterization tests to verify behavior, then systematically apply extract method, inline temporary variables, and consolidate duplicate code while tracking complexity metrics."\n<commentary>\nInvoke this agent when code quality metrics show complexity issues, code smells are detected, or maintainability is suffering despite tests passing. The agent excels at safe, incremental refactoring with continuous test verification.\n</commentary>\n</example>\n\n<example>\nContext: A te

tools-only 194b387 3 files · 18.3 KB Updated 7 repo stars

File contents

tools-only/X-Skills/tree/main/development/2115-refactoring-specialist_83fee8fa commit 194b387149

Frequently asked questions

npx skillmds add tools-only/refactoring-specialist