---
title: "GitHub Copilot custom instructions: Pfade und Format · DotsAgent"
description: "Wo .github/copilot-instructions.md liegt, welches Format und Frontmatter es verwendet, wie globale und verschachtelte Dateien zusammengeführt werden und welche Tools es lesen. Geprüft am 2026-10-01."
url: https://dotsagent.io/de/instructions/files/github-copilot-instructions
---

.github/copilot-instructions.md

# GitHub Copilot custom instructions: Speicherort und Verwendung durch Tools

GitHub Copilot liest eine repositoryweite Datei, .github/copilot-instructions.md, sowie pfadspezifische .instructions.md-Dateien. Außerdem berücksichtigt es AGENTS.md oder alternativ eine einzelne CLAUDE.md- oder GEMINI.md-Datei im Repository-Stammverzeichnis.

## Speicherort

- .github/copilot-instructions.md, gilt für das gesamte Repository.
- .github/instructions/**/NAME.instructions.md, gilt für die Dateien, auf die applyTo zutrifft.
- AGENTS.md an beliebiger Stelle im Repository; die nächstgelegene Datei hat Vorrang.
- Eine einzelne CLAUDE.md- oder GEMINI.md-Datei im Repository-Stammverzeichnis als Alternative.

## Format

Markdown; Leerraum zwischen Anweisungen wird ignoriert. Nur .instructions.md-Dateien verwenden Frontmatter: applyTo enthält durch Kommas getrennte Globs, und excludeAgent akzeptiert "code-review" oder "cloud-agent". Für Code-Reviews wurde die Grenze von 4,000 Zeichen am 2026-06-12 aufgehoben. GitHub empfiehlt höchstens etwa 1,000 Zeilen pro Datei.

Frontmatter-Schlüssel: `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.
```

## Priorität und Zusammenführung

Persönliche Anweisungen kommen zuerst, danach folgen Repository- und Organisationsanweisungen. Alle relevanten Anweisungssätze werden weiterhin übermittelt. Wenn sowohl eine pfadspezifische als auch die repositoryweite Datei zutrifft, verwendet Copilot beide. Beim Code-Review werden die Anweisungen aus dem Head-Branch des Pull Requests gelesen.

## Tipps

- Auf github.com funktionieren pfadspezifische .instructions.md-Dateien nur mit Copilot cloud agent und Copilot code review.
- Fügen Sie excludeAgent: "code-review" hinzu, damit eine Datei bei Reviews nicht berücksichtigt wird, der Cloud-Agent sie aber weiterhin verwendet.
- Copilot cloud agent kann einen Entwurf für copilot-instructions.md erstellen. Beschränken Sie die Datei auf etwa zwei Seiten und formulieren Sie sie unabhängig von einzelnen Aufgaben.

Erstellen Sie aus einem Formular eine AGENTS.md und passende Regeldateien für fünf Tools. [AGENTS.md-Generator öffnen →](https://dotsagent.io/de/instructions)

## Weitere Instruktionsdateien

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

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

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

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

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

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

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

## Quellen

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

Unabhängige Referenz für alle, die KI-Agenten entwickeln. Wir sind mit keinem der hier genannten Anbieter verbunden.

© 2026 DotsAgent · Fakten geprüft am 1. Oktober 2026
