Prompt Files
Overview
Prompt files are a powerful way of improving the performance of AI models from within Visual Studio.
Beast Mode uses a prompt file to make the LLM behave differently, which we canuse as an example/starting point. The promot file for beasr mode can be found by looking at the raw file here.
We can copy this and add it to our source tree (this can be easily done within Visual Studio by using the File Explorer extension by Mads Kristensen to show all files in the source branch).
The file should be added in a new subfolder .github\prompts
:
Now withihn this prompts
sub-folder we can create a new file (in this example we're going to call it beast-mode-31.prompt.md
) and paste in the content from the raw file (referenced above).
NOTE: Always read through externally sourced prompt file to make sure they are good and contain no nefarious instructions, etc.
We now have our prompt file in the root of our project (which we can add to the git repo).
Now in the visual studio Copilot chat window we can add the prompt file by clicking the + button and selecting "prompts":
Because of where we located the prompt file it should now appear, we can click on this and it will become enabled and appear on the list in the window:
From here the prompt will be used when using the chat feature.
One thing to note, it is safer when chat asks for permission to review the actions and choose "allow only this time", so you have better control of what is going to happen.
Also - this can be used with any agent selected from the drop-down.