From b05aa2b730bc992c249c21e76cad6962ade09ace Mon Sep 17 00:00:00 2001 From: Megha Anand Date: Mon, 29 Sep 2025 16:28:31 -0700 Subject: [PATCH 1/2] Add custome instructions example --- docs/ide/copilot-chat-context.md | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/docs/ide/copilot-chat-context.md b/docs/ide/copilot-chat-context.md index 941ab09da63..c10d170dd0b 100644 --- a/docs/ide/copilot-chat-context.md +++ b/docs/ide/copilot-chat-context.md @@ -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 @@ -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. From 9b35253e0d8e97b90c14580625924def3ebefcff Mon Sep 17 00:00:00 2001 From: Megha Anand Date: Mon, 29 Sep 2025 16:43:18 -0700 Subject: [PATCH 2/2] Add links to trust center --- docs/ide/visual-studio-github-copilot-chat.md | 2 +- docs/ide/visual-studio-github-copilot-extension.md | 2 +- docs/ide/visual-studio-github-copilot-get-started.md | 6 ++++++ docs/ide/visual-studio-github-copilot-install-and-states.md | 2 ++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/ide/visual-studio-github-copilot-chat.md b/docs/ide/visual-studio-github-copilot-chat.md index 80d8442be98..d342cf236dd 100644 --- a/docs/ide/visual-studio-github-copilot-chat.md +++ b/docs/ide/visual-studio-github-copilot-chat.md @@ -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) diff --git a/docs/ide/visual-studio-github-copilot-extension.md b/docs/ide/visual-studio-github-copilot-extension.md index 69b24f8a0cb..67bca4638e0 100644 --- a/docs/ide/visual-studio-github-copilot-extension.md +++ b/docs/ide/visual-studio-github-copilot-extension.md @@ -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) diff --git a/docs/ide/visual-studio-github-copilot-get-started.md b/docs/ide/visual-studio-github-copilot-get-started.md index e665f49c4c3..477fe2ed116 100644 --- a/docs/ide/visual-studio-github-copilot-get-started.md +++ b/docs/ide/visual-studio-github-copilot-get-started.md @@ -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) diff --git a/docs/ide/visual-studio-github-copilot-install-and-states.md b/docs/ide/visual-studio-github-copilot-install-and-states.md index 6110d43ed3c..acc7baeb7f4 100644 --- a/docs/ide/visual-studio-github-copilot-install-and-states.md +++ b/docs/ide/visual-studio-github-copilot-install-and-states.md @@ -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: