Regras & instruções Oficial

GitHub Copilot custom instructions

Repository custom instructions for GitHub Copilot: .github/copilot-instructions.md, path-specific files and AGENTS.md.

Autor
GitHub
Funciona com
GitHub Copilot
Documentado
Oct 2, 2026

O que é GitHub Copilot custom instructions

Repository custom instructions give Copilot repository-specific guidance on GitHub. Three types are supported: repository-wide, path-specific and agent instructions.

O que ela faz

Como o GitHub Copilot custom instructions se integra: quais agentes o executam e o que ele acrescentaEXECUTA EMSeu agenteGitHub Copilotum host documentadoRULES · OFICIALGitHub Copilot custom instru…Instruções do projeto que o agent…5 etapas de instalaçãosem permissões extras listadasO QUE ELA ACRESCENTAO que ela fazRepository-wide instructions in .…Path-specific instructions in NAM…Agent instructions via AGENTS.md…Alternatively a single CLAUDE.md…agente → extensão → nova capacidade · do repositório ou da documentação oficial
Onde GitHub Copilot custom instructions roda e o que acrescenta, segundo a documentação
  • Repository-wide instructions in .github/copilot-instructions.md
  • Path-specific instructions in NAME.instructions.md under .github/instructions
  • Agent instructions via AGENTS.md files anywhere; nearest one wins
  • Alternatively a single CLAUDE.md or GEMINI.md in the repository root
  • Copilot cloud agent can generate a copilot-instructions.md from a prompt

Quando usar

Boa adequação

  • You want Copilot to follow repo build and validation steps
  • Different paths need different Copilot guidance

Não indicado para

  • Task-specific instructions: GitHub's generation prompt says instructions must not be task specific

Como instalar o GitHub Copilot custom instructions

Você precisa de: GitHub Copilot; For code review, personal custom-instructions setting enabled (default)

  1. Create .github/copilot-instructions.md in the repository
  2. Write repo summary, build, test and validation steps
  3. For path rules add NAME.instructions.md files under .github/instructions
  4. Or ask Copilot cloud agent at github.com/copilot/agents to generate the file
  5. Commit the files to the repository

Limitações

  • GitHub's generation prompt asks for instructions no longer than 2 pages
  • Feature support varies by type; see GitHub's customization overview

Ferramentas que ela estende

GitHub Copilot

Web · Desktop · Mobile

Ainda sem avaliações de usuários

Assistente de programação com IA do GitHub, com sugestões de código, chat e recursos de agente em editores, no terminal e no GitHub.

O plano gratuito termina em: 2,000 completions per month, Limited chat and agent usage (allowance of GitHub AI Credits)

Listed Ainda não avaliada

Verificado github.com (abre o site de GitHub Copilot em uma nova aba)

Grátis · pago a partir de $10/mo EUA · verificado Sep 30

Perguntas frequentes

Where does the Copilot repository-wide instructions file go?

.github/copilot-instructions.md in the repository. fonte

How do I write path-specific Copilot instructions?

Create NAME.instructions.md files within or below .github/instructions. fonte

Does Copilot read AGENTS.md?

Yes, agent instructions use AGENTS.md; the nearest file takes precedence. A root CLAUDE.md or GEMINI.md also works. fonte

Do path-specific and repository-wide instructions combine?

Yes, when a path matches and a repository-wide file exists, both are used. fonte

Fontes e lacunas

Não informado pelos mantenedores: repo_url is GitHub's public docs repo, not a rules repo; github-copilot is not in our catalog.

Mais extensões para conhecer