Feedback

Chat Icon

Building with GitHub Copilot

From Autocomplete to Autonomous Agents

If Content is King, Then Context is God
64%

Chat Modes: A Powerful Way to Customize Copilot's Behavior

Copilot has three different chat modes. Here's a brief reminder of what they are:

  • Ask: Useful for asking questions about code or programming without changing files.
  • Edit: Useful for rewriting selected code or files based on your natural-language instructions.
  • Agent: Useful for executing thinking tasks across a project, including planning, editing, and running tools/commands.

These are called "modes" because they change the behavior of Copilot significantly. The three modes are built into the Copilot Chat interface, and you can switch between them easily by clicking on the mode name. Starting from the release 1.101 of VS Code, you can also create custom chat modes.

A custom chat mode is a way to define your own mode with the desired behavior. For example:

  • Target a domain or role (e.g., "security auditor", "performance optimizer", "documentation writer").
  • Provide a specific set of instructions to Copilot every time you start a chat (e.g., "Your only role is to help me write unit tests for my code").
  • Add specific context (e.g., a specific website).
  • Use a specific model (e.g., Claude Sonnet instead of GPT-5).
  • Use a set of tools (e.g., linters, test runners, deployment tools, etc.).
  • Enforce a specific style or tone (e.g., concise answers only, or always explain in depth with examples).
  • Control context size (decide how much of the workspace/code Copilot sees each time).
  • Preload a chain of reasoning (e.g., always break problems into What/Why/How before answering).
  • Limit or enable certain actions

Building with GitHub Copilot

From Autocomplete to Autonomous Agents

Enroll now to unlock all content and receive all future updates for free.