Learning center

Where do I put custom instructions for Copilot code review?

Put a rule that applies throughout the repository in .github/copilot-instructions.md. For a rule that applies to particular files, use a Markdown instruction file under .github/instructions/ and give it an applyTo pattern.

A rule for a public client library#

Suppose the team supports two versions of a client. Put the compatibility rule beside the other path-specific instructions and match the public client source. Ask the reviewer to identify callers affected by a change to a public method signature. An unrelated change to the website should have no reason to trigger that instruction.

Check the path as committed, including the leading dot in .github. Then check the repository's Copilot code review settings. A successful conversation with Copilot in your editor only tells you about that editor session. GitHub’s repository instruction setup

One month of free code review.

New organizations get one calendar month of hosted code review for private and public GitHub repositories. No card or cloud connection required. Eligibility and fair-use terms.

Start free with GitHub

Related reading