github / github/copilot-cli

Support `@include` / `extends` in instruction files to reference external URLs or repos

Offen
#2,537 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
area:configuration
Vorherrschende Sprache
Shell
Sterne
11.2k
Forks
1.9k
Ø Merge
14 Std. 16 Min.
Gemergte PRs (30 T.)
6

Beschreibung

### Describe the feature or problem you'd like to solve

Instruction files are currently static and self-contained. There is no way to share common conventions across repos or teams without duplicating files — either manually copying them into every repo or requiring each contributor to set up `~/.copilot/instructions/` locally.

### Proposed solution

Introduce an `extends` or `@include` directive in instruction files (similar to Renovate's extends or ESLint's extends) that allows referencing external instruction files by URL or GitHub path:

```yaml
---
extends:
- "github:mu88/dotfiles/.copilot/instructions/dotnet.instructions.md"
- "https://raw.githubusercontent.com/org/shared/.github/instructions/security.instructions.md"
applyTo: "**/*.cs"
---
```

### Example prompts or workflows

1. A maintainer publishes shared .NET conventions in a dotfiles repo — every project references them with one line, zero duplication.
2. A new contributor clones a repo and immediately gets all team conventions — no local setup required.
3. An org updates shared security guidelines in one place; all repos pick up the change automatically.

### Additional context

`COPILOT_CUSTOM_INSTRUCTIONS_DIRS` already allows pointing to external directories, but requires manual per-machine setup. A declarative `extends` in the instruction file itself would be zero-config for contributors and composable by design.

Note: Organization-level instructions already exist for GitHub organizations. This request addresses the gap for personal account repositories and zero-config contributor onboarding.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginnen Sie mit der Überprüfung der bestehenden Verarbeitung von Instruktionsdateien und des im Issue erwähnten Verhaltens von COPILOT_CUSTOM_INSTRUCTIONS_DIRS. Legen Sie fest, wie die aufgeführten GitHub-Pfade und URLs aufgelöst werden, und überprüfen Sie, dass referenzierte Instruktionen zusammen mit lokalen Dateien angewendet werden, einschließlich der hier gezeigten Beispiele für YAML front matter.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
github, markdown, yaml
Bereich
developer-experience, tooling
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.