Authored by Allison, this article introduces new capabilities for GitHub Copilot coding agent with support for multiple .instructions.md files, enabling tailored, context-aware custom instructions for improved automation and code quality.

GitHub Copilot Coding Agent: Now Supports .instructions.md Custom Instructions

Author: Allison

Overview

GitHub Copilot coding agent allows developers to offload coding tasks that can be processed in the background, thereby enabling them to focus on other work. The latest update brings support for new ways to provide repository instructions to Copilot coding agent.

New Custom Instructions Support

Previously, developers could use a .github/copilot-instructions.md file to supply Copilot coding agent with information about repository structure, build steps, automated testing, and linters, aiming to produce higher-quality pull requests with less manual oversight.

What’s New:

  • The Copilot coding agent now supports .instructions.md files located under .github/instructions.
  • Multiple .instructions.md files are supported, each capable of applying to different files or directories using YAML frontmatter.

Benefits

  • Granular Customization: You can provide different instruction files for various directories or types of files in your repository, allowing Copilot to receive tailored context.
  • Higher-Quality Pull Requests: Detailed, context-specific instructions help Copilot produce better, more relevant code and pull requests.
  • Improved Automation: Task delegation is enhanced as Copilot becomes more aware of nuanced or varied build, test, and lint requirements across the repository.

How It Works

  • Place one or more .instructions.md files under .github/instructions.
  • Use YAML frontmatter at the start of each file to designate which directories or files the instructions apply to.
  • Copilot coding agent will read these instructions and adjust its automated work on your behalf.

For further guidance on adding repository custom instructions, see GitHub documentation on custom instructions.

Availability

  • Public Preview: Copilot coding agent is available for users with Copilot Pro, Copilot Pro+, Copilot Business, or Copilot Enterprise (with admin-enabled policy).

Broad Platform Integration

  • Copilot coding agent can be used from github.com, in many IDEs, via GitHub Mobile, the GitHub CLI, and the GitHub MCP Server.
  • Enables seamless delegation and task management from wherever you interact with your codebase.

Learn More

  • To explore best practices and deeper usage patterns for Copilot coding agent, refer to the documentation.
  • More details about enabling Copilot coding agent for your organization or repositories are also provided in the official Copilot coding agent documentation.

This update provides developers with increased flexibility and precision when using GitHub Copilot’s background automation, helping deliver better code quality, improved CI/CD outcomes, and a more productive development workflow.

This post appeared first on “The GitHub Blog”. Read the entire article here