Stage 2 · Lesson 2 of 6
Writing .github/copilot-instructions.md
Copilot reads repository-wide from .github/copilot-instructions.md, a file in the .github folder at the root of the . It is used by chat and agents in VS Code, and by Copilot on GitHub, such as the .
VS Code also reads , and even CLAUDE.md, as project instructions. In VS Code chat, /init drafts workspace instructions from your codebase; edit the result hard, keeping build and test commands, conventions that differ from the defaults and known traps.
For rules that apply only to some files, use .instructions.md files in .github/instructions/ with an applyTo pattern. Commit the files so everyone gets the same guidance.
Common trapfilling the file with general advice like "write clean code", which uses context without changing anything.
A question to check yourself, an AI practice session and 3 cheat sheet entries come when you add the roadmap to your account. Add it
Resources for this stage
Start with
- GitHub repoFreeGitHub Skills: Getting Started with GitHub Copilot
GitHub · Beginner
A free hands-on exercise in a browser Codespace, done in under an hour