--- # GitHub Copilot Customisation
DE Deutsch EN English
Dieses Projekt nutzt GitHub Copilot Agents und Instructions, um eine strukturierte und produktive KI-gestützte Entwicklung zu ermöglichen. This project uses GitHub Copilot Agents and Instructions to enable a structured and productive AI-assisted development workflow.
--- ## Übersicht / Overview | Typ / Type | Pfad / Path | Beschreibung / Description | |---|---|---| | **Global Instructions** | `.github/copilot-instructions.md` | Projektweite Basisregeln für alle Copilot-Interaktionen. / Project-wide baseline rules for all Copilot interactions. | | **Instructions** | `.github/instructions/*.instructions.md` | Dateimuster-spezifische Coding-Richtlinien. / File-pattern-scoped coding guidelines. | | **Agents** | `.github/agents/*.agent.md` | Spezialisierte KI-Personas für verschiedene Phasen. / Specialised AI personas for different development phases. | --- ## `copilot-instructions.md` — Globale Basisregeln / Global Baseline Rules **Pfad / Path:** `.github/copilot-instructions.md`
DE Was ist das? EN What is it?
Diese Datei wird bei jeder Copilot-Interaktion automatisch geladen. Sie definiert den Tech-Stack, kritische Regeln (async APIs, Server Components, Supabase), und Code-Stil-Konventionen für das gesamte Projekt. This file is automatically loaded on every Copilot interaction. It defines the tech stack, critical rules (async APIs, Server Components, Supabase), and code style conventions for the whole project.
DE Wann bearbeiten? EN When to edit?
- Tech-Stack ändert sich (z. B. neue Bibliothek wird Standardmuster)
- Neue projektweite Regeln sollen für alle Copilot-Interaktionen gelten
- Team-Konventionen ändern sich
⚠️ Kurz halten — diese Datei wird immer in den Kontext geladen.
- Tech stack changes (e.g. a new library becomes a standard pattern)
- New project-wide rules need to apply to all Copilot interactions
- Team conventions change
⚠️ Keep it short — this file is always loaded into context.
--- ## Instructions — Datei-spezifische Richtlinien / File-Scoped Guidelines
DE Was sind Instructions? EN What are Instructions?
Instructions sind Richtlinien, die automatisch geladen werden, wenn Copilot an Dateien arbeitet, die dem applyTo-Glob-Muster entsprechen. Sie ergänzen die globalen Regeln mit datei-spezifischen Details. Instructions are guidelines that are automatically loaded when Copilot works on files matching the applyTo glob pattern. They extend the global rules with file-type-specific details.
### Vorhandene Instructions / Available Instructions | Datei / File | `applyTo` | Zweck / Purpose | |---|---|---| | `nextjs.instructions.md` | `**/*.tsx, **/*.ts, **/*.jsx, **/*.js` | Next.js 16 App Router Patterns, async APIs, Server/Client Components | | `tailwind.instructions.md` | `**/*.tsx, **/*.jsx, **/*.css` | Tailwind CSS v4 Utility-First Patterns, Responsive Design | | `typescript.instructions.md` | `**/*.ts, **/*.tsx` | TypeScript Strict Mode, Naming Conventions, Type Safety | | `supabase.instructions.md` | `**/supabase/**, **/*supabase*` | Supabase Client Setup, RLS, Migrations, Schema Awareness | ### Eigene Instructions erstellen / Creating Custom Instructions
DE Anleitung EN Guide
Erstelle eine .instructions.md-Datei in .github/instructions/ mit YAML-Frontmatter. Das applyTo-Feld akzeptiert Glob-Muster und bestimmt, für welche Dateien die Regeln gelten. Create a .instructions.md file in .github/instructions/ with YAML frontmatter. The applyTo field accepts glob patterns and determines which files the rules apply to.
```yaml --- applyTo: "**/*.tsx" --- # Your instructions here ``` --- ## Agents — KI-Personas / AI Personas
DE Was sind Agents? EN What are Agents?
Agents sind spezialisierte KI-Personas. Du rufst sie in VS Code über das Chat-Panel mit @agent-name auf. Jeder Agent hat eine klar definierte Rolle, einen Workflow und Regeln. Agents are specialised AI personas. You invoke them in VS Code via the Chat panel using @agent-name. Each agent has a clearly defined role, workflow, and rules.
--- ### `@planner` — Planer
DE EN
Zweck: Technische Planung und Anforderungsanalyse vor dem Coding. Purpose: Technical planning and requirements analysis before coding.
Wann verwenden:
— Vor dem Start eines neuen Features
— Wenn die Anforderungen unklar sind
— Vor Refactoring oder Migrations-Aufgaben
When to use:
— Before starting a new feature
— When requirements are unclear
— Before refactoring or migration tasks
Was er tut:
✔ Codebase erkunden und Kontext sammeln
✔ Betroffene Dateien und Module identifizieren
✔ Nummerierten Implementierungsplan erstellen
Schreibt keinen Code
What it does:
✔ Explore codebase and gather context
✔ Identify affected files and modules
✔ Create a numbered implementation plan
Does not write code
Verwendung: @planner Füge eine Authentifizierungsseite hinzu Usage: @planner Add an authentication page
--- ### `@developer` — Entwickler
DE EN
Zweck: Strukturierte Feature-Implementierung mit Qualitätsprüfungen. Purpose: Structured feature implementation with quality checks.
Wann verwenden:
— Nach der Planung mit @planner
— Zur Implementierung von Features, Seiten, API-Routen
— Für Datenbankänderungen und Migrationen
When to use:
— After planning with @planner
— To implement features, pages, API routes
— For database changes and migrations
Vierphasiger Prozess:
1. Vorbereitung — Plan lesen, Code verstehen
2. Implementierung — Schrittweise, Fehler sofort beheben
3. Verifikation (PFLICHT)typechecklintbuild → lokal testen
4. Dokumentation — Handbook aktualisieren
Four-phase process:
1. Preparation — Read plan, understand code
2. Implementation — Step by step, fix errors immediately
3. Verification (MANDATORY)typechecklintbuild → test locally
4. Documentation — Update handbook
Verwendung: @developer Implementiere diesen Plan: [Plan einfügen] Usage: @developer Implement this plan: [paste plan]
--- ### `@reviewer` — Code-Reviewer
DE EN
Zweck: Code-Review und Qualitätssicherung vor dem PR. Purpose: Code review and quality assurance before a PR.
Wann verwenden:
— Bevor ein PR erstellt wird
— Nach einer Implementierung zur Qualitätsprüfung
— Zur Sicherheits- und Performance-Analyse
When to use:
— Before creating a PR
— After implementation for quality check
— For security and performance audits
Was er tut:
✔ Strukturierte Checkliste (Qualität, Next.js 16, Supabase-Sicherheit, Styling)
✔ Alle Checks ausführen (typecheck, lint, build)
✔ Review-Bericht mit Status (✅ / ⚠️ / ❌)
What it does:
✔ Structured checklist (quality, Next.js 16, Supabase security, styling)
✔ Run all checks (typecheck, lint, build)
✔ Review report with status (✅ / ⚠️ / ❌)
Verwendung: @reviewer Überprüfe die Änderungen in src/app/dashboard/ Usage: @reviewer Review the changes in src/app/dashboard/
--- ## Empfohlener Workflow / Recommended Workflow
DE Schritt EN Step
1. @planner — Aufgabe analysieren und Plan erstellen lassen 1. @planner — Let the Planner analyse the task and create a plan
2. @developer — Plan an den Developer übergeben zur Implementierung 2. @developer — Hand the plan to the Developer for implementation
3. @reviewer — Code prüfen lassen, bevor du einen PR erstellst 3. @reviewer — Let the Reviewer check the code before creating a PR
--- ## Eigene Agents erstellen / Creating Custom Agents
DE Anleitung EN Guide
Erstelle eine .agent.md-Datei in .github/agents/ mit YAML-Frontmatter. Definiere Rolle, Workflow und Regeln. Create a .agent.md file in .github/agents/ with YAML frontmatter. Define role, workflow, and rules.
```yaml --- name: MyAgent description: > Description of what this agent does. --- # Agent: MyAgent ## Role ... ## Workflow ... ``` --- ## Wenn ein Agent schlecht antwortet / When an Agent Responds Poorly
DE Problem & Lösung EN Problem & Solution
Agent ignoriert Regeln aus der Instructions-Datei
→ Prüfe das applyTo-Glob-Muster — stimmt es mit der Datei überein, die du bearbeitest? Teste mit: **/*.ts statt src/**/*.ts
Agent ignores rules from an Instructions file
→ Check the applyTo glob pattern — does it match the file you are editing? Try broader patterns: **/*.ts instead of src/**/*.ts
Agent befolgt den Workflow nicht (z. B. überspringt typecheck)
→ Öffne die .agent.md-Datei und mache die Anweisung strikter. Ersetze "sollte" durch "muss". Füge am Ende eine Zusammenfassung hinzu: "Bevor du antwortest, liste alle abgeschlossenen Schritte auf."
Agent does not follow the workflow (e.g. skips typecheck)
→ Open the .agent.md file and make the instruction stricter. Replace "should" with "must". Add a reminder at the end: "Before responding, list all completed steps."
Agent schreibt schlechten Next.js-Code (z. B. falsche API-Nutzung)
→ Füge ein konkretes Beispiel in die nextjs.instructions.md ein. Copilot folgt Beispielen besser als abstrakten Regeln.
Agent writes bad Next.js code (e.g. wrong API usage)
→ Add a concrete code example to nextjs.instructions.md. Copilot follows examples better than abstract rules.
Agent "vergisst" den Kontext nach langen Gesprächen
→ Starte ein neues Chat-Fenster. Langer Kontext verdrängt Instructions. Übergib den Plan explizit: "Hier ist der Plan: [Plan]. Bitte implementiere Schritt 3."
Agent "forgets" context after long conversations
→ Start a new chat window. Long context pushes out instructions. Pass the plan explicitly: "Here is the plan: [plan]. Please implement step 3."
Agent antwortet auf Englisch statt Deutsch (oder umgekehrt)
→ Füge in copilot-instructions.md eine Sprachanweisung hinzu: "Antworte immer auf Deutsch." — oder sprich den Agent in der gewünschten Sprache an.
Agent responds in German instead of English (or vice versa)
→ Add a language instruction to copilot-instructions.md: "Always respond in English." — or address the agent in your preferred language.
Agent überschreitet den Plan / macht ungebetene Änderungen
→ Füge in der .agent.md unter "Rules" hinzu: "Ändere nur Dateien, die explizit im Plan genannt sind. Keine ungebetenen Refactors."
Agent exceeds the plan / makes unrequested changes
→ Add to the .agent.md under "Rules": "Only modify files explicitly listed in the plan. No unrequested refactoring."
--- ## Referenzen / References - [GitHub Copilot Customisation Docs](https://docs.github.com/en/copilot/customizing-copilot) - [awesome-copilot](https://github.com/github/awesome-copilot) — Beispiele und Best Practices / Examples and best practices