If Content is King, Then Context is God
65%
Putting It All Together
Copilot gives you many ways to provide context, customize its behavior, and make it work the way you want. If you feel overwhelmed, start small. Use the built-in chat modes and context variables. As you get more comfortable, explore custom instructions and custom chat modes. The more you invest in setting up your environment, the better the results you will get.
Here is a summary of the different ways to provide context and customize Copilot:
| Method | Description | Example Use Case |
|---|---|---|
| Implicit Context | Copilot automatically uses open files, cursor position, and chat history as context. | Working on a specific function or module. |
| Explicit Context Variables | Use #file, #selection, #terminal, #workspace, etc. to explicitly control context. | Fetching data from a specific file or repo section. |
| Custom Instructions | Add .github/copilot-instructions.md or *.instructions.md to set coding standards/preferences. | Enforcing team-wide coding standards in a project. |
| Built-in Chat Modes | Switch between Ask, Edit, and Agent for different workflows. | Asking questions, editing code, or executing tasks. |
Building with GitHub Copilot
From Autocomplete to Autonomous AgentsEnroll now to unlock all content and receive all future updates for free.
