tdd-workflows-tdd-refactor - Safely refactor code using TDD and test safety nets.
Refactor code while keeping tests green by applying design patterns, SOLID principles, and performance optimizations.
Tags
Updated: 2026-09-17Capabilities
Typical Inputs
Typical Outputs
What this skill does
- Establish baseline by running tests
- Detect code smells in source
- Apply design patterns and principles
- Refactor code using incremental steps
- Optimize algorithm and performance
- Verify test safety and metrics
Inputs
- Target code to refactor
- Existing test suite
- Implementation playbook resource file
Outputs
- Refactored source code
- Test execution results
- Before and after metrics comparison
- Applied refactoring techniques list
- Performance improvement measurements
- Technical debt assessment
Requirements
- tdd-orchestrator subagent
- Opus model
- Task tool access
