{"id":36462,"date":"2026-05-04T15:23:25","date_gmt":"2026-05-04T15:23:25","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/cppblog\/?p=36462"},"modified":"2026-05-04T15:23:25","modified_gmt":"2026-05-04T15:23:25","slug":"giving-copilot-more-c-context-using-custom-instructions-in-vs-code","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cppblog\/giving-copilot-more-c-context-using-custom-instructions-in-vs-code\/","title":{"rendered":"Giving Copilot more C++ context using custom instructions in VS Code"},"content":{"rendered":"<p>In February, we <a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/c-symbol-context-and-cmake-build-configuration-awareness-for-github-copilot-in-vs-code\/\">announced how GitHub Copilot can now use C++ symbol context and CMake build configuration awareness<\/a> to deliver smarter suggestions in Visual Studio Code. Today, we&#8217;re excited to share new ways to further enhance your C++ development experience with Copilot and get the most out of the language-driven suggestions, by leveraging custom instructions designed specifically for C++ language tools.<\/p>\n<h3>\u00a0Enabling Custom Instructions<\/h3>\n<p>You can access these custom instructions in the <a href=\"https:\/\/github.com\/github\/awesome-copilot\/tree\/main\">awesome-copilot repo<\/a>, a community-driven collection of instructions, prompts, and configurations to help users get the most out of GitHub Copilot and tailor its behavior to specific workflows. Specifically, see: <a href=\"https:\/\/github.com\/github\/awesome-copilot\/blob\/main\/instructions\/cpp-language-service-tools.instructions.md\">awesome-copilot\/instructions\/cpp-language-service-tools.instructions.md at main \u00b7 github\/awesome-copilot<\/a>.<\/p>\n<p>To <a href=\"https:\/\/docs.github.com\/en\/copilot\/how-tos\/configure-custom-instructions\/add-repository-instructions#creating-custom-instructions\">enable these custom instructions<\/a>, add this file (along with any other relevant custom instructions) to the following path in your repository root: <code>.github\/instructions\/**<\/code>. Once added, GitHub Copilot will automatically pick up and apply these instructions for the repo.<\/p>\n<p>These instructions allow Copilot to rely more heavily on C++ language service tools rather than traditional code search tools. This enables more end-to-end C++ workflows grounded in language-powered semantic intelligence rather than manual file searches.<\/p>\n<h3>Benefits for C++ workflows<\/h3>\n<p>For examples of workflows using these C++ tools, see our announcement blog post: <a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/c-symbol-context-and-cmake-build-configuration-awareness-for-github-copilot-in-vs-code\/\">C++ symbol context and CMake build configuration awareness for GitHub Copilot in VS Code &#8211; C++ Team Blog<\/a>.<\/p>\n<p>Whether you\u2019re maintaining large legacy codebases or adopting modern C++ standards, these custom instructions help Copilot provide more relevant, actionable assistance directly in your workflow. By integrating them into your repository, you can improve productivity and code quality across common C++ development tasks.<\/p>\n<h3>Learn more and share feedback<\/h3>\n<p>We\u2019re excited to continue improving these tools and other C++ integration points based on feedback, and we encourage you to try them out and let us know how they fit into your C++ workflows. Download <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-vscode.cpp-devtools\">the C\/C++ DevTools extension<\/a> and give it a try. Please file any issues or feedback in the appropriate repository. For CMake-related functionality:\u00a0<a href=\"https:\/\/github.com\/microsoft\/vscode-cmake-tools\/issues\">Issues \u00b7 microsoft\/vscode-cmake-tools<\/a>\u00a0and for C++-related functionality:\u00a0<a href=\"https:\/\/github.com\/microsoft\/vscode-cpptools\/issues\">Issues \u00b7 microsoft\/vscode-cpptools<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In February, we announced how GitHub Copilot can now use C++ symbol context and CMake build configuration awareness to deliver smarter suggestions in Visual Studio Code. Today, we&#8217;re excited to share new ways to further enhance your C++ development experience with Copilot and get the most out of the language-driven suggestions, by leveraging custom instructions [&hellip;]<\/p>\n","protected":false},"author":85413,"featured_media":35994,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-36462","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cplusplus"],"acf":[],"blog_post_summary":"<p>In February, we announced how GitHub Copilot can now use C++ symbol context and CMake build configuration awareness to deliver smarter suggestions in Visual Studio Code. Today, we&#8217;re excited to share new ways to further enhance your C++ development experience with Copilot and get the most out of the language-driven suggestions, by leveraging custom instructions [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/36462","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/users\/85413"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/comments?post=36462"}],"version-history":[{"count":1,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/36462\/revisions"}],"predecessor-version":[{"id":36464,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/36462\/revisions\/36464"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media\/35994"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media?parent=36462"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/categories?post=36462"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/tags?post=36462"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}