{"meta":{"title":"첫 번째 사용자 지정 지침","intro":"이 간단한 예시를 사용하여 첫 번째 사용자 지정 지침을 만들고 테스트합니다.","product":"GitHub Copilot","breadcrumbs":[{"href":"/ko/copilot","title":"GitHub Copilot"},{"href":"/ko/copilot/tutorials","title":"자습서"},{"href":"/ko/copilot/tutorials/customization-library","title":"사용자 지정 라이브러리"},{"href":"/ko/copilot/tutorials/customization-library/custom-instructions","title":"사용자 지정 지침"},{"href":"/ko/copilot/tutorials/customization-library/custom-instructions/your-first-custom-instructions","title":"첫 번째 사용자 지정 지침"}],"documentType":"article"},"body":"# 첫 번째 사용자 지정 지침\n\n이 간단한 예시를 사용하여 첫 번째 사용자 지정 지침을 만들고 테스트합니다.\n\n> \\[!NOTE]\n>\n> * 이 라이브러리의 예시는 영감을 얻기 위한 것입니다. 프로젝트, 언어, 팀 프로세스에 더 구체적으로 맞게 조정하는 것이 좋습니다.\n> * 특정 언어 및 시나리오에 대한 사용자 지정 지침의 커뮤니티 기여 예시는 [우수한 GitHub Copilot 사용자 지정](https://github.com/github/awesome-copilot/blob/main/docs/README.instructions.md) 리포지토리를 참조하세요.\n> * 사용자 지정 지침을 만드는 플랫폼 또는 IDE에 따라 다양한 범위에서 사용자 지정 지침을 적용할 수 있습니다. 자세한 내용은 \"[GitHub Copilot 응답을 사용자 지정하는 방법에 대한 정보](/ko/copilot/concepts/response-customization)\"을(를) 참조하세요.\n\n## > \\[!NOTE]\n\n> * 이 라이브러리의 예시는 영감을 얻기 위한 것입니다. 프로젝트, 언어, 팀 프로세스에 더 구체적으로 맞게 조정하는 것이 좋습니다.\n> * 특정 언어 및 시나리오에 대한 사용자 지정 지침의 커뮤니티 기여 예시는 [우수한 GitHub Copilot 사용자 지정](https://github.com/github/awesome-copilot/blob/main/docs/README.instructions.md) 리포지토리를 참조하세요.\n> * 사용자 지정 지침을 만드는 플랫폼 또는 IDE에 따라 다양한 범위에서 사용자 지정 지침을 적용할 수 있습니다. 자세한 내용은 \"[GitHub Copilot 응답을 사용자 지정하는 방법에 대한 정보](/ko/copilot/concepts/response-customization)\"을(를) 참조하세요.\n\n사용자 지정 정보\n\n* 두 가지 유형의 파일을 사용하여 GitHub Copilot의 응답을 사용자 지정할 수 있습니다.\n* **사용자 지정 지침**은 GitHub Copilot이 모든 상호 작용에서 어떻게 작동해야 하는지에 대한 지속적인 지침을 제공합니다.\n  **프롬프트 파일(공개 미리 보기)** 은 필요할 때 호출할 수 있는 특정 작업에 대한 재사용 가능한 프롬프트를 정의합니다.\n\n프롬프트 파일은 VS Code, Visual Studio, 그리고 JetBrains IDE에서만 사용할 수 있습니다. 입문 예제로는 [첫 번째 프롬프트 파일](/ko/copilot/tutorials/customization-library/prompt-files/your-first-prompt-file)을 확인하세요.\n\n사용자 지정 지침은 각 AI 워크플로에 컨텍스트를 추가하는 데 도움이 되지만 프롬프트 파일을 사용하면 특정 채팅 상호 작용에 지침을 추가할 수 있습니다. 다음 두 가지 방법으로 리포지토리 사용자 지정 지침을 만들 수 있습니다.\n\n* **리포지토리 전체 지침**: 리포지토리의 모든 파일에 적용되는 단일 `copilot-instructions.md` 파일을 리포지토리 루트에 만듭니다.\n* **경로 특정 지침**: 특정 파일 또는 디렉터리에만 적용되는 `.instructions.md` 필드를 사용하여 하나 이상의 `applyTo` 파일을 만듭니다. 경로별 지침은 현재 **공동 파일럿 채팅**, Visual Studio Code, Visual Studio 및 **Copilot 클라우드 에이전트** 에서 지원됩니다.\n\n## 가장 일반적으로 사용되고 지원되는 것은 리포지토리 사용자 지정 지침이지만, GitHub의 GitHub Copilot 채팅에 대해서만 개인 및 조직 사용자 지정 지침을 정의할 수도 있습니다.\n\n{데이터 재사용 가능. Copilot 저장소 사용자 정의 지침 유형}\n\n### 첫 번째 지침\n\n```markdown copy\nWhen writing functions, always:\n- Add descriptive JSDoc comments\n- Include input validation\n- Use early returns for error conditions\n- Add meaningful variable names\n- Include at least one example usage in comments\n```\n\n시작하기 위해, GitHub Copilot이 귀하의 코딩 기본 설정을 이해할 수 있도록 설계된 주요 맞춤 지침을 활용하십시오.\n\n## 함수 작성 지침\n\n이 지침은 GitHub Copilot이 함수를 생성하는 방식을 변경합니다.\n\n1. 테스트해 보세요\n\n   `Create a JavaScript function that calculates the area of a circle`\n\n   사용자 지정 지침이 수행할 수 있는 차이점을 빠르게 테스트하려면 공동 파일럿 채팅에서 개인 사용자 지정 지침을 사용할 수 있습니다.\n\n   ```javascript\n   function areaOfCircle(radius) {\n       if (typeof radius !== 'number' || radius < 0) {\n           throw new Error('Radius must be a non-negative number');\n       }\n       return Math.PI * radius * radius;\n   }\n   ```\n\n2. 먼저 [github.com/copilot](https://github.com/copilot?ref_product=copilot\\&ref_type=trial\\&ref_style=text) 이동하여 다음 프롬프트를 입력합니다.\n   **사용자 지정 지침이 없으면** 다음과 같은 결과가 발생할 수 있습니다.\n\n   이제 페이지 왼쪽 아래에 있는 프로필 사진을 클릭하고 개인 맞춤 지침을 엑세스한 다음 **개인 지침**을 클릭합니다.\n\n   위의 지침을 텍스트 상자에 붙여넣은 다음, **Save**를 클릭합니다.\n\n   ```javascript\n   /**\n    * Calculates the area of a circle given its radius.\n    * * @param {number} radius - The radius of the circle. Must be a positive number.\n    * @returns {number|null} The area of the circle, or null if the input is invalid.\n    * * @example\n    * // returns 78.53981633974483\n    * areaOfCircle(5);\n    * * @example\n    * // returns null (invalid input)\n    * areaOfCircle(-2);\n    */\n   function areaOfCircle(radius) {\n     if (typeof radius !== \"number\" || isNaN(radius) || radius <= 0) {\n       // Invalid input: radius must be a positive number\n       return null;\n     }\n\n     const area = Math.PI * Math.pow(radius, 2);\n     return area;\n   }\n\n   // Example usage:\n   console.log(areaOfCircle(5));   // 78.53981633974483\n   console.log(areaOfCircle(-2));  // null\n   ```\n\n## 추가 참고 자료\n\n* [GitHub Copilot 응답을 사용자 지정하는 방법에 대한 정보](/ko/copilot/concepts/response-customization) - GitHub Copilot의 응답 사용자 지정 개요\n* [에 대한 사용자 지정 지침 추가 Copilot](/ko/copilot/how-tos/configure-custom-instructions) - 사용자 지정 지침을 구성하는 방법\n* [멋진 GitHub Copilot 사용자 지정](https://github.com/github/awesome-copilot/blob/main/README.md) - 특정 언어 및 시나리오의 커뮤니티 기여 사용자 지정 지침 및 기타 사용자 지정 리포지토리"}