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.
Prompt files turn your best prompts into reusable slash commands. VS Code gives you two flavors:
.github/prompts/
): Travel with your repository, perfect for team-shared helpersBoth 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.
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:
---
mode: "agent"
description: "Review blog posts for svnscha.github.io with focus on style, grammar, and technical accuracy"
---
# Blog Post Review for svnscha.github.io
You are an expert editor reviewing a blog post for svnscha's technical blog.
Focus on:
## Writing Style & Tone
- Consider using "Why, You Ask?" openings when it makes sense for the topic (not mandatory for all posts)
- Keep the direct, slightly sarcastic but helpful voice
- Ensure smooth transitions between sections
- End posts with "Wrapping Up" and "What's Next?" sections when appropriate
## Technical Accuracy
- Verify code examples are correct and practical
- Check that technical explanations are clear and accurate
- Ensure all file paths and commands are properly formatted
## Grammar & Spelling
- Fix any grammatical errors or typos
- Improve sentence structure where needed
- Maintain consistency in technical terminology
## Content Structure
- Ensure headings flow logically
- Verify examples support the main points
- Suggest ending with "Wrapping Up" (summary) and "What's Next?" (actionable next steps) sections
- Check that the conclusion ties back to the opening
Provide specific, actionable feedback that maintains the author's voice while improving clarity and correctness.
This becomes available as /svnscha-blog-review
in VS Code, giving me instant access to a specialized editor that knows my style.
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:
Make your prompts adapt to context with VS Code variables:
# Code Review Prompt
Review the following code in ${file}:
${selection}
Focus on:
- Security vulnerabilities in ${fileBasename}
- Performance implications
- Code style consistency with ${workspaceFolderBasename} standards
The most useful variables include:
${workspaceFolder}
, ${workspaceFolderBasename}
${file}
, ${fileBasename}
, ${fileDirname}
${selection}
, ${selectedText}
For the full list of available variables and advanced features, check out the VS Code prompt files documentation.
Getting started is simple:
.github/prompts/
in your repository.prompt.md
filesCtrl+Shift+P
)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.
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.
.prompt.md
files${selection}
, ${file}
, and ${input:variableName}
/my-...
for user promptsWelcome to the future of prompt management - where expertise is democratized and copy-pasting is finally dead.