<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>svnscha - prompt-engineering</title>
    <subtitle>automating annoying tasks, sharing tips, and embracing less frustration</subtitle>
    <link rel="self" type="application/atom+xml" href="https://svnscha.de/tags/prompt-engineering/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://svnscha.de"/>
    <generator uri="https://astro.build/">Astro</generator>
    <updated>2025-09-10T00:00:00+00:00</updated>
    <id>https://svnscha.de/tags/prompt-engineering/atom.xml</id>
    <entry xml:lang="en">
        <title>How to extend GitHub Copilot with prompt files</title>
        <published>2025-09-10T00:00:00+00:00</published>
        <updated>2025-09-10T00:00:00+00:00</updated>
        <author>
          <name>Sven Scharmentke</name>
        </author>
        <link rel="alternate" type="text/html" href="https://svnscha.de/posts/howto-extend-copilot-with-prompt-files/"/>
        <id>https://svnscha.de/posts/howto-extend-copilot-with-prompt-files/</id>
        <summary type="html">Because copy-pasting prompts from your notes app is so last year. Let me show you how to turn your best prompts into reusable superpowers.</summary>
        <content type="html" xml:base="https://svnscha.de/posts/howto-extend-copilot-with-prompt-files/">&lt;h2 id=&quot;why-you-ask&quot;&gt;Why, You Ask?&lt;/h2&gt;
&lt;p&gt;Remember when I went absolutely euphoric about &lt;a href=&quot;/posts/vscode-vibe-coding/&quot;&gt;vibe coding&lt;/a&gt;? Well, that honeymoon phase taught me one crucial lesson: &lt;strong&gt;context matters, and you really need to spend time writing good prompts.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;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 &quot;when asked for review, do this and that.&quot; But constantly switching between apps and copy-pasting prompts? &lt;strong&gt;I'm tired of it.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;GitHub Copilot's prompt files solve this by keeping reusable instructions in the repository.&lt;/p&gt;
&lt;h2 id=&quot;using-promptmd-files&quot;&gt;Using &lt;code&gt;.prompt.md&lt;/code&gt; Files&lt;/h2&gt;
&lt;p&gt;Prompt files turn your best prompts into reusable slash commands. VS Code gives you two flavors:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Workspace prompts&lt;/strong&gt; (&lt;code&gt;.github/prompts/&lt;/code&gt;): Travel with your repository, perfect for team-shared helpers&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;User prompts&lt;/strong&gt;: Stored in your VS Code profile, available everywhere for personal tools&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Both become accessible as &lt;code&gt;/my-prompt&lt;/code&gt; directly in VS Code chat. Instead of hunting through notes for that brilliant review prompt, you just type &lt;code&gt;/svnscha-blog-review&lt;/code&gt; and boom, there it is.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Prompt files are currently in public preview and may change in future releases.&lt;/p&gt;
&lt;h2 id=&quot;real-world-example-blog-review-prompt&quot;&gt;Real-World Example: Blog Review Prompt&lt;/h2&gt;
&lt;p&gt;Let me show you what this looks like in practice. I use project prefixes for workspace prompts and &lt;code&gt;/my-...&lt;/code&gt; for personal ones.&lt;/p&gt;
&lt;p&gt;For this blog, I created &lt;code&gt;/svnscha-blog-review&lt;/code&gt; - a specialized prompt that understands my writing style:&lt;/p&gt;
&lt;pre class=&quot;astro-code dark-plus&quot; style=&quot;background-color:#1E1E1E;color:#D4D4D4; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;markdown&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;---&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#569CD6&quot;&gt;mode&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt;&quot;agent&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#569CD6&quot;&gt;description&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt;&quot;Review blog posts for svnscha.github.io with focus on style, grammar, and technical accuracy&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;---&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#569CD6;font-weight:bold&quot;&gt;# Blog Post Review for svnscha.github.io&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;You are an expert editor reviewing a blog post for svnscha's technical blog.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;Focus on:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#569CD6;font-weight:bold&quot;&gt;## Writing Style &amp;amp; Tone&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6796E6&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt; Consider using &quot;Why, You Ask?&quot; openings when it makes sense for the topic (not mandatory for all posts)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6796E6&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt; Keep the direct, slightly sarcastic but helpful voice&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6796E6&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt; Ensure smooth transitions between sections&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6796E6&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt; End posts with a short summary or practical next steps when they add value&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#569CD6;font-weight:bold&quot;&gt;## Technical Accuracy&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6796E6&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt; Verify code examples are correct and practical&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6796E6&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt; Check that technical explanations are clear and accurate&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6796E6&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt; Ensure all file paths and commands are properly formatted&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#569CD6;font-weight:bold&quot;&gt;## Grammar &amp;amp; Spelling&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6796E6&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt; Fix any grammatical errors or typos&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6796E6&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt; Improve sentence structure where needed&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6796E6&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt; Maintain consistency in technical terminology&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#569CD6;font-weight:bold&quot;&gt;## Content Structure&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6796E6&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt; Ensure headings flow logically&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6796E6&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt; Verify examples support the main points&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6796E6&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt; Suggest a brief summary or actionable next steps when appropriate&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6796E6&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt; Check that the conclusion ties back to the opening&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;Provide specific, actionable feedback that maintains the author's voice while improving clarity and correctness.&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This becomes available as &lt;code&gt;/svnscha-blog-review&lt;/code&gt; in VS Code, giving me instant access to a specialized editor that knows my style.&lt;/p&gt;
&lt;h2 id=&quot;smart-naming--location-strategy&quot;&gt;Smart Naming &amp;amp; Location Strategy&lt;/h2&gt;
&lt;p&gt;The naming convention is simple: &lt;strong&gt;project prefixes for workspace prompts, &lt;code&gt;/my-...&lt;/code&gt; for personal ones.&lt;/strong&gt; So &lt;code&gt;/svnscha-blog-review&lt;/code&gt; is specific to this blog, while &lt;code&gt;/my-commit&lt;/code&gt; works everywhere.&lt;/p&gt;
&lt;p&gt;Choose your location based on scope:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Workspace prompts&lt;/strong&gt;: Team-shared, project-specific helpers&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;User prompts&lt;/strong&gt;: Personal tools that follow you across all projects&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;dynamic-prompts-with-variables&quot;&gt;Dynamic Prompts with Variables&lt;/h2&gt;
&lt;p&gt;Make your prompts adapt to context with VS Code variables:&lt;/p&gt;
&lt;pre class=&quot;astro-code dark-plus&quot; style=&quot;background-color:#1E1E1E;color:#D4D4D4; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;markdown&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#569CD6;font-weight:bold&quot;&gt;# Code Review Prompt&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;Review the following code in ${file}:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;${selection}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;Focus on:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6796E6&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt; Security vulnerabilities in ${fileBasename}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6796E6&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt; Performance implications &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6796E6&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt; Code style consistency with ${workspaceFolderBasename} standards&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The most useful variables include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Workspace&lt;/strong&gt;: &lt;code&gt;${workspaceFolder}&lt;/code&gt;, &lt;code&gt;${workspaceFolderBasename}&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;File context&lt;/strong&gt;: &lt;code&gt;${file}&lt;/code&gt;, &lt;code&gt;${fileBasename}&lt;/code&gt;, &lt;code&gt;${fileDirname}&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Selection&lt;/strong&gt;: &lt;code&gt;${selection}&lt;/code&gt;, &lt;code&gt;${selectedText}&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For the full list of available variables and advanced features, check out the &lt;a href=&quot;https://code.visualstudio.com/docs/copilot/customization/prompt-files&quot;&gt;VS Code prompt files documentation&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;setting-up-your-prompt-arsenal&quot;&gt;Setting Up Your Prompt Arsenal&lt;/h2&gt;
&lt;p&gt;Getting started is simple:&lt;/p&gt;
&lt;h3 id=&quot;workspace-prompts&quot;&gt;Workspace Prompts&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Create &lt;code&gt;.github/prompts/&lt;/code&gt; in your repository&lt;/li&gt;
&lt;li&gt;Add your &lt;code&gt;.prompt.md&lt;/code&gt; files&lt;/li&gt;
&lt;li&gt;Commit and push - your team now has access&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;user-prompts&quot;&gt;User Prompts&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Open Command Palette (&lt;code&gt;Ctrl+Shift+P&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Run &quot;Chat: New Prompt File&quot;&lt;/li&gt;
&lt;li&gt;Choose &quot;User profile&quot; for location&lt;/li&gt;
&lt;li&gt;Author and save your prompt&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Both methods make prompts available with &lt;code&gt;/prompt-name&lt;/code&gt; in GitHub Copilot chat. Workspace prompts travel with your repository, while user prompts sync across devices with Settings Sync.&lt;/p&gt;
&lt;p&gt;For examples and community contributions, check out the &lt;a href=&quot;https://github.com/github/awesome-copilot/tree/main/prompts&quot;&gt;Awesome GitHub Copilot prompts collection&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;summary&quot;&gt;Summary&lt;/h2&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;h2 id=&quot;next-steps&quot;&gt;Next Steps&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Start small&lt;/strong&gt; - Convert your three most-used prompts to &lt;code&gt;.prompt.md&lt;/code&gt; files&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Choose scope wisely&lt;/strong&gt; - Workspace prompts for teams, user prompts for personal tools&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use variables&lt;/strong&gt; - Make prompts dynamic with &lt;code&gt;${selection}&lt;/code&gt;, &lt;code&gt;${file}&lt;/code&gt;, and &lt;code&gt;${input:variableName}&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Follow naming conventions&lt;/strong&gt; - Project prefixes for workspace, &lt;code&gt;/my-...&lt;/code&gt; for user prompts&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Explore the community&lt;/strong&gt; - Check out &lt;a href=&quot;https://github.com/github/awesome-copilot/tree/main/prompts&quot;&gt;Awesome GitHub Copilot prompts&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Read the docs&lt;/strong&gt; - &lt;a href=&quot;https://code.visualstudio.com/docs/copilot/customization/prompt-files&quot;&gt;VS Code prompt files documentation&lt;/a&gt; has the latest features&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The main benefit is simple: useful instructions live with the project and can be reused without copying them into every chat.&lt;/p&gt;
</content>
    </entry>
</feed>
