GitHub Copilot reads instructions from:
- Main Instructions:
.github/copilot-instructions.md— always active - Path-Specific Instructions:
.github/instructions/*.instructions.md— withapplyTopatterns - AGENTS.md: Detected natively from project root
- Create
.github/directory in your project root - Copy
copilot-instructions.mdinto.github/ - Copy the
instructions/folder into.github/ - Customize the content for your project
Each instruction file uses YAML frontmatter with applyTo:
---
applyTo: "**/*.tsx"
---
Your instructions in Markdown here...applyTo: Glob pattern for automatic activation- If no
applyTo: Instructions are always active - Copilot also detects AGENTS.md in your project root
- Use
/initin Copilot Chat to auto-generate instructions from your project
your-project/
├── .github/
│ ├── copilot-instructions.md # Main instructions (always active)
│ └── instructions/
│ ├── code-style.instructions.md # All files
│ ├── security.instructions.md # All files
│ ├── testing.instructions.md # Test files only
│ ├── react.instructions.md # .tsx/.jsx only
│ └── python.instructions.md # .py only
└── AGENTS.md # Also read by Copilot
- Keep main
copilot-instructions.mdfocused on project overview and core rules - Use
instructions/folder for topic-specific and file-type-specific rules - Copilot reads AGENTS.md natively — you can use that as your single source of truth
- The
/initcommand can bootstrap instructions from your existing codebase
See examples/ for a complete FocusFlow project configuration.
To use the same rules across IDEs, create an AGENTS.md and run:
../../scripts/symlink-setup.shThis creates .github/copilot-instructions.md as a symlink to AGENTS.md.