Does Copilot code review use the PR branch’s instructions?
Yes. Copilot code review reads custom instructions, agent instructions, and agent skills from the PR’s head branch, so you can test instruction or skill changes in the same PR before merging.
Other people are working this out at the same time: See what people are building
Does Copilot code review use the branch’s own instructions and agent skills when I test changes in the PR
Yes. Copilot code review reads repository custom instructions, agent instructions, and agent skills from the pull request’s head branch, not the base branch. That means changes you make to instruction files or skills in the PR are the ones Copilot uses during review.
That detail matters when you are testing a change to .github/copilot-instructions.md, a path-specific *.instructions.md file, AGENTS.md, or a skill under .github/skills. If the PR updates those files, Copilot can review the branch with the new rules in place before they merge. GitHub documents that same behavior with the example of merging my-feature-branch into main.
The part people get wrong is assuming Copilot reviews the base branch’s guidance and only the code diff from the PR. GitHub says the opposite for pull request review: Copilot reads the head branch’s instructions and skills. If the PR changes both code and the review guidance, the review reflects the branch state that exists in that PR.
The inconvenient part is that this behavior can hide mistakes in instruction changes if you expect a comparison against the old rules. A PR that edits the instructions and the code at the same time can make Copilot look “correct” for the new branch while still being inconsistent with the repository’s previous guidance. To check that case, review the instruction files themselves as part of the PR, not just the code output.
Copilot can also use repository-level agent skills and MCP servers when they are relevant to the review. GitHub says it is more likely to use that context when the repository or pull request gives clear signals, such as review-focused skill directory names, instructions that reference MCP context, or PR descriptions that mention identifiers tied to configured MCP servers.
That does not mean every review will use every skill you added. GitHub’s documentation says Copilot can use relevant skills, but it is not deterministic, and it is not guaranteed to spot every problem. If your branch adds a new skill, the safest check is to look for attribution at the bottom of Copilot’s review comment or open the linked review session logs.
A practical workflow is simple. Put the instruction or skill change in the feature branch, open the PR, request Copilot review, and inspect whether the review reflects the new guidance. If Copilot still behaves as if the old instructions are in force, first confirm the files are actually in the head branch and then check whether the skill name, description, or PR description gives Copilot enough signal to use it.
If you are comparing this with other Copilot surfaces, keep the contexts separate. GitHub’s docs for code review on GitHub.com say the head branch is used for review instructions and skills. Some other Copilot clients and pages discuss different instruction sources for other workflows, which is why the review-specific documentation is the one to trust for pull request review behavior.
If you want the shortest accurate rule, it is this: branch-specific review instructions and agent skills in the PR are the ones Copilot code review reads. Use the PR to test changes to those files, then validate the review comments instead of assuming the tool applied every rule exactly as intended.
For teams that want a single place to start, the GitHub Docs page on Copilot code review is the right reference, and DevConnect can be used to organize real testers and reviews around your own app work if you need a separate workflow for product testing: https://devconnectplatform.com. That link is for your own process, not a source for Copilot behavior.
What files does Copilot code review read from the branch
Copilot code review uses repository custom instructions, agent instructions, and agent skills from the head branch of the pull request. GitHub documents .github/copilot-instructions.md for repository-wide guidance, .github/instructions/**/*.instructions.md for path-specific guidance, AGENTS.md for shared standing rules, and skills in .github/skills for task-specific workflows.
Can I test a new review rule before merging it
Yes. GitHub explicitly says you can test instruction and skill changes in the same pull request without merging them first, because Copilot reads them from the head branch. That is the intended way to verify how a new instruction or skill affects code review.
Will Copilot always apply every skill or instruction
No. GitHub says Copilot review is non-deterministic and may overlook instructions, especially if the files are long or the signals are unclear. For that reason, GitHub recommends validating Copilot’s feedback carefully and supplementing it with human review.
How can I tell whether a skill was used in a review
GitHub says some review comments include attributions that identify the skill or MCP server used. You can also open the linked review session from the pull request timeline and inspect the session logs to see which context Copilot used.
Frequently asked questions
What file should I use for repository-wide Copilot review rules
GitHub documents `.github/copilot-instructions.md` for repository-wide guidance, `.github/instructions/**/*.instructions.md` for path-specific rules, `AGENTS.md` for standing rules shared across agents, and `.github/skills` for skills.
Can Copilot code review use MCP servers too
Yes. GitHub says Copilot code review can use configured MCP servers when they are relevant to the review, and that it is more likely to use them when the repository or PR gives clear signals.
How do I verify what Copilot actually used in a review
Check the attribution at the bottom of the review comment, or open the linked review session from the pull request timeline and inspect the session logs.
Does this behavior apply to local Copilot chat or other Copilot tools
No. This page is about pull request code review on GitHub. Other Copilot experiences can use different instruction sources and should be checked in their own documentation.
Know someone stuck on this? Send them the answer.
Sources
Every link here was fetched and confirmed to resolve before this page went live.
- About GitHub Copilot code review
- Using GitHub Copilot code review on GitHub
- Using custom instructions to unlock the power of Copilot code review
- Using GitHub Copilot code review
- Use GitHub Copilot code review across the pull request lifecycle
Related questions
- GitHub Copilot code review uses branch instructions
- GitHub Copilot code review uses both skills and MCP
- Did GitHub Copilot code review inspect test coverage on PRs?
Not the question you had?
Ask it. Every source gets fetched and checked before anything goes up, so it takes a day or two, and questions that cannot be answered honestly do not get a page at all.
Everyone here builds with AI, and says so
DevConnect is for developers who use AI and are honest about it. The interesting part is not that the code was generated, it is what you did with it afterwards.