Skip to main content

GitHub Copilot에 대한 리포지토리 사용자 지정 지침 추가

프로젝트를 이해하는 방법과 변경 내용을 빌드, 테스트, 검증하는 방법에 대해 Copilot에게 추가적인 컨텍스트를 제공하는 리포지토리 사용자 지정 지침 파일을 만듭니다.

이 문서의 버전은 GitHub 웹 사이트의 리포지토리 사용자 지정 지침에 대한 것입니다. 다른 환경에서 사용자 지정 지침을 사용하는 방법에 대한 자세한 내용은 위의 탭을 클릭합니다.

리포지토리 사용자 지정 지침은 현재 다음을 지원합니다.

  • VS Code에서 Copilot Chat
  • Copilot 코딩 에이전트
  • Visual Studio, JetBrains IDE, Xcode, 및 GitHub 웹사이트(copilot-instructions.md 파일만 해당)에서 Copilot Chat
  • Copilot 코드 검토(copilot-instructions.md 파일만 해당)
  • Copilot 코드 검토

Prerequisites for repository custom instructions

  • You must have a custom instructions file (see the instructions below).

이 문서의 버전은 VS Code의 리포지토리 사용자 지정 지침 및 프롬프트 파일을 사용하기 위한 것입니다. 다른 환경에서 사용자 지정 지침을 사용하는 방법에 대한 지침은 위의 탭을 클릭합니다.

리포지토리 사용자 지정 지침은 현재 다음을 지원합니다.

  • VS Code에서 Copilot Chat
  • Copilot 코딩 에이전트
  • Visual Studio, JetBrains IDE, Xcode, 및 GitHub 웹사이트(copilot-instructions.md 파일만 해당)에서 Copilot Chat
  • Copilot 코드 검토(copilot-instructions.md 파일만 해당)
  • Copilot 코드 검토

Prerequisites for repository custom instructions

  • You must have a custom instructions file (see the instructions below).

이 문서의 버전은 Visual Studio의 리포지토리 사용자 지정 지침을 사용하기 위한 것입니다. 다른 환경에서 사용자 지정 지침을 사용하는 방법에 대한 지침은 위의 탭을 클릭합니다.

리포지토리 사용자 지정 지침은 현재 다음을 지원합니다.

  • VS Code에서 Copilot Chat
  • Copilot 코딩 에이전트
  • Visual Studio, JetBrains IDE, Xcode, 및 GitHub 웹사이트(copilot-instructions.md 파일만 해당)에서 Copilot Chat
  • Copilot 코드 검토(copilot-instructions.md 파일만 해당)
  • Copilot 코드 검토

Prerequisites for repository custom instructions

  • You must have a custom instructions file (see the instructions below).

이 문서의 이 버전은 JetBrains IDE의 리포지토리 사용자 지정 지침 사용에 관한 것입니다. 다른 환경에서 사용자 지정 지침을 사용하는 방법에 대한 지침은 위의 탭을 클릭합니다.

리포지토리 사용자 지정 지침은 현재 다음을 지원합니다.

  • VS Code에서 Copilot Chat
  • Copilot 코딩 에이전트
  • Visual Studio, JetBrains IDE, Xcode, 및 GitHub 웹사이트(copilot-instructions.md 파일만 해당)에서 Copilot Chat
  • Copilot 코드 검토(copilot-instructions.md 파일만 해당)
  • Copilot 코드 검토

Prerequisites for repository custom instructions

  • You must have a custom instructions file (see the instructions below).

이 문서의 이 버전은 Xcode의 리포지토리 사용자 지정 지침 사용에 관한 것입니다. 다른 환경에서 사용자 지정 지침을 사용하는 방법에 대한 지침은 위의 탭을 클릭합니다.

리포지토리 사용자 지정 지침은 현재 다음을 지원합니다.

  • VS Code에서 Copilot Chat
  • Copilot 코딩 에이전트
  • Visual Studio, JetBrains IDE, Xcode, 및 GitHub 웹사이트(copilot-instructions.md 파일만 해당)에서 Copilot Chat
  • Copilot 코드 검토(copilot-instructions.md 파일만 해당)

Prerequisites for repository custom instructions

  • You must have a custom instructions file (see the instructions below).

참고 항목

이 기능은 현재 공개 미리 보기 버전이며 변경될 수 있습니다.

이 문서의 이 버전은 Eclipse의 리포지토리 사용자 지정 지침 사용에 관한 것입니다. 다른 환경에서 사용자 지정 지침을 사용하는 방법에 대한 지침은 위의 탭을 클릭합니다.

리포지토리 사용자 지정 지침은 현재 다음을 지원합니다.

  • VS Code에서 Copilot Chat
  • Copilot 코딩 에이전트
  • Visual Studio, JetBrains IDE, Xcode, 및 GitHub 웹사이트(copilot-instructions.md 파일만 해당)에서 Copilot Chat
  • Copilot 코드 검토(copilot-instructions.md 파일만 해당)
  • Copilot 코드 검토

Prerequisites for repository custom instructions

  • You must have a custom instructions file (see the instructions below).
  • 최신 버전의 Copilot 확장을 JetBrains IDE에 설치해야 합니다.
  • 최신 버전의 Copilot 확장을 Xcode에 설치해야 합니다.
  • 최신 버전의 Copilot 확장을 Eclipse에 설치해야 합니다.

사용자 지정 지침 만들기

JetBrains IDE는 리포지토리에 저장된 단일 .github/copilot-instructions.md 사용자 지정 명령 파일과 로컬에 저장된 global-copilot-instructions.md 파일을 지원합니다.

Copilot 설정 페이지를 사용하여 리포지토리에 .github/copilot-instructions.md 파일을 만들거나 이 파일을 수동으로 만들 수 있습니다.

지침 사이의 공백은 무시되므로 지침을 새 줄에 각각 단일 단락으로 작성하거나 가독성을 위해 빈 줄로 구분할 수 있습니다.

설정 페이지 사용

  1. JetBrains IDE에서 파일 메뉴(Windows) 또는 메뉴 모음(macOS)에서 애플리케이션의 이름을 클릭한 다음 설정을 클릭합니다.
  2. 언어 및 프레임워크에서 GitHub Copilot 을 클릭합니다.
  3. "Copilot Instructions"에서 Workspace 또는 Global을 클릭하여 사용자 지정 명령이 현재 작업 영역 또는 모든 작업 영역에 적용되는지 여부를 선택합니다.

수동으로 작업 영역 사용자 지정 지침 파일 만들기

  1. 리포지토리의 루트에서 이름이 .github/copilot-instructions.md인 파일을 만듭니다.

    .github 디렉터리가 아직 없는 경우, 새로 만듭니다.

  2. 파일에 자연어 지침을 Markdown 형식으로 추가합니다.

저장되면 이러한 지침은 Copilot을 사용하도록 설정한 상태로 연 JetBrains IDE의 현재 작업 영역에 적용됩니다.

전역 사용자 지정 지침 파일 수동으로 만들기

JetBrains IDE의 모든 작업 영역에 동일한 지침을 적용하려면 로컬 머신에 전역 사용자 지정 지침 파일을 만들 수 있습니다.

  1. 파일 탐색기 또는 터미널을 엽니다.

  2. 운영 체제에 적합한 위치로 이동합니다.

    • macOS: /Users/YOUR-USERNAME/.config/github-copilot/intellij/
    • Windows: C:\Users\YOUR-USERNAME\AppData\Local\github-copilot\intellij\
  3. 해당 디렉터리에서 global-copilot-instructions.md라는 파일을 만듭니다.

  4. Markdown 형식을 사용하여 자연어로 사용자 지정 지침을 추가합니다.

저장되면 이러한 지침은 Copilot을 사용하도록 설정한 상태로 연 JetBrains IDE의 모든 작업 영역에 전역적으로 적용됩니다.

Xcode는 리포지토리에 저장된 단일 .github/copilot-instructions.md 사용자 지정 명령 파일을 지원합니다.

Copilot 설정 페이지를 통해 리포지토리에 사용자 지정 지침 파일을 만들 수 있습니다.

지침 사이의 공백은 무시되므로 지침을 새 줄에 각각 단일 단락으로 작성하거나 가독성을 위해 빈 줄로 구분할 수 있습니다.

  1. Xcode용 GitHub Copilot 애플리케이션을 엽니다.
  2. 애플리케이션 창의 맨 위에 있는 설정에서 고급을 클릭합니다.
  3. "사용자 지정 지침" 오른쪽에서 현재 작업 영역 또는 전역을 클릭하여 사용자 지정 지침을 현재 작업 영역에 적용할지 또는 모든 작업 영역에 적용할지를 선택합니다.

Eclipse는 작업 영역 및 프로젝트 사용자 지정 지침의 두 가지 유형의 리포지토리 사용자 지정 지침을 지원합니다.

작업 영역 사용자 지정 지침 파일을 만들려면 Copilot 설정 페이지를 사용할 수 있습니다. 프로젝트 사용자 지정 지침 파일을 만들려면 프로젝트 디렉터리에 파일을 수동으로 만들 수 있습니다.

지침 사이의 공백은 무시되므로 지침을 새 줄에 각각 단일 단락으로 작성하거나 가독성을 위해 빈 줄로 구분할 수 있습니다.

작업 영역 사용자 지정 지침 파일 만들기

  1. Copilot Chat 패널을 열려면 Eclipse 하단의 상태 표시줄에 있는 Copilot 아이콘()을 클릭합니다.
  2. 메뉴에서 "Edit preferences"를 선택합니다.
  3. 왼쪽 창에서 GitHub Copilot을 확장하고 Custom Instructions를 클릭합니다.
  4. Enable workspace instructions를 선택합니다.
  5. "Workspace" 섹션의 "Set custom instructions to guide Copilot's code suggestions in this workspace"에서 Markdown 형식으로 파일에 자연어 지침을 추가합니다.

프로젝트 사용자 지정 지침 파일 만들기

  1. 프로젝트 디렉터리의 루트에서 .github/copilot-instructions.md라는 파일을 만듭니다.
  2. Markdown 형식을 사용하여 자연어로 사용자 지정 지침을 추가합니다.

저장되면 이러한 지침은 Copilot을 사용하도록 설정한 상태로 연 Eclipse의 현재 프로젝트에 적용됩니다.

VS Code은 두 가지 유형의 리포지토리 사용자 지정 지침을 지원합니다.

  • 리포지토리 전체 사용자 지정 지침으로, 리포지토리의 컨텍스트에서 수행한 모든 요청에 적용됩니다.

    이러한 항목은 리포지토리의 .github 디렉터리에 있는 copilot-instructions.md 파일에 지정됩니다. 리포지토리 전체 사용자 지정 지침 만들기를 참조하세요.

  • 지정된 경로와 일치하는 파일 컨텍스트에서 수행한 요청에 적용되는 경로별 사용자 지정 지침입니다.

    이러한 파일은 리포지토리의 .github/instructions 디렉터리 내에 있는 하나 이상의 NAME.instructions.md 파일에 지정됩니다. 경로별 사용자 지정 지침 만들기를 참조하세요.

    지정한 경로가 Copilot에서 작업 중인 파일과 일치하고 리포지토리 전체 사용자 지정 지침 파일도 있는 경우 두 파일의 지침이 모두 사용됩니다.

리포지토리 전체 사용자 지정 지침 만들기

  1. 리포지토리의 루트에서 이름이 .github/copilot-instructions.md인 파일을 만듭니다.

    .github 디렉터리가 아직 없는 경우, 새로 만듭니다.

  2. 파일에 자연어 지침을 Markdown 형식으로 추가합니다.

    지침 사이의 공백은 무시되므로 지침을 새 줄에 각각 단일 단락으로 작성하거나 가독성을 위해 빈 줄로 구분할 수 있습니다.

경로별 사용자 지정 지침 만들기

  1. Create the .github/instructions directory if it does not already exist.

  2. Create one or more NAME.instructions.md files, where NAME indicates the purpose of the instructions. The file name must end with .instructions.md.

  3. At the start of the file, create a frontmatter block containing the applyTo keyword. Use glob syntax to specify what files or directories the instructions apply to.

    For example:

    ---
    applyTo: "app/models/**/*.rb"
    ---
    

    You can specify multiple patterns by separating them with commas. For example, to apply the instructions to all TypeScript files in the repository, you could use the following frontmatter block:

    ---
    applyTo: "**/*.ts,**/*.tsx"
    ---
    

    To apply the instructions to all files, use applyTo: "**".

  4. Add your custom instructions in natural language, using Markdown format. Whitespace between instructions is ignored, so the instructions can be written as a single paragraph, each on a new line, or separated by blank lines for legibility.

Visual Studio에서는 리포지토리에 저장된 단일 .github/copilot-instructions.md 사용자 지정 지침 파일을 지원합니다.

  1. 리포지토리의 루트에서 이름이 .github/copilot-instructions.md인 파일을 만듭니다.

    .github 디렉터리가 아직 없는 경우, 새로 만듭니다.

  2. 파일에 자연어 지침을 Markdown 형식으로 추가합니다.

    지침 사이의 공백은 무시되므로 지침을 새 줄에 각각 단일 단락으로 작성하거나 가독성을 위해 빈 줄로 구분할 수 있습니다.

GitHub.com에서 사용하기 위한 여러 유형의 리포지토리 사용자 지정 지침을 만들 수 있습니다.

  • 리포지토리 전체 사용자 지정 지침은 리포지토리의 컨텍스트에서 수행한 모든 요청에 적용됩니다.

    지원: Copilot Chat, Copilot 코딩 에이전트, Copilot 코드 검토.

    이러한 항목은 리포지토리의 .github 디렉터리에 있는 copilot-instructions.md 파일에 지정됩니다. 리포지토리 전체 사용자 지정 지침 만들기를 참조하세요.

  • 경로별 사용자 지정 지침은 지정된 경로와 일치하는 파일 컨텍스트에서 수행한 요청에 적용됩니다.

    지원: Copilot 코딩 에이전트Copilot 코드 검토.

    이러한 파일은 리포지토리의 .github/instructions 디렉터리 내에 있는 하나 이상의 NAME.instructions.md 파일에 지정됩니다. 경로별 사용자 지정 지침 만들기를 참조하세요.

    지정한 경로가 Copilot에서 작업 중인 파일과 일치하고 리포지토리 전체 사용자 지정 지침 파일도 있는 경우 두 파일의 지침이 모두 사용됩니다.

  • 에이전트 지침은 AI 에이전트에서 사용됩니다.

    지원: Copilot 코딩 에이전트.

    리포지토리 내의 어느 곳에나 저장된 하나 이상의 AGENTS.md 파일을 만들 수 있습니다. Copilot이 작동하는 경우, 디렉터리 트리에서 가장 가까운 AGENTS.md 파일이 우선적으로 적용됩니다.

    또는 리포지토리의 루트에 저장된 단일 CLAUDE.md 또는 GEMINI.md 파일을 사용할 수 있습니다.

리포지토리 전체 사용자 지정 지침 만들기

사용자 지정 지침 파일을 처음부터 만들 수 있습니다. 사용자 고유의 copilot-instructions.md 파일 작성을 참조하세요. 또는 Copilot 코딩 에이전트에 요청하여 생성하도록 요청할 수 있습니다.

Copilot 코딩 에이전트에 copilot-instructions.md 파일을 생성하도록 요청합니다.

참고 항목

Copilot 코딩 에이전트는 공개 미리 보기 버전이며 변경될 수 있습니다. 미리 보기 중 기능의 사용은 GitHub 시험판 사용 조건을(를) 따릅니다.

  1. Agents 페이지(github.com/copilot/agents)로 이동합니다.

    GitHub에 대한 모든 페이지의 검색 창 옆에 있는 단추를 클릭한 다음, 사이드바에서 Agents를 선택하여 이 페이지로 이동할 수도 있습니다.

  2. 프롬프트 필드의 드롭다운 메뉴를 사용하여 Copilot에서 사용자 지정 지침을 생성할 리포지토리를 선택합니다.

  3. 다음 프롬프트를 복사하여 필요한 경우 사용자 지정합니다.

    Markdown
    Your task is to "onboard" this repository to Copilot coding agent by adding a .github/copilot-instructions.md file in the repository that contains information describing how a coding agent seeing it for the first time can work most efficiently.
    
    You will do this task only one time per repository and doing a good job can SIGNIFICANTLY improve the quality of the agent's work, so take your time, think carefully, and search thoroughly before writing the instructions.
    
    <Goals>
    - Reduce the likelihood of a coding agent pull request getting rejected by the user due to
    generating code that fails the continuous integration build, fails a validation pipeline, or
    having misbehavior.
    - Minimize bash command and build failures.
    - Allow the agent to complete its task more quickly by minimizing the need for exploration using grep, find, str_replace_editor, and code search tools.
    </Goals>
    
    <Limitations>
    - Instructions must be no longer than 2 pages.
    - Instructions must not be task specific.
    </Limitations>
    
    <WhatToAdd>
    
    Add the following high level details about the codebase to reduce the amount of searching the agent has to do to understand the codebase each time:
    <HighLevelDetails>
    
    - A summary of what the repository does.
    - High level repository information, such as the size of the repo, the type of the project, the languages, frameworks, or target runtimes in use.
    </HighLevelDetails>
    
    Add information about how to build and validate changes so the agent does not need to search and find it each time.
    <BuildInstructions>
    
    - For each of bootstrap, build, test, run, lint, and any other scripted step, document the sequence of steps to take to run it successfully as well as the versions of any runtime or build tools used.
    - Each command should be validated by running it to ensure that it works correctly as well as any preconditions and postconditions.
    - Try cleaning the repo and environment and running commands in different orders and document errors and and misbehavior observed as well as any steps used to mitigate the problem.
    - Run the tests and document the order of steps required to run the tests.
    - Make a change to the codebase. Document any unexpected build issues as well as the workarounds.
    - Document environment setup steps that seem optional but that you have validated are actually required.
    - Document the time required for commands that failed due to timing out.
    - When you find a sequence of commands that work for a particular purpose, document them in detail.
    - Use language to indicate when something should always be done. For example: "always run npm install before building".
    - Record any validation steps from documentation.
    </BuildInstructions>
    
    List key facts about the layout and architecture of the codebase to help the agent find where to make changes with minimal searching.
    <ProjectLayout>
    
    - A description of the major architectural elements of the project, including the relative paths to the main project files, the location
    of configuration files for linting, compilation, testing, and preferences.
    - A description of the checks run prior to check in, including any GitHub workflows, continuous integration builds, or other validation pipelines.
    - Document the steps so that the agent can replicate these itself.
    - Any explicit validation steps that the agent can consider to have further confidence in its changes.
    - Dependencies that aren't obvious from the layout or file structure.
    - Finally, fill in any remaining space with detailed lists of the following, in order of priority: the list of files in the repo root, the
    contents of the README, the contents of any key source files, the list of files in the next level down of directories, giving priority to the more structurally important and snippets of code from key source files, such as the one containing the main method.
    </ProjectLayout>
    </WhatToAdd>
    
    <StepsToFollow>
    - Perform a comprehensive inventory of the codebase. Search for and view:
    - README.md, CONTRIBUTING.md, and all other documentation files.
    - Search the codebase for build steps and indications of workarounds like 'HACK', 'TODO', etc.
    - All scripts, particularly those pertaining to build and repo or environment setup.
    - All build and actions pipelines.
    - All project files.
    - All configuration and linting files.
    - For each file:
    - think: are the contents or the existence of the file information that the coding agent will need to implement, build, test, validate, or demo a code change?
    - If yes:
       - Document the command or information in detail.
       - Explicitly indicate which commands work and which do not and the order in which commands should be run.
       - Document any errors encountered as well as the steps taken to workaround them.
    - Document any other steps or information that the agent can use to reduce time spent exploring or trying and failing to run bash commands.
    - Finally, explicitly instruct the agent to trust the instructions and only perform a search if the information in the instructions is incomplete or found to be in error.
    </StepsToFollow>
       - Document any errors encountered as well as the steps taken to work-around them.
    
    
  4. Click Send now or press Return.

Copilot will start a new session, which will appear in the list below the prompt box. Copilot will create a draft pull request, write your custom instructions, push them to the branch, then add you as a reviewer when it has finished, triggering a notification.

Writing your own copilot-instructions.md file

  1. In the root of your repository, create a file named .github/copilot-instructions.md.

    Create the .github directory if it does not already exist.

  2. Add natural language instructions to the file, in Markdown format.

    Whitespace between instructions is ignored, so the instructions can be written as a single paragraph, each on a new line, or separated by blank lines for legibility.

The first time you create a pull request in a given repository with Copilot 코딩 에이전트, Copilot will leave a comment with a link to automatically generate custom instructions for the repository.

Creating path-specific custom instructions

참고 항목

Currently, on GitHub.com, path-specific custom instructions are only supported for Copilot 코딩 에이전트 and Copilot 코드 검토.

  1. Create the .github/instructions directory if it does not already exist.

  2. Create one or more NAME.instructions.md files, where NAME indicates the purpose of the instructions. The file name must end with .instructions.md.

  3. At the start of the file, create a frontmatter block containing the applyTo keyword. Use glob syntax to specify what files or directories the instructions apply to.

    For example:

    ---
    applyTo: "app/models/**/*.rb"
    ---
    

    You can specify multiple patterns by separating them with commas. For example, to apply the instructions to all TypeScript files in the repository, you could use the following frontmatter block:

    ---
    applyTo: "**/*.ts,**/*.tsx"
    ---
    

    To apply the instructions to all files, use applyTo: "**".

  4. Add your custom instructions in natural language, using Markdown format. Whitespace between instructions is ignored, so the instructions can be written as a single paragraph, each on a new line, or separated by blank lines for legibility.

Did you successfully add a custom instructions file to your repository?

Yes No

Writing effective repository custom instructions

The instructions you add to your custom instruction file(s) should be short, self-contained statements that provide Copilot with relevant information to help it work in this repository. Because the instructions are sent with every chat message, they should be broadly applicable to most requests you will make in the context of the repository.

The exact structure you utilize for your instructions file(s) will vary by project and need, but the following guidelines provide a good starting point:

  • Provide an overview of the project you're working on, including its purpose, goals, and any relevant background information.
  • Include the folder structure of the repository, including any important directories or files that are relevant to the project.
  • Specify the coding standards and conventions that should be followed, such as naming conventions, formatting rules, and best practices.
  • Include any specific tools, libraries, or frameworks that are used in the project, along with any relevant version numbers or configurations.

The following instructions file(s) is an example of these practices in action:

# Project Overview

This project is a web application that allows users to manage their tasks and to-do lists. It is built using React and Node.js, and uses MongoDB for data storage.

## Folder Structure

- `/src`: Contains the source code for the frontend.
- `/server`: Contains the source code for the Node.js backend.
- `/docs`: Contains documentation for the project, including API specifications and user guides.

## Libraries and Frameworks

- React and Tailwind CSS for the frontend.
- Node.js and Express for the backend.
- MongoDB for data storage.

## Coding Standards

- Use semicolons at the end of each statement.
- Use single quotes for strings.
- Use function based components in React.
- Use arrow functions for callbacks.

## UI guidelines

- A toggle is provided to switch between light and dark mode.
- Application should have a modern and clean design.

또한 리포지토리의 크기와 복잡성도 고려해야 합니다. 다음 유형의 지침은 소수의 참가자만 있는 소규모 리포지토리에서 작동할 수 있지만 크고 다양한 리포지토리의 경우 문제가 발생할 수 있습니다.

  • 응답 작성 시 외부 리소스 참조 요청
  • 특정 스타일로 답변하기 위한 지침
  • 항상 특정 수준의 세부 정보로 응답해 달라는 요청

예를 들어, 다음 지침은 의도한 결과를 얻지 못할 수 있습니다.

Always conform to the coding styles defined in styleguide.md in repo my-org/my-repo when generating code.

Use @terminal when answering questions about Git.

Answer all questions in the style of a friendly colleague, using informal language.

Answer all questions in less than 1000 characters, and words of no more than 12 characters.

사용 중인 리포지토리 사용자 지정 지침

파일의 지침은 파일을 저장하는 즉시 Copilot Chat에서 사용할 수 있습니다. 전체 지침 집합은 해당 리포지토리의 컨텍스트에서 Copilot에 제출하는 요청에 자동으로 추가됩니다. 예를 들어 Copilot Chat에 제출하는 프롬프트에 추가됩니다.

Copilot Chat의 몰입형 보기(github.com/copilot)에서 지침 파일이 포함된 리포지토리를 첨부 파일로 추가하여 리포지토리 사용자 지정 지침을 사용하는 대화를 시작할 수 있습니다.

리포지토리 사용자 지정 지침이 Copilot Chat에서 사용될 때마다 지침 파일은 생성된 응답에 대한 참조로 추가됩니다. 리포지토리 사용자 지정 지침이 사용되었는지 확인하려면 채팅 패널에서 채팅 응답 맨 위에 있는 참조 목록을 확장하고 .github/copilot-instructions.md 파일이 나열되어 있는지 확인합니다.

어두운 주황색 윤곽선으로 강조 표시된 'copilot-instructions.md' 파일을 보여 주는 확장된 참조 목록의 스크린샷

참조를 클릭하여 파일을 열 수 있습니다.

참고 항목

  • Multiple types of custom instructions can apply to a Copilot Chat conversation. Personal instructions take the highest priority, followed by repository instructions, with organization instructions prioritized last. However, all sets of relevant instructions are still combined and provided to Copilot Chat.
  • Whenever possible, you should avoid providing conflicting sets of instructions. If you are concerned about response quality, you can also choose to temporarily disable repository instructions. See GitHub Copilot에 대한 리포지토리 사용자 지정 지침 추가.

사용자 지정 지침은 채팅 보기 또는 인라인 채팅에 표시되지 않지만 채팅 보기에서 응답의 참조 목록을 확인하여 Copilot에서 이 지침이 사용되고 있는지 여부를 확인할 수 있습니다. 사용자 지정 지침이 모델에 전송된 프롬프트에 추가된 경우 .github/copilot-instructions.md 파일이 참조로 나열됩니다. 참조를 클릭하여 파일을 열 수 있습니다.

어두운 주황색 윤곽선으로 강조 표시된 'copilot-instructions.md' 파일을 보여 주는 확장된 참조 목록의 스크린샷

사용자 지정 지침은 채팅 보기 또는 인라인 채팅에 표시되지 않지만 채팅 보기에서 응답의 참조 목록을 확인하여 Copilot에서 이 지침이 사용되고 있는지 여부를 확인할 수 있습니다. 사용자 지정 지침이 모델에 전송된 프롬프트에 추가된 경우 .github/copilot-instructions.md 파일이 참조로 나열됩니다. 참조를 클릭하여 파일을 열 수 있습니다.

어두운 주황색 윤곽선으로 강조 표시된 'copilot-instructions.md' 파일을 보여 주는 참조 팝업의 스크린샷

사용자 지정 지침은 채팅 보기 또는 인라인 채팅에 표시되지 않지만 채팅 보기에서 응답의 참조 목록을 확인하여 Copilot에서 이 지침이 사용되고 있는지 여부를 확인할 수 있습니다. 사용자 지정 지침이 모델에 전송된 프롬프트에 추가된 경우 .github/copilot-instructions.md 파일이 참조로 나열됩니다. 참조를 클릭하여 파일을 열 수 있습니다.

사용자 지정 지침은 채팅 보기 또는 인라인 채팅에 표시되지 않지만 채팅 보기에서 응답의 참조 목록을 확인하여 Copilot에서 이 지침이 사용되고 있는지 여부를 확인할 수 있습니다. 사용자 지정 지침이 모델에 전송된 프롬프트에 추가된 경우 .github/copilot-instructions.md 파일이 참조로 나열됩니다. 참조를 클릭하여 파일을 열 수 있습니다.

리포지토리 사용자 지정 지침 사용 또는 사용 안 함

Copilot에서 리포지토리 기반 사용자 지정 지침을 사용할지 여부를 선택할 수 있습니다.

Copilot Chat에 대한 사용자 지정 지침 사용 또는 사용 안 함

사용자 지정 지침은 기본적으로 Copilot Chat를 사용하도록 설정되어 있지만 언제든지 사용하지 않도록 설정하거나 다시 사용하도록 설정할 수 있습니다. 이는 Copilot Chat를 사용하는 사용자 본인에게만 적용되며 다른 사용자에게는 영향을 주지 않습니다.

  1. GitHub.com에서 다음 중 하나를 수행합니다.

    • 사용자 지정 지침 파일이 있는 리포지토리로 이동한 후 보조 채팅 패널을 엽니다.
    • Copilot Chat(github.com/copilot)의 몰입형 보기로 이동한 후 사용자 지정 지침 파일이 포함된 리포지토리를 연결합니다.
  2. 채팅 패널의 위쪽 또는 몰입형 페이지의 오른쪽 위에 있는 단추를 클릭합니다.

  3. Disable custom instructions 또는 Enable custom instructions를 클릭합니다.

    참고 항목

    사용자 지정 지침 파일이 포함된 리포지토리의 컨텍스트에서만 이러한 옵션이 표시됩니다.

선택한 옵션은 사용자가 변경할 때까지 사용자 지정 지침 파일이 포함된 모든 리포지토리에 계속 적용됩니다.

Copilot 코드 검토의 사용자 지정 지침 사용 또는 사용 안 함

사용자 지정 지침은 기본적으로 Copilot 코드 검토를 사용하도록 설정되어 있지만 GitHub.com의 리포지토리 설정에서 사용하지 않도록 설정하거나 다시 사용하도록 설정할 수 있습니다. 이는 이 리포지토리에서 수행하는 모든 코드 검토에 대해 Copilot의 사용자 지정 지침 사용에 적용됩니다.

  1. GitHub에서 리포지토리의 기본 페이지로 이동합니다.

  2. 리포지토리 이름 아래에서 설정을 클릭합니다. "설정" 탭이 표시되지 않으면 드롭다운 메뉴를 선택한 다음 설정을 클릭합니다.

    탭을 보여 주는 리포지토리 헤더의 스크린샷. "설정" 탭이 진한 주황색 윤곽선으로 강조 표시됩니다.

  3. 사이드바의 "Code & automation" 섹션에서 Copilot 을 클릭한 다음, Code review를 클릭합니다.

  4. “끌어오기 요청을 검토할 때 사용자 지정 지침 사용” 옵션을 켜거나 끕니다.

리포지토리 사용자 지정 지침 사용 또는 사용 안 함

Copilot에서 리포지토리 기반 사용자 지정 지침을 사용할지 여부를 선택할 수 있습니다.

Copilot Chat에 대한 사용자 지정 지침 사용 또는 사용 안 함

사용자 지정 지침은 기본적으로 Copilot Chat를 사용하도록 설정되어 있지만 언제든지 사용하지 않도록 설정하거나 다시 사용하도록 설정할 수 있습니다. 이는 Copilot Chat를 사용하는 사용자 본인에게만 적용되며 다른 사용자에게는 영향을 주지 않습니다.

  1. 바로 가기 키 Command+,(Mac) / Ctrl+,(Linux/Windows)을 사용하여 설정 편집기를 엽니다.
  2. 검색 상자에 instruction file를 입력합니다.
  3. Code Generation: Use Instruction Files 아래 확인란을 선택하거나 선택 취소합니다.

Copilot 코드 검토의 사용자 지정 지침 사용 또는 사용 안 함

사용자 지정 지침은 기본적으로 Copilot 코드 검토를 사용하도록 설정되어 있지만 GitHub.com의 리포지토리 설정에서 사용하지 않도록 설정하거나 다시 사용하도록 설정할 수 있습니다. 이는 이 리포지토리에서 수행하는 모든 코드 검토에 대해 Copilot의 사용자 지정 지침 사용에 적용됩니다.

  1. GitHub에서 리포지토리의 기본 페이지로 이동합니다.

  2. 리포지토리 이름 아래에서 설정을 클릭합니다. "설정" 탭이 표시되지 않으면 드롭다운 메뉴를 선택한 다음 설정을 클릭합니다.

    탭을 보여 주는 리포지토리 헤더의 스크린샷. "설정" 탭이 진한 주황색 윤곽선으로 강조 표시됩니다.

  3. 사이드바의 "Code & automation" 섹션에서 Copilot 을 클릭한 다음, Code review를 클릭합니다.

  4. “끌어오기 요청을 검토할 때 사용자 지정 지침 사용” 옵션을 켜거나 끕니다.

리포지토리 사용자 지정 지침 사용 또는 사용 안 함

Copilot에서 리포지토리 기반 사용자 지정 지침을 사용할지 여부를 선택할 수 있습니다.

Copilot Chat에 대한 사용자 지정 지침 사용 또는 사용 안 함

사용자 지정 지침은 기본적으로 Copilot Chat를 사용하도록 설정되어 있지만 언제든지 사용하지 않도록 설정하거나 다시 사용하도록 설정할 수 있습니다. 이는 Copilot Chat를 사용하는 사용자 본인에게만 적용되며 다른 사용자에게는 영향을 주지 않습니다.

  1. Visual Studio 도구 모음의 [도구] 아래에서 옵션을 클릭합니다.

    데이터 변수 Visual Studio 메뉴 표시줄의 스크린샷입니다. "도구" 메뉴가 확장되고 "옵션" 항목이 주황색 윤곽선으로 강조 표시됩니다.

  2. "Options" 대화 상자에서 검색 창에 custom instructions를 입력한 다음, Copilot 을 클릭합니다.

  3. 사용자 지정 지침을 .github/copilot-instructions.md 파일에서 로드하고 요청에 추가할 수 있도록 설정 확인란을 선택하거나 선택 취소합니다.

    "Enable custom instructions" 옵션 확인란이 선택되어 있는 것을 보여 주는 Visual Studio 옵션 대화 상자의 스크린샷

Copilot 코드 검토의 사용자 지정 지침 사용 또는 사용 안 함

사용자 지정 지침은 기본적으로 Copilot 코드 검토를 사용하도록 설정되어 있지만 GitHub.com의 리포지토리 설정에서 사용하지 않도록 설정하거나 다시 사용하도록 설정할 수 있습니다. 이는 이 리포지토리에서 수행하는 모든 코드 검토에 대해 Copilot의 사용자 지정 지침 사용에 적용됩니다.

  1. GitHub에서 리포지토리의 기본 페이지로 이동합니다.

  2. 리포지토리 이름 아래에서 설정을 클릭합니다. "설정" 탭이 표시되지 않으면 드롭다운 메뉴를 선택한 다음 설정을 클릭합니다.

    탭을 보여 주는 리포지토리 헤더의 스크린샷. "설정" 탭이 진한 주황색 윤곽선으로 강조 표시됩니다.

  3. 사이드바의 "Code & automation" 섹션에서 Copilot 을 클릭한 다음, Code review를 클릭합니다.

  4. “끌어오기 요청을 검토할 때 사용자 지정 지침 사용” 옵션을 켜거나 끕니다.

프롬프트 파일 활성화 및 사용

참고 항목

프롬프트 파일을 사용하면 추가 컨텍스트와 함께 재사용 가능한 프롬프트 지침을 작성하고 공유할 수 있습니다. 작업 영역에 저장되어 있는 프롬프트 파일은 Copilot Chat의 기존 쓰기 프롬프트 형식과 유사한 Markdown 파일입니다(예 Rewrite #file:x.ts). 작업 영역에 여러 프롬프트 파일을 포함할 수 있습니다. 각 프롬프트는 서로 다른 용도로 프롬프트를 정의합니다.

프롬프트 파일 사용

프롬프트 파일을 사용하도록 설정하려면 작업 영역 설정을 구성합니다.

  1. Ctrl+Shift+P(Windows/Linux) / Command+Shift+P(Mac)를 눌러 명령 팔레트를 엽니다.
  2. "Open Workspace Settings (JSON)"을 입력하고 표시되는 옵션을 선택합니다.
  3. settings.json 파일에서 "chat.promptFiles": true를 추가하여 .github/prompts 폴더를 프롬프트 파일의 위치로 활성화합니다. 이 폴더가 아직 없는 경우에는 새로 만들어집니다.

프롬프트 파일 만들기

  1. Ctrl+Shift+P(Windows/Linux) / Command+Shift+P(Mac)를 눌러 명령 팔레트를 엽니다.

  2. "prompt"를 입력하고 Chat: Create Prompt를 선택합니다.

  3. .prompt.md 파일 이름 확장명을 제외한 프롬프트 파일의 이름을 입력합니다. 이름은 영숫자 문자와 공백을 포함할 수 있으며 파일에 포함할 프롬프트 정보의 용도를 설명해야 합니다.

  4. Markdown 서식을 사용하여 프롬프트 지침을 작성합니다.

    Markdown 링크(예: [index](../../web/index.ts)) 또는 #file:../../web/index.ts 구문을 사용하여 작업 영역의 다른 파일을 참조할 수 있습니다. 경로는 프롬프트 파일을 기준으로 상대적입니다. 다른 파일을 참조하면 API 사양 또는 제품 설명서와 같은 추가 컨텍스트를 제공할 수 있습니다.

프롬프트 파일 사용

  1. 보기 아래쪽에서 Attach context 아이콘()을 클릭합니다.

  2. 드롭다운 메뉴에서 Prompt... 를 클릭하고 사용할 프롬프트 파일을 선택합니다.

  3. 필요에 따라 프롬프트 파일을 비롯한 추가 파일을 첨부하여 더 많은 컨텍스트를 제공합니다.

  4. 필요에 따라 채팅 프롬프트 상자에 추가 정보를 입력합니다.

    이 작업을 수행할 필요가 있는지에 대한 여부는 사용 중인 프롬프트의 내용에 따라 달라집니다.

  5. 채팅 프롬프트를 제출합니다.

프롬프트 파일에 대한 자세한 내용은 Visual Studio Code 설명서에 있는 VS Code의 GitHub Copilot에 대한 사용자 지정 지침을 참조하세요.