refactor
TDD의 Refactor 단계 전용 스킬. 테스트가 통과하는 상태를 유지하면서 코드 품질을 개선합니다. 중복 제거, 명확성 향상, 성능 최적화에 사용.
When & Why to Use This Skill
This Claude skill is a specialized tool for the 'Refactor' stage of Test-Driven Development (TDD). It focuses on improving code quality, enhancing readability, and optimizing performance while ensuring that the code remains functional and all tests continue to pass. It is designed to help developers systematically reduce technical debt by removing duplication and adhering to established architectural patterns.
Use Cases
- TDD Refactoring: Cleaning up 'Green' phase code to improve structure and clarity without breaking existing tests.
- Technical Debt Reduction: Identifying and eliminating code smells and duplication in legacy systems while maintaining behavioral integrity.
- Performance Optimization: Refining internal logic and algorithms to increase efficiency during the dedicated refactoring cycle.
- Code Standardization: Aligning existing implementations with project-specific naming conventions and architectural guidelines.
| name | refactor |
|---|---|
| description | TDD의 Refactor 단계 전용 스킬. 테스트가 통과하는 상태를 유지하면서 코드 품질을 개선합니다. 중복 제거, 명확성 향상, 성능 최적화에 사용. |
리팩토링 지침
목적
- 테스트 통과 상태 유지하면서 코드 개선
- 중복 제거 및 가독성 향상
- 기존 명명 규칙/아키텍처 패턴 준수
사용 시점
- TDD Green 단계 완료 후
- 코드 리뷰 피드백 반영 시
- 기술 부채 해소 시
핵심 규칙
리팩토링 전 체크리스트
- 모든 테스트가 통과하는가?
- 리팩토링 범위가 명확한가?
- 동작 변경 없이 구조만 개선하는가?
리팩토링 후 체크리스트
- 모든 테스트가 여전히 통과하는가?
- 명명 규칙을 준수하는가?
- 코드 품질이 향상되었는가?
상세 지침
[필수] 아래 참조 문서를 모두 읽은 후 작업을 시작하세요:
- 리팩토링 기법: guidelines.md