copilot-instructions.md Format

The copilot-instructions.md format is an unstructured Markdown file placed at .github/copilot-instructions.md. GitHub Copilot detects the file automatically and prepends its contents to prompts sent to the model in Copilot Chat, Copilot in the IDE, and the Copilot coding agent. The file accepts free-form natural language instructions, with whitespace between sections ignored, and is rendered as a reference in Copilot Chat replies so users can confirm it was consulted.

API entry from apis.yml

apis.yml Raw ↑
aid: copilot-instructions-md:format
name: copilot-instructions.md Format
tags:
- Convention
- GitHub Copilot
- Markdown
- Repository
image: https://kinlane-productions.s3.amazonaws.com/apis-json/apis-json-logo.jpg
humanURL: https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot
properties:
- url: https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot
  type: Documentation
- url: https://github.blog/changelog/2025-01-23-custom-instructions-for-github-copilot-in-vs-code-now-generally-available/
  type: Blog
- url: https://docs.github.com/en/copilot/customizing-copilot/about-customizing-github-copilot-chat-responses
  type: Documentation
- url: https://github.com/github/awesome-copilot
  type: Examples
description: The copilot-instructions.md format is an unstructured Markdown file placed at .github/copilot-instructions.md.
  GitHub Copilot detects the file automatically and prepends its contents to prompts sent to the model
  in Copilot Chat, Copilot in the IDE, and the Copilot coding agent. The file accepts free-form natural
  language instructions, with whitespace between sections ignored, and is rendered as a reference in Copilot
  Chat replies so users can confirm it was consulted.
x-features:
- Auto-loaded by GitHub Copilot Chat, IDE plugins, and coding agent
- Resides at the canonical path .github/copilot-instructions.md
- Plain Markdown - no required schema or front matter
- Visible reference in Copilot Chat replies that consume the file
- Pairs with .github prompt files and Copilot agent rulesets
- Effective immediately upon save; no Copilot configuration step
x-useCases:
- Telling Copilot which test runner, linter, and build commands to use
- Steering Copilot to preferred libraries or framework patterns
- Communicating commit message and branch naming conventions
- Documenting code style, naming, and comment conventions
- Reducing CI failures caused by Copilot generated code