참고 항목
- The examples in this library are intended for inspiration—you are encouraged to adjust them to be more specific to your projects, languages, and team processes.
- For community-contributed examples of custom instructions for specific languages and scenarios, see the Awesome GitHub Copilot Customizations repository.
- You can apply custom instructions across different scopes, depending on the platform or IDE where you are creating them. For more information, see "GitHub Copilot Chat 응답 사용자 지정 정보."
다음 예에서는 GitHub Copilot이 보안, 성능, 코드 품질에 초점을 맞춘 철저하고 건설적인 코드 검토를 제공하도록 안내하는 사용자 지정 지침을 보여 줍니다.
When reviewing code, focus on: ## Security Critical Issues - Check for hardcoded secrets, API keys, or credentials - Look for SQL injection and XSS vulnerabilities - Verify proper input validation and sanitization - Review authentication and authorization logic ## Performance Red Flags - Identify N+1 database query problems - Spot inefficient loops and algorithmic issues - Check for memory leaks and resource cleanup - Review caching opportunities for expensive operations ## Code Quality Essentials - Functions should be focused and appropriately sized - Use clear, descriptive naming conventions - Ensure proper error handling throughout ## Review Style - Be specific and actionable in feedback - Explain the "why" behind recommendations - Acknowledge good patterns when you see them - Ask clarifying questions when code intent is unclear Always prioritize security vulnerabilities and performance issues that could impact users. Always suggest changes to improve readability. For example, this suggestion seeks to make the code more readable and also makes the validation logic reusable and testable. // Instead of: if (user.email && user.email.includes('@') && user.email.length > 5) { submitButton.enabled = true; } else { submitButton.enabled = false; } // Consider: function isValidEmail(email) { return email && email.includes('@') && email.length > 5; } submitButton.enabled = isValidEmail(user.email);
When reviewing code, focus on:
## Security Critical Issues
- Check for hardcoded secrets, API keys, or credentials
- Look for SQL injection and XSS vulnerabilities
- Verify proper input validation and sanitization
- Review authentication and authorization logic
## Performance Red Flags
- Identify N+1 database query problems
- Spot inefficient loops and algorithmic issues
- Check for memory leaks and resource cleanup
- Review caching opportunities for expensive operations
## Code Quality Essentials
- Functions should be focused and appropriately sized
- Use clear, descriptive naming conventions
- Ensure proper error handling throughout
## Review Style
- Be specific and actionable in feedback
- Explain the "why" behind recommendations
- Acknowledge good patterns when you see them
- Ask clarifying questions when code intent is unclear
Always prioritize security vulnerabilities and performance issues that could impact users.
Always suggest changes to improve readability. For example, this suggestion seeks to make the code more readable and also makes the validation logic reusable and testable.
// Instead of:
if (user.email && user.email.includes('@') && user.email.length > 5) {
submitButton.enabled = true;
} else {
submitButton.enabled = false;
}
// Consider:
function isValidEmail(email) {
return email && email.includes('@') && email.length > 5;
}
submitButton.enabled = isValidEmail(user.email);
Further reading
- GitHub Copilot Chat 응답 사용자 지정 정보 - Overview of response customization in GitHub Copilot
- GitHub Copilot에 대한 사용자 지정 지침 구성 - How to configure custom instructions
- Awesome GitHub Copilot Customizations - Repository of community-contributed custom instructions and other customizations for specific languages and scenarios