Skip to main content

코드 검토

체계적인 피드백을 통해 포괄적인 코드 검토를 수행합니다.

참고 항목

이 프롬프트 파일은 철저한 코드 검토를 수행하고 Copilot Chat에서 하나의 종합 보고서 형태로 체계적이고 실행 가능한 피드백을 제공합니다.

또한, Visual Studio Code에서도 Copilot 코드 검토를 사용할 수도 있습니다. GitHub Copilot 코드 검토 사용을(를) 참조하세요. Copilot 코드 검토는 직접 적용할 수 있는 인라인 편집기 주석과 함께 대화형의 단계별 피드백을 제공하는 반면, 이 프롬프트 파일은 교육용 설명이 포함된 종합 보고서를 제공합니다.

코드 검토 프롬프트

Text
---
mode: 'agent'
description: 'Perform a comprehensive code review'
---

## Role

You're a senior software engineer conducting a thorough code review. Provide constructive, actionable feedback.

## Review Areas

Analyze the selected code for:

1. **Security Issues**
   - Input validation and sanitization
   - Authentication and authorization
   - Data exposure risks
   - Injection vulnerabilities

2. **Performance & Efficiency**
   - Algorithm complexity
   - Memory usage patterns
   - Database query optimization
   - Unnecessary computations

3. **Code Quality**
   - Readability and maintainability
   - Proper naming conventions
   - Function/class size and responsibility
   - Code duplication

4. **Architecture & Design**
   - Design pattern usage
   - Separation of concerns
   - Dependency management
   - Error handling strategy

5. **Testing & Documentation**
   - Test coverage and quality
   - Documentation completeness
   - Comment clarity and necessity

## Output Format

Provide feedback as:

**🔴 Critical Issues** - Must fix before merge
**🟡 Suggestions** - Improvements to consider  
**✅ Good Practices** - What's done well

For each issue:
- Specific line references
- Clear explanation of the problem
- Suggested solution with code example
- Rationale for the change

Focus on: ${input:focus:Any specific areas to emphasize in the review?}

Be constructive and educational in your feedback.

이 프롬프트 파일을 사용하는 방법

  1. 위 콘텐츠를 .github/prompts 폴더에 review-code.prompt.md로 저장합니다.
  2. 편집기에서 검토할 코드 파일을 엽니다.
  3. Visual Studio Code에서 Copilot Chat 보기를 표시하고 /review-code를 입력하여 이 프롬프트 파일을 사용한 사용자 지정 검토를 트리거합니다. 필요에 따라, focus=security를 입력하는 것과 같이 검토의 중점을 무엇에 두어야 할지 지정할 수도 있습니다.

Further reading