Sunday, June 08, 2025

VS Code GitHub Copilot config (AI tool)

Similar to "Cursor.ai" tool, GitHub Copilot with VS Code "context" can be "customized" 

 Customize chat responses in VS Code

"Copilot can provide you with responses that match your coding practices and project requirements if you give it the right context. Custom instructions enable you to define and automatically apply the guidelines and rules for tasks like generating code, or performing code reviews. Prompt files let you craft complete chat prompts in Markdown files, which you can then reference in chat or share with others. In this article, you will learn how to use custom instructions and prompt files to customize your chat responses in Visual Studio Code."

There are two types of instruction files:

  • .github/copilot-instructions.md: a single instruction file that contains all the instructions for your workspace. These instructions are automatically included in every chat request.

  • .instructions.md files: one or more prompt files that contain custom instructions for specific tasks. You can attach individual prompt files to a chat request, or you can configure them to be automatically included for specific files or folders.

No comments: