GitHub Copilot (.github/copilot-instructions.md)
GitHub Copilot Chat reads .github/copilot-instructions.md and prepends it to every chat. Aggressively truncated by Copilot’s context budget — keep it under 200 lines and front-load the most important rules.
File path
.github/copilot-instructions.mdLength cap (recommended)
~200 lines
Frontmatter
No
File globs
No
Format quirks
- Strict context budget — content past ~200 lines is often dropped
- Front-load critical conventions; defer examples
- No frontmatter, no globs — plain markdown
- VS Code, Visual Studio, and copilot.com all honor this file
Browse stack examples
Every stack page in the library has a one-click copy button for GitHub Copilot (.github/copilot-instructions.md). Open any of these and pick "GitHub Copilot (.github/copilot-instructions.md)" from the format dropdown.
Next.js (App Router) + TypeScript
Next.js App Router (TypeScript, Server Components)
Next.js + Supabase (Auth, Postgres, RLS)
Next.js + Prisma + Postgres
React 19 + TypeScript (Vite)
React Native + Expo (managed workflow)
Python + FastAPI + SQLAlchemy + Alembic
Python + Django + DRF
Python + pandas + numpy + scikit-learn (Jupyter)
PyTorch + Hugging Face + W&B
Node.js + Express + TypeScript
Turborepo + pnpm + TypeScript
Official docs: https://docs.github.com/en/copilot/customizing-copilot/adding-custom-instructions-for-github-copilot