How to reuse code snippets in Copilot Chat
Reuse saved code snippets in GitHub Copilot Chat with steps, what to set up first, and options to compare before you pick a tool.
SupaKeeper is published by LunarWerx, which makes some of the tools compared here.
Save each snippet once with a clear name, then paste it into GitHub Copilot Chat when you need it again. Replace the placeholders for each project, and check the answer against your own code before you use it.
| Option | Price | Copilot insertions |
|---|---|---|
| Free plan [1] | $0 [1] | 20 a week [1] |
| Premium plan [1] | $6.99 a month [1] | Unlimited [1] |
What you need before you start
Before you reuse a code snippet, have GitHub Copilot Chat open in your editor, so you can paste or insert the snippet into the conversation.
Choose a snippet you have already run in your own project. A snippet you have never checked can send Copilot Chat in the wrong direction, and you may spend more time fixing the answer than you saved.
Give the snippet a short, plain name that says what it does, such as read a CSV file or retry a failed request. You will search for that name later, so pick words you would type yourself.
Decide where snippets will live. A notes file in your project, a shared document your team already uses, or a snippet tool can all work. What matters is that you can find the snippet in under a minute.
Look at the snippet for private values such as API keys, passwords, customer names and internal server addresses. Remove them before the snippet goes anywhere it could be shared.
It also helps to mark which parts change each time you use the snippet, such as file names, version numbers or function names, so you know what to replace.
Step by step
- Pick the snippet you want to reuse and confirm that it still works in your current project.
- Remove private values and replace them with clear placeholders, such as YOUR_API_KEY or FILE_PATH.
- Give the snippet a short name and a one-line description of what it does.
- Save it in the place you chose, next to its name and description, so the three stay together.
- When you need it, open GitHub Copilot Chat and paste the snippet in, or copy the saved text from your store into the conversation.
- Replace each placeholder with the value for this project before you send the message.
- Read the answer Copilot Chat gives you, and check that it uses the right names, file paths and versions for your code.
- If you change the snippet while you work, update the saved copy as well, so the next time you reuse it you start from the better version.
- Once a month, review your saved snippets and delete any you no longer use or that point to code you have moved past.
Placeholders do most of the work here. A snippet with clear blanks can serve several projects, while a snippet with real values in it can only serve one.
The steps stay the same whatever holds your snippets. Only the way you insert the text changes.
Tools that can do it
Copilot AI Productivity Suite is made by the team that publishes this site, and it is one option among several for this job.
It is a VS Code extension that needs VS Code 1.116.0 or newer, and it is also on Open VSX for Cursor, Windsurf and VSCodium [1]. You install it from the VS Code Marketplace as LunarWerx.copilot-suite [1].
For the Copilot Chat step, typing the product's chat tag followed by a snippet's short name puts the exact saved template into the conversation [1]. Placeholders in a snippet ask you for a value when the snippet is inserted [1]. Snippets can sit in nested folders, and you can bundle several into a group that is referenced all at once [1]. You can select several snippets and move them, delete them or insert all their references at once [1]. You can pin up to five favorite snippets to the VS Code status bar [1]. You can export snippets as JSON or make a share link, and teammates can import it [1].
If you also work in Claude Code or Codex CLI, a bundled local server makes your snippets available to them over stdio [1]. If you turn on slash command export, each snippet is written out as a slash command file for Claude Code and Codex CLI, and the files stay in sync as you edit [1]. Signing in with an account, which uses an emailed one-time code, syncs your snippets, groups and settings across your machines [1].
Other options for this job include a plain notes file in your project, a shared document your team edits, and a snippet manager from an editor marketplace. This page has no verified facts about those tools, so check each one's own pricing, platform support and privacy terms before you choose.
Things to check before you choose: while VS Code telemetry is on, the product sends anonymous usage statistics, but never snippet content [1]. Confirm that your editor version meets the minimum, and that your team's sign-in rules allow an account if you plan to sync.
Common mistakes to avoid
The most common mistake is saving a snippet that still contains a real API key, password or customer name. Strip those values before you save, and keep a placeholder in their place.
Another is pasting a snippet without replacing its placeholders. Copilot Chat then answers about the example value, not about your project.
People also save a snippet under a vague name like fix or temp, and then cannot find it again. A name that says what the task does is worth the few seconds it takes to write.
Do not trust an answer that uses names or file paths you did not provide. Check it against your code before you run anything.
A copy you improved in one project but never updated in your store will mislead you later. Update the saved version when you change it, or delete the old one.
Finally, do not store code you are not allowed to share in a shared document. Check your team's rules first.
Frequently asked questions
Can a code snippet be reused in GitHub Copilot Chat without installing anything?
Yes. You can keep the snippet in a notes file or shared document, copy it, and paste it into the chat when you need it. The main work is naming the snippet well, removing private values and replacing placeholders before you send it. If you want the saved template to go into the chat in one step, a dedicated tool can do that. Whichever way you choose, check the answer against your own code before you use it.
Is Copilot AI Productivity Suite free to use?
There is a Free plan at $0 that allows 20 Copilot insertions a week [1]. The Premium plan costs $6.99 a month and has unlimited Copilot insertions [1]. If you only reuse a few snippets each week, the Free plan may be enough [1]. If you insert snippets every day, check your weekly usage against the limit before you decide.
How to put a saved snippet into Copilot Chat?
Typing the product's chat tag followed by a snippet's short name puts the exact saved template into the conversation [1]. If the snippet has placeholders, you are asked for a value for each one when it is inserted [1]. Check the short name first, because a name you cannot recall makes the insert slower than pasting from your notes. Read the result before you run any code it suggests.
Does Copilot AI Productivity Suite work with Cursor or Windsurf?
It is a VS Code extension that needs VS Code 1.116.0 or newer, and it is also on Open VSX for Cursor, Windsurf and VSCodium [1]. You install it from the VS Code Marketplace as LunarWerx.copilot-suite [1]. Check that your editor version meets the minimum before you install, because the extension needs that version or newer.
Will snippets sync between computers?
If you sign in with an account, which uses an emailed one-time code, your snippets, groups and settings sync across your machines [1]. While VS Code telemetry is on, the product sends anonymous usage statistics, but never snippet content [1]. If you do not sign in, check how your snippets are stored before you rely on them being on every machine you use.
There is a Free plan at $0 that allows 20 Copilot insertions a week. [1]
Try Copilot AI Productivity SuiteSources
Related comparisons
- How to know when Codex usage limits reset in 2026
- See every Claude Code session in one list
- Tracking Claude usage across accounts for Claude Code users
- Track AI model releases in 2026
- AgentHydra vs ccusage in 2026: Pricing, Setup and Features
- AgentHydra vs Claude Squad in 2026
- AgentHydra vs Conductor in 2026: Pricing, Setup and Features
- Artificial Analysis vs Kalshi in 2026
- Artificial Analysis vs Manifold in 2026
- Artificial Analysis vs Polymarket in 2026