Writing effective prompts for AI tools can be time-consuming and challenging. Cement those efforts by leveraging reusable prompt files. These custom prompts allow for quick access at the prompt box, and they’re automatically stored and shared with your teammates to make it easy to multiply your Copilot successes.
Reusable prompt files solve the prompt-writing challenge
Reusable prompt files let you write, save, and run prompts right inside Visual Studio. Simply craft your prompt in a .github/prompts/[title].prompt.md file, save it, and reference it whenever you need to engage Copilot. This means your best prompts are always at your fingertips—no more hunting through old files, emails, or notes.
Speed up your workflow and collaborate effortlessly
Whether you work solo or as part of a team, reusable prompt files save you time working with Copilot. The files are shared in the repository, ensuring consistent results across your projects and making them available to your colleagues. Everyone can benefit from tested, effective prompts that accelerate understanding and solution discovery. The days of reinventing the wheel are over!
Tips for maximizing your reusable prompt files
- Leverage the awesome-copilot repository to get started with Microsoft and community contributed prompt files.
- Use #prompt: or the context menu to add prompts in the prompt box. You can add more specific content or simply run it.
- Write your prompts in the prompt box to easily grab the prompt syntax for referencing files (#files:“filename.md”) and other context types.
- Organize prompt files by topic, project, or workflow for easy access.
- Review and refine your most-used prompts regularly to keep them sharp and relevant.
- Encourage team members to contribute their most effective prompts, building a shared resource library.
Check out the new Visual Studio Hub
Stay connected with everything Visual Studio in one place! Visit the Visual Studio Hub for the latest release notes, YouTube videos, social updates, and community discussions.
Appreciation for your feedback
Your feedback helps us improve Visual Studio, making it an even more powerful tool for developers. We are immensely grateful for your contributions and look forward to your continued support. By sharing your thoughts, ideas, and any issues you encounter through Developer Community, you help us improve and shape the future of Visual Studio.
How can I share my prompts across different projects (repositories)? I have many prompts which are not repository-specific and I want to have them available for any solution/repository I open.
Could this be extended to support a machine wide folder (that was a repo in itself)? There must be many prompts that can be re-used across repos and even across teams or a whole department.
Doest this work with VS Code?
Yes! Here are the docs – https://code.visualstudio.com/docs/copilot/customization/prompt-files
Thank you!!