Skip to content

Commit 2c3fdf1

Browse files
timrogershubwriterjc-clark
authored
[2025-08-28] Document support for AGENTS.md custom instructions in Copilot coding agent (#57252)
Co-authored-by: hubwriter <[email protected]> Co-authored-by: Joe Clark <[email protected]>
1 parent 48f5ee0 commit 2c3fdf1

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

content/copilot/how-tos/configure-custom-instructions/add-repository-instructions.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Adding repository custom instructions for GitHub Copilot
33
shortTitle: Add repository instructions
4-
intro: 'Create a file in a repository that gives {% data variables.product.prodname_copilot_short %} additional context for the work it does in that repository.'
4+
intro: 'Create repository custom instructions files that give {% data variables.product.prodname_copilot_short %} additional context on how to understand your project and how to build, test and validate its changes.'
55
redirect_from:
66
- /copilot/customizing-copilot/adding-custom-instructions-for-github-copilot
77
- /copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot
@@ -239,7 +239,11 @@ Once saved, these instructions will apply to the current project in Eclipse that
239239

240240
**{% data variables.copilot.copilot_chat_short %}** on the {% data variables.product.github %} website, **{% data variables.copilot.copilot_coding_agent %}** and **{% data variables.copilot.copilot_code-review_short %}** support a single `.github/copilot-instructions.md` custom instructions file stored in the repository.
241241

242-
In addition, **{% data variables.copilot.copilot_coding_agent %}** supports one or more `.instructions.md` files stored within `.github/instructions` in the repository. Each file can specify `applyTo` frontmatter to define what files or directories its instructions apply to.
242+
In addition, **{% data variables.copilot.copilot_coding_agent %}** supports:
243+
244+
* One or more `.instructions.md` files stored within `.github/instructions` in the repository. Each file can specify `applyTo` frontmatter to define what files or directories its instructions apply to.
245+
* One or more `AGENTS.md` files stored anywhere within the repository. When {% data variables.product.prodname_copilot_short %} is working, the nearest `AGENTS.md` file in the directory tree will take precedence.
246+
* A single `CLAUDE.md` or `GEMINI.md` file stored in the root of the repository.
243247

244248
### Using a single `.github/copilot-instructions.md` file
245249

content/copilot/tutorials/coding-agent/get-the-best-results.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,13 @@ By adding custom instructions to your repository, you can guide {% data variable
7777

7878
If {% data variables.product.prodname_copilot_short %} is able to build, test and validate its changes in its own development environment, it is more likely to produce good pull requests which can be merged quickly.
7979

80-
You can add instructions in a single `.github/copilot-instructions.md` file in the repository, or create one or more `.github/instructions/**/*.instructions.md` files applying to different files or directories in your repository.
80+
{% data variables.copilot.copilot_coding_agent %} supports a number of different types of custom instructions files:
81+
82+
* `/.github/copilot-instructions.md`
83+
* `/.github/instructions/**/*.instructions.md`
84+
* `**/AGENTS.md`
85+
* `/CLAUDE.md`
86+
* `/GEMINI.md`
8187

8288
For more information, see [AUTOTITLE](/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot?tool=webui).
8389

0 commit comments

Comments
 (0)