Copilot Custom Instructions
Repository-wide copilot-instructions.md plus path-specific .instructions.md files with applyTo frontmatter for scoped guidance.
Description
GitHub Copilot supports two layers of custom instructions: a single .github/copilot-instructions.md for repository-wide standards, and multiple .github/instructions/*.instructions.md files with YAML frontmatter specifying applyTo glob patterns. Path-specific instructions launched in July 2025 for the Coding Agent and are now supported in VS Code, Visual Studio, and JetBrains. The Copilot Coding Agent reads these automatically when working on assigned issues, producing higher-quality PRs when instructions include build steps, test commands, and linter configuration. GitHub also auto-suggests generating instructions on your first Coding Agent PR.
Who is this for
Teams on GitHub using Copilot (Pro, Pro+, Business, or Enterprise) who want consistent AI-assisted code generation across their org.
Why files are split this way
Repository-wide instructions cover universal standards (language, frameworks, error handling). Path-specific files scope rules to directories or file types — e.g., different testing patterns for frontend vs backend. This prevents Copilot from applying Python conventions when editing TypeScript.
What changed from the previous setup
Relying on Copilot's default behavior with no project-specific instructions — generating code based only on open files and general training.
Related patterns
Copilot Coding Agent Workspace
AGENTS.md plus scoped .instructions.md files, custom agents, skills, and hooks designed for GitHub's autonomous Coding Agent.
Universal AGENT.md with Symlinks
One AGENT.md file as the single source of truth, with symlinks to CLAUDE.md, .cursorrules, .windsurfrules, and copilot-instructions.md.
Multi-Editor Frontend Setup
Frontend-optimized AI config covering design system tokens, component conventions, and testing patterns across Cursor, Copilot, and Claude Code simultaneously.