The best way to improve the results you get back from GitHub Copilot, is by providing it some extra context. I explained before how you could use the copilot-instructions.md
for this or by creating re-usable custom prompts.
When doing this it is not only important to create this context up front but also update them while your project grows and evolves. I typically put it as an extra task at the end of each sprint.
Today when I opened VSCode, the following message popped up:
Wow! That’s great. Now it already starts suggesting bringing my copilot-instructions.md
up to date for me!
In this example, it adds one rule to the file:
Sidenote: If you have a hard time coming up with good prompts, I recommend to certainly check out the Cursor rules examples. Although originally created for Cursor (another AI enabled IDE I really like), they can be a good starting point for your Copilot Instructions as well. 2 good websites to start with are:
CursorRules: AI Code Standards & .cursorrules Templates Hub
More information
GitHub Copilot - Custom Instructions