Skip to main content

require-repository-instructions-file

Require repositories that define Copilot customization assets to also provide repository guidance in .github/copilot-instructions.md or .github/instructions/copilot-instructions.md.

Rule catalog ID: R005

Targeted pattern scope​

  • .github/instructions/**/*.instructions.md
  • .github/prompts/**/*.prompt.md
  • .github/agents/**/*.agent.md
  • .github/chatmodes/**/*.chatmode.md
  • AGENTS.md
  • CLAUDE.md
  • GEMINI.md

What this rule reports​

  • Copilot customization assets in repositories that do not also include .github/copilot-instructions.md or .github/instructions/copilot-instructions.md

Why this rule exists​

Repository-wide instructions provide the broadest Copilot customization surface and are widely supported. When a repository already defines prompts, custom agents, legacy chat modes, agent instructions, or path-specific instructions, a baseline repository instructions file keeps the overall guidance coherent.

❌ Incorrect​

.github/prompts/review.prompt.md

with neither .github/copilot-instructions.md nor .github/instructions/copilot-instructions.md in the repository.

✅ Correct​

.github/copilot-instructions.md
.github/prompts/review.prompt.md
.github/instructions/copilot-instructions.md
.github/prompts/review.prompt.md

Further reading​