strategic-code-reviewer
DRY, KISS, SRP 원칙에 대해서 코드 리뷰를 수행합니다. 코드 품질 검토, 리팩터링 기회 식별, 중복 코드 감지, 복잡한 로직 단순화에 특화되어 있습니다.
When & Why to Use This Skill
The Strategic Code Reviewer is a specialized Claude skill designed to enhance software quality by evaluating code against industry-standard principles: DRY (Don't Repeat Yourself), KISS (Keep It Simple, Stupid), and SRP (Single Responsibility Principle). It automates the detection of redundant logic, excessive complexity, and architectural violations, providing actionable refactoring suggestions to reduce technical debt and improve maintainability.
Use Cases
- Automated Pull Request Audits: Automatically scan incoming code changes for violations of DRY and KISS principles to maintain a clean and efficient codebase.
- Legacy Code Refactoring: Identify and decompose 'God Objects' or overly complex functions that violate the Single Responsibility Principle (SRP) to improve modularity.
- Technical Debt Prioritization: Use the built-in severity levels (High, Medium, Low) to identify and rank critical code quality issues that require immediate attention during maintenance cycles.
- Complexity Reduction: Detect deep nesting, complex conditionals, and excessive parameters to simplify logic and reduce the cognitive load for developers.
- Developer Mentoring: Provide junior developers with concrete examples and guidance on how to transform 'Bad' code patterns into 'Good' ones based on established design patterns.
| name | strategic-code-reviewer |
|---|---|
| description | DRY, KISS, SRP 원칙에 대해서 코드 리뷰를 수행합니다. 코드 품질 검토, 리팩터링 기회 식별, 중복 코드 감지, 복잡한 로직 단순화에 특화되어 있습니다. |
| allowed-tools | Read, Grep, Glob |
전략적 코드 리뷰
세 가지 검토 원칙
DRY (Don't Repeat Yourself) - 중복 제거
목표: 유지보수 비용 감소
- 동일한 코드가 여러 곳에 반복됨
- 심각도: 3회 이상 반복 = 높음, 2회 = 중간
- 개선 방향: 함수 추출 → Hook/모듈화 → 라이브러리화
KISS (Keep It Simple, Stupid) - 단순화
목표: 인지 부하 감소 및 버그 방지
- 깊은 중첩(3단계+), 복잡한 조건식, 매개변수 과다(4개+)
- 심각도: 순환 복잡도 > 10 = 높음, 7-10 = 중간
- 개선 방향: 조기 반환(guard clause) → 룩업 테이블 → 함수 분리
SRP (Single Responsibility Principle) - 단일 책임 원칙
목표: 변경 영향 최소화 및 유지보수성 향상
- 하나의 함수/클래스가 여러 책임 수행 (데이터 처리 + UI 업데이트 + 로깅 등)
- 심각도: 3개 이상 책임 = 높음, 2개 = 중간, 사소한 개선 = 낮음
- 개선 방향: 책임 분리 → 함수/클래스 분할 → 모듈화
🔍 이슈 분류
| 심각도 | 설명 |
|---|---|
| 🔴 높음 | 즉시 수정 필요 (유지보수성 또는 신뢰성 영향) |
| 🟡 중간 | 조만간 개선 필요 (인지 부하 증가) |
| 🟢 낮음 | 선택적 개선 (스타일 및 명확성) |
Examples
examples/ 폴더에 각 원칙별 Good/Bad 패턴 예시가 있다.
examples/dry.md: DRY 원칙 위반/준수 예시examples/kiss.md: KISS 원칙 위반/준수 예시examples/srp.md: SRP 원칙 위반/준수 예시
리뷰 중 특정 원칙 위반을 발견했을 때, 해당 예시 파일을 Read 도구로 참조하여 구체적인 개선 방향을 제시한다.