😇 Confession: I started planning this post over a month ago, got sidetracked this weekend (at least four times), half-wrote a completely different post, and only finished this one at the last minute after I started writing from the end. That’s just how it goes in my head - always at full throttle, but rarely in a straight line. 🌪️
So grab your favorite over-caffeinated iced drink (mine: grande, iced midnight, extra espresso, real vanilla cream - liquid chaos in a cup ☕️❣️) and settle in. Here’s everything I know about Copilot’s reusable prompts - Part 1.
Why This Isn’t Another Wall of Copilot Prompts 🧱
Have you ever searched for best practices when it comes to Copilot? You usually end up with either a block that can't even be considered a whole sentence on it's own OR the wall is so gigantic you don't even know where to start reading?
You're really curious though - so you dive in at the first place you see, and then last about 30 seconds... About the time all those AI lines start to blur together you think, “There’s no way anyone actually does all this in real life?”
Honestly, I’m probably that person who wrote half the wall (or more) to begin with! Good news for you though, is that:
- I'm not going to do that do you now, and
- I do a great job of finding out all the things that absolutely will not work no matter what you try (so you don't have to!) ☺️
Here's my "boiled-down-to basics" version of GitHub Copilot's Reusable (and still experimental) Prompts.
✨📁 Copilot’s File Types, Explained
Ever wonder how Copilot instructions and prompts show up in real life? Here’s what it actually looks like in a real project:
► .github/copilot-instructions.md
— This is your repo’s “how to act” guide for Copilot and is always in context. It sets the baseline behavior for your project and tells Copilot what to expect from your workflow and contributors.
Using what you know about our current release system, write a git command to view the total number of commits pushed to main since the last tagged version.
► .github/instructions/secure-coding-principles.instruction.md
— Think of this as a reusable, specialized playbook. Use these for rules or guidelines you want Copilot to follow everywhere, or for specific situations - like always doing a security review, or making sure React code has matching tests.
With rules defined in #secure-coding-principles.instruction.md, perform a thorough code review of all staged changes. When you are finished, post a new pull request review with all your comments or suggestions for changes to meet minimum guidelines defined by this repo.
---
With everything you know from the #rules-for-react.instruction.md, build a new component for the frontend along with unit and integration tests.
► .github/prompts/something-for-copilot-to-do-regularly.prompt.md
— This is where you automate repeatable workflows. It’s a set of step-by-step instructions Copilot can follow whenever you trigger it with a slash command in chat.
/generate-conventional-commit using only staged changes for JIRA-1234.
🐉 Who needs to memorize Vim macros or survive Emacs keybindings when you can just hit “/” in the chat and watch Copilot handle the rest?
Quick Review 📕
💡 Not on VS Code (or Insiders) yet? Now’s your chance to give it a real shot - features like this hit VS Code Insiders months before anywhere else. For now, it’s the best way to test reusable prompts hands-on, so go ahead and grab it if you haven’t already.
I know I’ve written a lot about models - like in AI Coding with GitHub Copilot and Troubleshooting Production with GitHub Copilot - but I haven’t spent much time on chat modes.
💎 And no, not the same as "Custom Chat Modes" (which is also super cool - I promise I’ll cover those soon!).
Before we jump in, let’s hit pause and rewind. It’s time for a quick, back-to-basics look at what actually matters when deciding what work you want Copilot to do - and how much control you want over how it gets done.
Chat Modes at a Glance 🎛️
Here’s where things get interesting: Copilot doesn’t just work in one “mode” - it’s got a whole range, from chill Q&A to full-on automation beast. Pick your mode wisely!
Mode | What It Does | When To Use | Power Level |
---|---|---|---|
Ask | Answers questions, suggests ideas - your personal Stack Overflow, minus the snark. | Research, quick advice, copy snippets | 🟢 Low |
Edit | Changes code in-place, optimized for speed—think “find and replace,” but actually smart. | Step-by-step or explicit code changes | 🟡 Medium |
Agent | Multi-step, can use tools, context, and reasoning. Give it instructions and let it run wild (within reason). | Automation, complex flows, integrations | 🔴 High |
Custom | Depends on it's goal from the user... so many choices! | Automation, complex flows, integrations, team magic | 💜 Extreme |
🦄 Let me know how curious you are about these custom chat modes - I'm still experimenting and figuring out what they can (and can't) do. If you’ve got questions, wild theories, or even better, your own examples... drop them in the comments! 🚦💬
The Gist of Models 🦾
✨ I know, I reuse this table a lot - but hey, good models deserve a callback.
Model | Best For | Notes & Quirks |
---|---|---|
GPT-4.1, GPT-4o | Creative debugging, “Where do I start?” | Needs hand-holding on long tasks. Free for most users. |
o3/4-mini, Gemini | Pattern-matching, log sleuthing | Great for “explain these logs,” not for wild creative leaps. |
Gemini 2.5 | Tedious but simple, long-form tasks | Decent at bulk work, rarely surprises (good or bad). |
Claude Sonnet 3.5–4 | Root cause, deep logic, “why did this happen?” | Loves complex analysis but rarely offers alternate approaches unless you nudge. |
Tools for your AI 🪛
VS Code comes with several tools for GitHub Copilot already built in, but you can always add more via extensions or MCP servers. There's not much to cover here after you know they exist and where to find them. Unless you're making friends with every MCP server and already met your "128 selected tool" limit, there's not much reason to mess with them much. Just make sure they're all selected and available for Copilot to execute when prompted and you're set.
Here's my personal top-5 built-in tools, that somehow always manage to sneak into any reusable prompt I write:
-
#changes
gives Copilot the ability to see a git diff for your workspace -
#codebase
all-season access to your repo (and sometimes should be more targeted, but when in doubt this is a good start!) -
#runTests
is just what it sounds like and let's Copilot execute any part or all of your test suite -
#runInTerminal
is the basic run-of-the-mill access to Copilot's very own integrated terminal (separate from yours!) -
#editFiles
is the tool Copilot needs to make any changes within your repo. If you're expecting Agent Mode to start implementing features, you're going to need this!
💡 ProTip: In Agent mode, click the wrench (Configure Tools) at the bottom of Copilot Chat to pick exactly which tools Copilot can use. If you share prompts, call out any non-default tools - just like listing dependencies.
Bonus Tools — More Power, More Fun 🛠️✨🎉
Some of my favorite extras come from the Atlassian MCP-Remote server, but if you have the ability to install GitHub Apps then check out Rovo, too:
-
#getJiraIssue
lets Copilot pull all the details for a story. -
#addCommentToJiraIssue
posts your summary as you (so add your RAI disclaimer!). -
#createConfluencePage
&#updateConfluencePage
— still figuring out the best way to teach Copilot “Atlassian style”.confluence
syntax (it’s a work in progress 🫠). -
#mermaid-diagram-validator
checks your diagrams with the official Mermaid extension. -
#copilotCodingAgent
— brand new, and I can’t wait to see what it can do! Assign it a task and let it work while you keep pairing in Copilot Chat.
💎 Coding Agent has serious limitations, so check the docs before letting it run wild!
📨 Commit Message Magic: One Slash to Rule Them All
Here's an example of a basic, yet realistic prompt that generates a commit message. No Jira, no testing, no terminal magic - just one clear task. This is a great way to test prompt building before layering on more steps or complicated conditional logic.
In VS Code, paste this directly into the prompts folder shown or open the command palette and search for Chat: New Prompt File...
and then choose whether to store the prompt at the repo-level in .github/prompts
or globally for use across all of your workspaces.
Prompt: .github/prompts/generate-commit-message.prompt.md
---
mode: ask
description: |
This prompt is used to generate a commit message based on changes staged in a Git repository.
tools:
- changes
---
# Generate Commit Changes Prompt
Review all code currently staged and use your chat history, if available, to populate details about the changes. Use the information to generate a concise and informative commit message. It should follow conventional commit standards with a clear type, subject, and bullet points for details.
⚠️ UPDATE: The syntax posted above is actually the second version available in VS Code and last night's update seems to have switched it back to the original. So, if you try to load this and see syntax errors try this instead:
description
: 'Enter the description in single quotes on the same line and without the|
'tools
: ['changes'] <!-- Define in an array instead of a list, with each tool name as a string -->
Executing Reusable Prompts
Once you have this (or any other) reusable prompt stored in VS Code, use a slash command to invoke it in the chat interface. Given the above example, you'd prompt Copilot in the chat with something like
/generate-commit-message consider only staged files and generate a new commit that starts with a unique emoji
Considering all the rules I have set up elsewhere outside of that reusable prompt, I still ended up with a nice clean conventional commit (for the most part).
🦄 chore: update commit message generation prompt for clarity
• Instructs to review all staged code and use chat history for context
• Requires concise, informative commit messages following conventional commit standards
• Specifies format: clear type, subject, and bullet points for details
• Ensures only staged changes are considered for commit message generation 😊👍
🦄 For this example, I actually tried to make Copilot break my own repo-rules - total role reversal. Turns out, it’s stubborn! Even when I begged it to ignore my instructions and forget conventional commit standards, it flat-out refused. 🤣
Let’s Break It Down: How a Reusable Prompt Really Works ⚡️
Every reusable prompt has exactly two parts:
YAML frontmatter: Everything between the first
---
(at the top) and the next---
marks your frontmatter.Prompt instructions: The main body - break your instructions into small, reusable chunks, just like you would with code.
💡 ProTip: The more targeted your prompts and instructions, the easier they are to reuse, test, and share later. Treat them like mini code modules - precise, focused, and easy to swap out.
🧾 YAML Frontmatter: Your Prompt’s Control Panel
mode: We’re using
ask
mode because we only need Copilot to generate text, not generate code or run tests.description: A quick, human-friendly summary of what this prompt does. Great for organizing and sanity-checking as your prompt list grows.
tools: List all the tools Copilot can use when running this prompt. Keep it tight - less is usually more!
model: Enter the name of a model exactly as it appears in the chat model dropdown or leave this out if you want to try different ones or let the user pick. If you do specify one, Copilot will always use that model for this prompt and nothing else.
🦄 Frontmatter isn’t actually required for your reusable prompt to work! If you leave out
mode
ormodel
, Copilot just uses whatever settings the user picked in the chat. Nodescription
? No big deal (but it helps keep things organized). The only one to really watch: skippingtools
— sometimes you’ll be fine, sometimes Copilot will get stuck, all depending on the user’s VS Code setup.
💬 Reusable-Style Prompt Engineering: Speak Human, Think Modular
The second section in your .github/prompts/reusable-prompt.prompt.md
file is where you write out, in natural language, the exact instructions Copilot should follow - just like you would if you were prompting it in chat. You can reference #tools
, #files
, @participants
, other /prompts
, and #instructions
right here. If you ever catch yourself copying and pasting instructions between prompts, that’s your signal: split it up, give things a clear name, and keep each prompt focused on a single, repeatable workflow.
The best reusable prompts are modular and specific, not giant copy-paste walls. If you can automate it or break it down into smaller pieces, do it! That way, you (and your team) can mix, match, and remix prompts to build bigger automations down the line - without losing your mind or having to decode a mysterious black box later.
When you’re practicing on your own, start small and build up - tweak one thing at a time and watch how even tiny prompt or context changes can totally flip the results. Get curious about how each model handles the same task (some will surprise you, some... not so much).
💎 I’m running out of space (and you’re probably out of caffeine already), so I’ll wrap it here. Next time, I’ll dig up a few wild, more advanced prompts and show you what Copilot will - and absolutely will NOT - do without super-clear instructions. Stay tuned!
Don’t let me have all the fun!
Got questions, memes, or an obscure reaction GIF? Drop them below or just smash ❤️ - I’m here for it all! If you want to experiment before next week, search GitHub for awesome-copilot
and you’ll find a ton of shareable repos.
🦄 Curiosity getting to you yet? My own
awesome-github-copilot
repo is technically started (barely), but it does exist - and my super-secret Copilot Chat Extension is officially back in progress! 🤫
And hey, if you just want to grab something cool, copy it, and run wild every once in a while? Go for it! Don’t forget to share your best finds below. 😜
🛡️ Authored by Me (with an AI Sidekick)
Every word here is 100% my own - AI just played backup and fetched some ideas. We both double-check for bias, I do my own fact-checking, and call out anything that feels off. If you spot something wild (or wildly wrong), tell me! AI makes mistakes, but so do humans - especially if we’ve had too much coffee (or not enough sleep!).