Design.dev design.dev
AI Tools

GitHub Copilot Instructions Generator

Generate .github/copilot-instructions.md for repository-wide guidance, or path-specific .github/instructions/NAME.instructions.md files with applyTo glob frontmatter. Matches GitHub's current Copilot custom instructions spec.

1 Scope Which file are you generating?

4 Tech Stack Choose your stack

5 Guidelines Customize behavior

6 Custom Instructions Optional

Preview

.github/copilot-instructions.md

							

Where Copilot instructions live

.github/
├── copilot-instructions.md      ← repository-wide
└── instructions/                ← path-specific
    ├── typescript-style.instructions.md
    ├── api-routes.instructions.md
    └── ...

Supported by:

.github/copilot-instructions.mdCopilot Chat, code review & cloud agent .github/instructions/*.instructions.mdCopilot cloud agent & code review (path-specific) AGENTS.md / CLAUDE.mdRead by Copilot when present (separate spec)

Pair with

AGENTS.md GeneratorUniversal agent spec read by Codex, Cursor, Amp & more Cursor Rules Generator.mdc rules for Cursor's .cursor/rules/ system CLAUDE.md GeneratorClaude Code project memory

Frequently asked questions

How GitHub Copilot custom instructions work, where they live, and how to combine repo-wide and path-specific files.

What is copilot-instructions.md?

A Markdown file placed at .github/copilot-instructions.md that gives GitHub Copilot repository-wide custom instructions. Copilot Chat, Copilot code review, and Copilot cloud agent automatically include it as context when working in your repo.

Where do GitHub Copilot instruction files go?

Repository-wide instructions live at .github/copilot-instructions.md. Path-specific instructions live at .github/instructions/NAME.instructions.md (or in subdirectories) and target files via an applyTo glob in YAML frontmatter.

What are path-specific Copilot instructions?

Extra Markdown files under .github/instructions/ that apply only when Copilot is working on files matching an applyTo glob. For example applyTo: "app/models/**/*.rb" or applyTo: "**/*.ts,**/*.tsx". On GitHub.com they are currently supported by Copilot cloud agent and Copilot code review.

What does the excludeAgent option do?

excludeAgent lets you opt a path-specific instructions file out of either Copilot code review or Copilot cloud agent. Set excludeAgent: "code-review" or excludeAgent: "cloud-agent" in the frontmatter. If omitted, both agents use the file.

How does copilot-instructions.md differ from AGENTS.md?

copilot-instructions.md is GitHub Copilot's vendor-specific format read by Copilot features on GitHub.com and in supported IDEs. AGENTS.md is an open cross-vendor spec read by Codex, Cursor, Amp, Aider, Jules and others. Most teams ship both: a short copilot-instructions.md for Copilot-specific behaviour and an AGENTS.md for cross-tool guidance.

How long should the file be?

GitHub recommends keeping it concise, no longer than about two pages, and avoiding task-specific content. Focus on durable, repository-wide guidance: tech stack, build and test commands, project layout, validation steps, and style rules.

How do priorities work when multiple instructions apply?

All relevant instruction sets are sent to Copilot, but priority order is: personal instructions > repository instructions > organization instructions. Try to avoid contradictions between them. Repository-wide and matching path-specific files are both included when they apply.

Copied to clipboard!