Why, You Ask?
Remember when I went absolutely euphoric about vibe coding? Well, that honeymoon phase taught me one crucial lesson: context matters, and you really need to spend time writing good prompts.
At first, I was frantically scribbling prompts in my notes app like some kind of digital hoarder. Then I graduated to GitHub Copilot instruction files, adding rules like "when asked for review, do this and that." But constantly switching between apps and copy-pasting prompts? I'm tired of it.
That's exactly why GitHub Copilot's new prompt files are such a game changer.
The Game Changer: .prompt.md Files
Prompt files turn your best prompts into reusable slash commands. VS Code gives you two flavors:
- Workspace prompts (
.github/prompts/): Travel with your repository, perfect for team-shared helpers - User prompts: Stored in your VS Code profile, available everywhere for personal tools
Both become accessible as /my-prompt directly in VS Code chat. Instead of hunting through notes for that brilliant review prompt, you just type /svnscha-blog-review and boom, there it is.
Note: Prompt files are currently in public preview and may change in future releases.
Real-World Example: Blog Review Prompt
Let me show you what this looks like in practice. I use project prefixes for workspace prompts and /my-... for personal ones.
For this blog, I created /svnscha-blog-review - a specialized prompt that understands my writing style:
- ---
- --
- --
- ---
This becomes available as /svnscha-blog-review in VS Code, giving me instant access to a specialized editor that knows my style.
Smart Naming & Location Strategy
The naming convention is simple: project prefixes for workspace prompts, /my-... for personal ones. So /svnscha-blog-review is specific to this blog, while /my-commit works everywhere.
Choose your location based on scope:
- Workspace prompts: Team-shared, project-specific helpers
- User prompts: Personal tools that follow you across all projects
Dynamic Prompts with Variables
Make your prompts adapt to context with VS Code variables:
- --The most useful variables include:
- Workspace:
${workspaceFolder},${workspaceFolderBasename} - File context:
${file},${fileBasename},${fileDirname} - Selection:
${selection},${selectedText}
For the full list of available variables and advanced features, check out the VS Code prompt files documentation.
Setting Up Your Prompt Arsenal
Getting started is simple:
Workspace Prompts
- Create
.github/prompts/in your repository - Add your
.prompt.mdfiles - Commit and push - your team now has access
User Prompts
- Open Command Palette (
Ctrl+Shift+P) - Run "Chat: New Prompt File"
- Choose "User profile" for location
- Author and save your prompt
Both methods make prompts available with /prompt-name in GitHub Copilot chat. Workspace prompts travel with your repository, while user prompts sync across devices with Settings Sync.
For examples and community contributions, check out the Awesome GitHub Copilot prompts collection.
Wrapping Up
Prompt files transform good prompting from an exclusive skill into a shared superpower. Your team gets expert-level guidance, your hotfix deployments get proper review, and your collective wisdom becomes instantly accessible with slash commands.
What's Next?
- Start small - Convert your three most-used prompts to
.prompt.mdfiles - Choose scope wisely - Workspace prompts for teams, user prompts for personal tools
- Use variables - Make prompts dynamic with
${selection},${file}, and${input:variableName} - Follow naming conventions - Project prefixes for workspace,
/my-...for user prompts - Explore the community - Check out Awesome GitHub Copilot prompts
- Read the docs - VS Code prompt files documentation has the latest features
Welcome to the future of prompt management - where expertise is democratized and copy-pasting is finally dead.