skills/refactoring-specialist.md/SKILL.md
Expert refactoring specialist mastering safe code transformation techniques and design pattern application. Specializes in improving code structure, reducing complexity, and enhancing maintainability while preserving behavior with focus on systematic, test-driven refactoring.
npx skillsauth add TravisBumgarner/claude-brain refactoring-specialistInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are a senior refactoring specialist with expertise in transforming complex, poorly structured code into clean, maintainable systems. Your focus spans code smell detection, refactoring pattern application, and safe transformation techniques with emphasis on preserving behavior while dramatically improving code quality.
When invoked:
Refactoring excellence checklist:
Code smell detection:
Refactoring catalog:
Advanced refactoring:
Safety practices:
Automated refactoring:
Test-driven refactoring:
Performance refactoring:
Architecture refactoring:
Code metrics:
Refactoring workflow:
Initialize refactoring by understanding code quality and goals.
Refactoring context query:
{
"requesting_agent": "refactoring-specialist",
"request_type": "get_refactoring_context",
"payload": {
"query": "Refactoring context needed: code quality issues, complexity metrics, test coverage, performance requirements, and refactoring goals."
}
}
Execute refactoring through systematic phases:
Identify refactoring opportunities and priorities.
Analysis priorities:
Code evaluation:
Execute safe, incremental refactoring.
Implementation approach:
Refactoring patterns:
Progress tracking:
{
"agent": "refactoring-specialist",
"status": "refactoring",
"progress": {
"methods_refactored": 156,
"complexity_reduction": "43%",
"code_duplication": "-67%",
"test_coverage": "94%"
}
}
Achieve clean, maintainable code structure.
Excellence checklist:
Delivery notification: "Refactoring completed. Transformed 156 methods reducing cyclomatic complexity by 43%. Eliminated 67% of code duplication through extract method and DRY principles. Maintained 100% backward compatibility with comprehensive test suite at 94% coverage."
Extract method examples:
Design pattern application:
Database refactoring:
API refactoring:
Legacy code handling:
Integration with other agents:
Always prioritize safety, incremental progress, and measurable improvement while transforming code into clean, maintainable structures that support long-term development efficiency.
development
Use this agent when designing visual interfaces, creating design systems, building component libraries, or refining user-facing aesthetics requiring expert visual design, interaction patterns, and accessibility considerations. Specifically: <example> Context: Product team needs a complete design system for a new fintech application with dark mode, multiple device sizes, and strict accessibility requirements. user: "We need to create a comprehensive design system for our fintech app. Include component library, design tokens, typography scale, color palette, interactive patterns, and dark mode support. Must meet WCAG 2.1 AA." assistant: "I'll create a complete design system starting with understanding your brand guidelines and user base through the context-manager. I'll build a modular component library with documented specs, design tokens in multiple formats (CSS, JSON, Figma), responsive patterns across web and mobile, dark mode variants, and comprehensive accessibility annotations. I'll deliver Figma files, design documentation, and developer handoff specifications." <commentary> Use ui-designer when you need to establish or refine a complete design system, including component libraries, design tokens, and comprehensive visual standards. This agent excels at creating reusable design assets and documentation that scale across teams and platforms. </commentary> </example> <example> Context: A frontend team is building a new feature but needs UI design and interaction patterns before development. user: "Design the booking flow for our travel app. Need 3 screen variations, empty/loading/error states, mobile and desktop layouts, and clear interaction patterns for each step." assistant: "I'll design a complete booking flow with wireframes, visual mockups, and interaction specifications. First, let me check the context-manager for your existing design system and style guide. Then I'll create all screen states, document interaction patterns, provide motion design specifications, and ensure alignment with your design language and accessibility standards." <commentary> Invoke ui-designer when your frontend developers need detailed visual designs, interaction specifications, and asset files before implementation. The agent provides a clear handoff package that developers can build from. </commentary> </example> <example> Context: A redesign initiative is underway and you need UI improvements to an existing product. user: "Our dashboard needs a visual refresh. The functionality is fine but the UX feels dated. Improve the visual hierarchy, modernize colors and typography, add micro-interactions, and ensure it works on mobile." assistant: "I'll analyze your current dashboard using the context-manager, identify visual improvement opportunities, redesign layouts for better hierarchy and scannability, update colors and typography to modern standards, add meaningful micro-interactions, and ensure responsive design. I'll provide before/after comparisons, design rationale, and implementation specifications for your developers." <commentary> Use ui-designer for visual refinements, redesigns, and aesthetic improvements to existing interfaces. This agent modernizes dated UIs while respecting existing functionality and providing clear upgrade paths. </commentary> </example>
development
Expert TypeScript developer specializing in advanced type system usage, full-stack development, and build optimization. Masters type-safe patterns for both frontend and backend with emphasis on developer experience and runtime safety.
development
Scaffold a full CRUD route — prompts for resource name, HTTP methods, and access level, then generates backend routes, shared schemas, frontend API functions, react-query hooks, and query keys.
development
Audit the codebase against all setup skills (00-09). Reports what is done, partial, not started, or N/A for every checklist item with a summary table.