Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 24 additions & 2 deletions docs/ide/copilot-chat-context.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: 'Customize chat responses'
description: Use custom instructions and prompt files to customize responses and use slash commands to set quick context for common tasks.
ms.date: 7/31/2025
ms.date: 9/29/2025
ms.update-cycle: 180-days
ms.topic: how-to
author: anandmeg
Expand Down Expand Up @@ -47,10 +47,32 @@ The custom instructions feature enables you to automatically add pre-specified c

To configure custom instructions:
1. [Create/add](https://docs.github.com/en/enterprise-cloud@latest/copilot/customizing-copilot/adding-custom-instructions-for-github-copilot) a custom instructions file `.github/copilot-instructions.md` in the root of your repository.
1. Enable the feature in Visual Studio via **Tools** > **Options** > **GitHub** > **Copilot** > select **(Preview) Enable custom instructions to be loaded from .github/copilot-instructions.md files and added to requests.**.
1. Enable the feature in Visual Studio via **Tools** > **Options** > **GitHub** > **Copilot** > **Copilot Chat** > **Enable custom instructions to be loaded from .github/copilot-instructions.md files and added to requests**.

Custom instructions are not visible in the Chat view or inline chat. However, when used by Copilot, the`.github/copilot-instructions.md` file is listed in the References list of a response.

### Example

Here's an example C# custom instruction:

```markdown
# Custom Instructions

## C# Instructions
Applies to: `**/*.cs`

- Write clear and concise comments for each function.
- Use PascalCase for component names, method names, and public members.
- Use camelCase for private fields and local variables.
- Add a newline before the opening curly brace of any code block
(such as after `if`, `for`, `while`, `foreach`, `using`, `try`, etc.).
- Ensure that the final `return` statement of a method is on its own line.
```

Copy these instructions into your `.github/copilot-instructions.md` file to use and automatically apply to Copilot behavior.

For more examples of custom instructions, see the list of [instruction samples on GitHub](https://github.com/github/awesome-copilot/blob/main/README.instructions.md).

## Use prompt files

You can now create reusable prompt files in your repository to run or share your frequently used prompts.
Expand Down
2 changes: 1 addition & 1 deletion docs/ide/visual-studio-github-copilot-chat.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,5 +146,5 @@ To learn more, consider exploring the following resources:

- [GitHub Copilot: Getting started](https://docs.github.com/copilot/getting-started-with-github-copilot?tool=visualstudio)
- [GitHub Copilot: Your AI pair programmer](https://github.com/features/copilot)
- [GitHub Copilot Trust Center](https://resources.github.com/copilot-trust-center/)
- [GitHub Copilot Trust Center](https://copilot.github.trust.page)
- [Support for GitHub Copilot Chat](https://support.github.com)
2 changes: 1 addition & 1 deletion docs/ide/visual-studio-github-copilot-extension.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,4 @@ To learn more about the GitHub Copilot extension for Visual Studio, consider exp

- [GitHub Copilot quickstart](https://docs.github.com/copilot/getting-started-with-github-copilot?tool=visualstudio)
- [GitHub Copilot feature page](https://github.com/features/copilot)
- [GitHub Trust Center](https://resources.github.com/copilot-trust-center/)
- [GitHub Copilot Trust Center](https://copilot.github.trust.page)
6 changes: 6 additions & 0 deletions docs/ide/visual-studio-github-copilot-get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,9 @@ Customize Copilot for your project and your development workflow.
To review Copilot features at any time, select **GitHub Copilot Walkthrough** from the **GitHub Copilot** badge in the upper right corner of Visual Studio.

Try building a complete app with the [Hands-on lab: GitHub Copilot in Visual Studio 2022](https://github.com/dotnet-presentations/build-2025-lab300).

## Related links

- [GitHub Copilot Trust Center: Learn about security, privacy, compliance, and transparency](https://copilot.github.trust.page)
- [Completions](visual-studio-github-copilot-extension.md)
- [Chat](visual-studio-github-copilot-chat.md)
2 changes: 2 additions & 0 deletions docs/ide/visual-studio-github-copilot-install-and-states.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ You can remove the GitHub Copilot component from your Visual Studio instance by

Support for GitHub Copilot Chat will be provided by GitHub and can be reached at https://support.github.com.

To learn more about Copilot’s security, privacy, compliance, and transparency, see the [GitHub Copilot Trust Center FAQ](https://copilot.github.trust.page/faq).

## Next steps

To learn more, consider exploring the following resources:
Expand Down