---
title: "GitHub Copilot custom instructions: 경로 및 형식 · DotsAgent"
description: ".github/copilot-instructions.md의 위치와 형식, frontmatter, 전역 및 중첩 파일의 병합 방식, 이 파일을 읽는 도구를 확인하세요. 2026-10-01에 확인했습니다."
url: https://dotsagent.io/ko/instructions/files/github-copilot-instructions
---

.github/copilot-instructions.md

# GitHub Copilot custom instructions: 파일 위치와 도구별 읽기 방식

GitHub Copilot은 저장소 전체에 적용되는 .github/copilot-instructions.md 파일 하나와 경로별 .instructions.md 파일을 읽습니다. AGENTS.md도 따르며, 대안으로 루트에 CLAUDE.md 또는 GEMINI.md 파일 하나를 둘 수 있습니다.

## 파일 위치

- .github/copilot-instructions.md: 저장소 전체에 적용됩니다.
- .github/instructions/**/NAME.instructions.md: applyTo와 일치하는 파일에 적용됩니다.
- 저장소 내 어디에나 둘 수 있는 AGENTS.md 파일. 가장 가까운 파일이 우선합니다.
- 대안으로 사용할 수 있는 루트의 CLAUDE.md 또는 GEMINI.md 파일 하나.

## 형식

Markdown을 사용합니다. 지침 사이의 공백은 무시됩니다. .instructions.md 파일에만 프런트매터를 사용할 수 있습니다. applyTo에는 쉼표로 구분한 glob 패턴을, excludeAgent에는 "code-review" 또는 "cloud-agent"를 지정합니다. 코드 리뷰의 4,000자 제한은 2026-06-12에 폐지되었으며, GitHub는 파일당 약 1,000줄 이하를 권장합니다.

Frontmatter 키: `applyTo``excludeAgent`

`.github/copilot-instructions.md`

```
# Copilot instructions

This is a Rails app with a React front end in app/javascript/.

## Build and test

- Install: `bundle install && yarn install`
- Test: `bin/rails test`
- Lint: `bin/rubocop`

## Conventions

- Put business logic in app/services/, not in controllers.
- Every migration must be reversible.
- Never commit credentials or edit config/master.key.
```

## 우선순위 및 병합

개인 지침이 먼저 적용되고, 그다음 저장소 지침, 조직 지침이 적용됩니다. 관련된 모든 지침 세트가 계속 전달됩니다. 경로별 파일과 저장소 전체 파일이 모두 일치하면 Copilot은 두 파일을 모두 사용합니다. 코드 리뷰는 pull request의 head 브랜치에서 지침을 읽습니다.

## 팁

- github.com에서는 경로별 .instructions.md 파일이 Copilot cloud agent와 Copilot code review에만 적용됩니다.
- cloud agent는 파일을 사용하고 코드 리뷰에서는 제외하려면 excludeAgent: "code-review"를 추가하세요.
- Copilot cloud agent가 copilot-instructions.md 초안을 작성할 수 있습니다. 지침은 두 페이지 정도로 유지하고 특정 작업에만 맞추지 마세요.

양식 하나로 다섯 가지 도구에 사용할 AGENTS.md와 규칙 파일을 생성하세요. [AGENTS.md 생성기 열기 →](https://dotsagent.io/ko/instructions)

## 기타 지침 파일

[AGENTS.md](https://dotsagent.io/ko/instructions/files/agents-md)

[CLAUDE.md](https://dotsagent.io/ko/instructions/files/claude-md)

[GEMINI.md](https://dotsagent.io/ko/instructions/files/gemini-md)

[.cursor/rules/*.mdc](https://dotsagent.io/ko/instructions/files/cursor-rules)

[.devin/rules/*.md](https://dotsagent.io/ko/instructions/files/windsurf-rules)

[.clinerules/](https://dotsagent.io/ko/instructions/files/cline-rules)

[~/.openclaw/workspace/AGENTS.md](https://dotsagent.io/ko/instructions/files/openclaw-workspace)

## 출처

1. [docs.github.com](https://docs.github.com/en/copilot/how-tos/configure-custom-instructions/add-repository-instructions)/en/copilot/how-tos/configure-custom-instructions/add-repository-instr
2. [docs.github.com](https://docs.github.com/en/copilot/reference/custom-instructions-support)/en/copilot/reference/custom-instructions-support
3. [docs.github.com](https://docs.github.com/en/copilot/tutorials/customize-code-review)/en/copilot/tutorials/customize-code-review
4. [github.blog](https://github.blog/changelog/2026-06-12-copilot-code-review-new-configurations-and-controls/)/changelog/2026-06-12-copilot-code-review-new-configurations-and-contr

AI 에이전트를 만드는 개발자를 위한 독립적인 참고 자료입니다. 여기에 언급된 어떤 업체와도 제휴 관계가 없습니다.

© 2026 DotsAgent · 정보 확인일: 2026년 10월 1일
