GitHub Copilot이 응답하는 방식을 맞춤 설정하는 방법
Source: Dev.to
GitHub Copilot을 자주 사용하고 계신가요? 매 채팅마다 동일하거나 비슷한 지시를 다시 입력하는 것은 번거로울 수 있습니다. 맞춤 지시(custom instructions)를 사용하면 프로젝트별 정책, 명명 규칙, 주석 표준 등 재사용 가능한 가이드를 저장할 수 있어 Copilot이 이를 자동으로 적용합니다.
GitHub Copilot이 프롬프트에 응답하는 방식을 맞춤 설정하는 주요 방법은 두 가지입니다:
- Custom instructions
- Prompt files (not covered in this article)
Source:
Custom instructions
Custom instructions guide GitHub Copilot’s behaviour. At the time of writing, the following scopes are available:
- Personal custom instructions
- Repository‑wide custom instructions
- Path‑specific custom instructions
- Organization custom instructions (Copilot Enterprise)
- Agent instructions (used by AI Agents)
Personal custom instructions
Personal instructions are set in the Copilot chat UI on the web and affect how Copilot interprets your prompts.

Example workflow
-
Prompt Copilot, e.g.
Create a JavaScript function that converts numbers into Roman numerals. -
Observe the output.
-
Open Profile → Personal instructions in the Copilot settings and add guidance such as:
Always do the following when writing functions: - Add descriptive comments - Add input validation - Use early returns for error conditions - Use meaningful variable names - Include at least one example usage in comments -
Re‑run the same prompt and compare the results.
Read more about personal custom instructions on the GitHub Docs.
Repository‑wide custom instructions
Repository‑level instructions ensure every contributor gets the same guidance—useful for shared frameworks, coding standards, or comment conventions.
-
Create a file named
copilot-instructions.mdinside the.githubdirectory of the repository. -
Populate it with natural‑language guidance written in Markdown, for example:
# Project Overview This project [describe your project]. ## Folder Structure [list the folder structure] ## Libraries and Frameworks [list any libraries it uses] ## Coding Standards [list your coding standards] ## UI Guidelines [list your UI guidelines]By default, repository instructions are enabled.

Generating the file with Copilot
Via the Copilot Agents UI
-
Visit the GitHub Copilot Agents page and select your repository.
-
Prompt the agent with a request such as:
Your task is to add a .github/copilot-instructions.md file to the repository. [outline the goals you want GitHub Copilot to achieve] [add limitations such as length or task‑specific constraints] Add high‑level details about the codebase: - A summary of what the repository does. - Repository size, primary languages, frameworks, target runtimes. Include build and validation instructions: [insert build steps] List key architectural facts: [describe project layout and architecture] [describe the steps Copilot should take] -
Review the generated
copilot-instructions.mdand adjust as needed.
Via VS Code
- Open the target repository.
- In the Copilot chat panel, click the Settings (gear) icon and choose Generate instructions.
- Inspect the generated
.github/copilot-instructions.mdfile and commit it.
Read more about repository‑wide custom instructions on the GitHub Docs.
Path‑specific custom instructions
Path‑specific instructions apply only to selected files or patterns, allowing fine‑grained control. Currently supported in VS Code and JetBrains
맞춤 지시사항
맞춤 지시사항은 GitHub Copilot의 동작을 안내합니다. 현재 작성 시점에서 사용할 수 있는 범위는 다음과 같습니다:
- 개인 맞춤 지시사항
- 저장소 전체 맞춤 지시사항
- 경로별 맞춤 지시사항
- 조직 맞춤 지시사항 (Copilot Enterprise)
- 에이전트 지시사항 (AI 에이전트에서 사용)
개인 맞춤 지시사항
개인 지시사항은 웹상의 Copilot 채팅 UI에서 설정되며, Copilot이 프롬프트를 해석하는 방식을 영향을 줍니다.

예시 워크플로우
-
GitHub Copilot 웹 페이지를 엽니다.
-
Copilot에 프롬프트를 입력합니다. 예:
Create a JavaScript function that converts numbers into Roman numerals. -
출력 결과를 확인합니다.
-
Copilot 설정에서 Profile → Personal instructions을 열고 다음과 같은 지시를 추가합니다:
Always do the following when writing functions: - Add descriptive comments - Add input validation - Use early returns for error conditions - Use meaningful variable names - Include at least one example usage in comments -
동일한 프롬프트를 다시 실행하고 결과를 비교합니다.
GitHub Docs에서 개인 맞춤 지시사항에 대해 자세히 읽어보기.
저장소 전체 맞춤 지시사항
저장소 수준의 지시사항은 모든 기여자가 동일한 안내를 받도록 보장합니다—공유 프레임워크, 코딩 표준, 주석 규칙 등에 유용합니다.
-
저장소의
.github디렉터리 안에copilot-instructions.md파일을 생성합니다. -
Markdown 형식으로 자연어 안내를 작성합니다. 예시:
# Project Overview This project [describe your project]. ## Folder Structure [list the folder structure] ## Libraries and Frameworks [list any libraries it uses] ## Coding Standards [list your coding standards] ## UI Guidelines [list your UI guidelines]기본적으로 저장소 지시사항은 활성화됩니다.

Copilot으로 파일 생성하기
Copilot Agents UI 사용
-
GitHub Copilot Agents 페이지를 방문하고 저장소를 선택합니다.
-
다음과 같은 요청을 에이전트에 전달합니다:
Your task is to add a .github/copilot-instructions.md file to the repository. [outline the goals you want GitHub Copilot to achieve] [add limitations such as length or task‑specific constraints] Add high‑level details about the codebase: - A summary of what the repository does. - Repository size, primary languages, frameworks, target runtimes. Include build and validation instructions: [insert build steps] List key architectural facts: [describe project layout and architecture] [describe the steps Copilot should take] -
생성된
copilot-instructions.md를 검토하고 필요에 따라 조정합니다.
VS Code 사용
- 대상 저장소를 엽니다.
- Copilot 채팅 패널에서 Settings(톱니바퀴) 아이콘을 클릭하고 Generate instructions를 선택합니다.
- 생성된
.github/copilot-instructions.md파일을 확인하고 커밋합니다.
GitHub Docs에서 저장소 전체 맞춤 지시사항에 대해 자세히 읽어보기.
경로별 맞춤 지시사항
경로별 지시사항은 선택된 파일이나 패턴에만 적용되어 세밀한 제어가 가능합니다. 현재 VS Code와 JetBrains에서 지원됩니다.
IDEs.
-
저장소 내부에
.github/instructions폴더를 생성합니다. -
설명이 포함된 이름을 가진 Markdown 파일(예:
.instructions.md)을 추가합니다. -
첫 번째 줄에
applyTo키를 사용해 대상 파일을 지정합니다. 예:applyTo: "app/models/**/*.rb"여러 패턴을 쉼표로 구분할 수 있습니다:
applyTo: "**/*.ts,**/*.tsx"모든 파일에 적용하려면:
applyTo: "**" -
applyTo줄 아래에 해당 파일들을 위한 안내 내용을 일반 Markdown 형식으로 작성합니다.
필요에 따라 다양한 코드베이스 하위 집합을 대상으로 하는 경로‑별 지시 파일을 원하는 만큼 만들 수 있습니다.