Copilot Code Review: Support for custom instruction files by path

Diego Cortés
Diego Cortés
September 5, 2025
Copilot Code Review: Support for custom instruction files by path

Personalization in GitHub Copilot code review has taken a step forward. With the new update, it is now possible to use path-delimited custom instruction files, providing more specific guidance for concrete parts of the repository. This feature is complemented by other significant updates that are also worth highlighting.

Support for Path-Delimited Instruction Files

Copilot's code review functionality now supports *.instructions.md files that contain an applyTo section, making it easier to deliver guidance during code reviews for specific files or directories within the repository. This option had already been available for other Copilot features and is now extended to code reviews, improving the relevance and focus of feedback on pull requests.

Some of the advantages provided by this new capability include:

  • Specific Guidance: It allows for defining instructions for specific areas of code, such as the frontend or security, using separate instruction files.
  • Precise Guidance through applyTo: It allows for including an applyTo section with path glob patterns to pinpoint exactly where the instructions apply, ignoring files that do not have applyTo.
  • Concise and Focused Instructions: Specific guidelines can be maintained for each part of the code, promoting clarity and effectiveness in the review process.

Getting Started Quickly

To activate this new functionality, users need to create or update a file, for instance, frontend.instructions.md, within the .github/instructions directory of their repository. Next, an applyTo section with one or more glob patterns (for example, webapp/src/**) should be included, along with brief and comprehensible instructions. When committing and opening or updating a pull request that includes a matching path, Copilot will use the relevant instructions.

Example Configuration:

# frontend.instructions.md
applyTo:
  - webapp/src/**
  - ui/components/**
---
- Emphasis on accessibility (ARIA, focus management).
- Prefer design tokens.
- Highlight deprecated components under `legacy/`.

For more details, the documentation on Copilot custom instructions can be consulted.

Other Customization Updates

Organization-Level Instructions

In addition to the mentioned improvements, organization-level instructions have been incorporated into Copilot's code review. If an organization already maintains instructions at this level, they will now automatically be included when generating feedback for pull request reviews. This enhancement aims to ensure that coding standards and best practices are consistently applied across all associated repositories.

Removal of Coding Guidelines

In a recent communication, it was announced that the coding guidelines feature (previously in private preview for Copilot Enterprise) would be partially removed. It has now been decided to completely eliminate this functionality. Moving forward, all customization specifications must be added in the copilot-instructions.md or *.instructions.md files.

Conclusions

The new features for code review in GitHub Copilot not only expand personalization but also assist development teams by providing more specific and applied guidelines according to the project structure. For those looking to optimize their workflow and maintain standards in their projects, the implementation of custom instruction files presents itself as a powerful tool.

To continue exploring these topics and other updates, readers are encouraged to visit the blog and stay informed about the latest innovations in the GitHub Copilot ecosystem.

Article information

Published: September 5, 2025
Category: Artificial Intelligence
Reading time: 5-8 minutes
Difficulty: Intermediate

Key tips

1

Take your time to understand each concept before moving on to the next one.

2

Practice the examples in your own development environment for better understanding.

3

Don't hesitate to review the additional resources mentioned in the article.

Diego Cortés
Diego Cortés
Full Stack Developer, SEO Specialist with Expertise in Laravel & Vue.js and 3D Generalist

Frequently Asked Questions

Categories

Page loaded in 34.00 ms