Coding with AI tools

Stage 2 · Lesson 2 of 6

Writing .github/copilot-instructions.md

Setup and project context

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

Keep handy

  • Custom instructions, .instructions.md files and prompt files, as VS Code implements them

  • The shared format your tool can read, with examples of what to put in it

Also worth your time

Mark this stage as not done?