Path: blob/main/extensions/copilot/assets/prompts/skills/agent-customization/references/agent-instructions.md
13405 views
agent instructions
Guidelines that automatically apply to all chat requests across your entire workspace.
File Types (Choose One)
| File | Location | Purpose |
|---|---|---|
copilot-instructions.md | .github/ | Project-wide standards (recommended, cross-editor) |
AGENTS.md | Root or subfolders | Open standard, monorepo hierarchy support |
Use only one—not both.
Template
Only include sections the workspace benefits from:
For large repos, link to detailed docs instead of embedding: See docs/TESTING.md for test conventions.
When to Use
General coding standards that apply everywhere
Team preferences shared through version control
Project-wide requirements (testing, documentation)
Core Principles
Minimal by default: Only what's relevant to every task
Concise and actionable: Every line should guide behavior
Link, don't embed: Reference docs instead of copying content. Search for existing docs (
docs/**/*.md,CONTRIBUTING.md, etc.) and catalog what they cover—only inline agent-critical gotchas not documented elsewhereKeep current: Update when practices change
Anti-patterns
Using both file types: Having both
copilot-instructions.mdandAGENTS.mdKitchen sink: Everything instead of what matters most
Duplicating docs: Copying README instead of linking
Obvious instructions: Conventions already enforced by linters