
News
Visual Studio Devs Share Copilot AI Prompts to Improve Code
Microsoft’s Mads Kristensen took to social media to ask Visual Studio developers to share their favorite prompts to get GitHub Copilot AI to improve their code.
Kristensen, a principal product manager working on the Visual Studio team, is known for writing a huge amount of extensions for Visual Studio that introduce functionality that often gets baked into the IDE’s bits. He is a constant presence on social media to promote new extensions, features and functionality — and in this case, ask developers for feedback or tips.
He did that this week with the simple question: “What are your favorite prompts for GitHub Copilot that help improve your code?”
He started out answering his own question: “I find this prompt pretty good for adding XML Doc comments: Add missing XML Doc Comments and mention the purpose, intent, and ‘the why’ of the code, so developers unfamiliar with the project can better understand it. If comments already exist, update them to meet the before mentioned criteria if needed. Use the full syntax of XML Doc Comments to make them as awesome as possible including references to types. Don’t add any documentation that is obvious for even novice developers by reading the code.”
Some readers really got into it, with one providing a screenshot along with the response, which simply read: red-test/green-test (to which Kristensen replied, “Oh, that is cool!”).
About the Author
David Ramel is an editor and writer at Converge 360.