Summary: David Ortinau discusses how to improve the accuracy of GitHub Copilot for coding by using custom instructions and prompt files. By adding specific preferences and context, such as async/await guidelines, users can enhance the quality of the generated code. Ortinau is also building a repository of helpful instruction files to assist others in optimizing their AI coding experience.
copilot-instructions.md. This little file is a place to put your preferences and workspace context to be included with every single interaction you make with Copilot. (View Highlight)
you can add more specific and lengthy context that can be included as needed with your prompts. (View Highlight)
I can then in the Copilot chat window explicitly add this particular file, or better yet I can just use a keyword I've chosen and Copilot should include it. To setup keywords, I saw this pattern in another repository and it worked for me as well. (View Highlight)
Setup a root prompt file in the root of the workspace named .github/prompts/prompts.prompt.md, and I use the command "Chat: Use Prompt" to include this file in my chat session. (View Highlight)
Now when I mention "async", I expect Copilot to include that file with the additional instructions and context. (View Highlight)
I've begun adding more and more prompt files to a new repository. (View Highlight)