GitHub Copilot custom instructions file placed in .github/ directory, providing repository-specific coding standards, framework preferences, and behavioral guidelines for Copilot Chat and coding agent.
copilot-instructions.md
copilot-instructions.md is a Markdown file placed at .github/copilot-instructions.md in a repository that gives GitHub Copilot repository-specific context: the coding standards, framework preferences, and behavioral guidelines Copilot Chat and the Copilot coding agent should follow when generating or editing code in that project. Rather than repeating the same guidance in every prompt, a team writes it once and Copilot applies it automatically across the repository.
- Repository-scoped context - Instructions apply to all Copilot interactions within that repo, not just a single session.
- Standards and preferences - Encodes house coding style, preferred libraries, testing expectations, and things to avoid.
- Well-known location - Living at
.github/copilot-instructions.md, it is discovered automatically by Copilot without extra wiring. - Reviewable in pull requests - Because it is versioned with the code, the guidance an AI assistant follows evolves openly alongside the project.
For API teams this file is a governance surface at the point of authorship — a place to encode the OpenAPI conventions, naming rules, and security expectations you want an AI assistant to honor before code ever reaches the pipeline. It sits in the same family as CONVENTIONS.md and AGENTS.md, part of the shift toward governing in the IDE where the work happens, so that agent-generated APIs arrive already aligned with the rules a governance ruleset would otherwise enforce after the fact.
Referenced on the API Evangelist blog
Where this standard shows up across sixteen years of my writing at apievangelist.com — how it fits into API design, governance, and the agentic turn.
Govern in the IDE, Where the Work Happens
2026-07-01