DEV Community

Al Amin
Al Amin

Posted on

Text Expander With Multiple Variations: Canned Replies for GitHub Issues That Don't Read Like a Bot

If you maintain a project, work in devrel or sit in a support rotation, you already know the problem a text expander with multiple variations solves. The same five questions arrive every week, and the same canned reply pasted under each of them starts to look like a bot wrote it. People notice. A reporter who gets the identical "please provide a minimal reproduction" block that was posted on the last forty issues feels processed, not helped.

This post is about a small change that made my canned replies feel human again: keeping several versions of a reply under one shortcut, and choosing the right one at the moment I need it.

The problem with one canned reply per situation

Most of us start with a flat list. One snippet for "needs repro", one for "duplicate", one for "thanks for the PR". It works for a while. Then you notice three things:

  1. The tone is wrong half the time. A first-time contributor and a long-time maintainer from another project should not get the same wording.
  2. The length is wrong the other half. Sometimes a one-liner is enough. Sometimes the person needs the full checklist.
  3. You end up with trigger sprawl. You create /repro, /repro-short, /repro-new, /repro-firm, and then forget which ones exist.

What I wanted was one shortcut per situation, with the variants living behind it.

What snippet variations are: multiple replies behind one shortcut

Snippet variations means one trigger holds several items, and each item has a label and its own content. In InsertKit, which is the tool I use for this, the flow looks like this:

  1. I type the trigger, for example /repro.
  2. Instead of inserting text immediately, a Choose variation picker opens. It shows the trigger, the snippet title, and how many options are available, with numbered items that each show a label and a preview.
  3. I move with the arrow keys, press Enter or Tab to insert the one I want, or Esc to cancel. A small counter shows where I am, like "2 / 4".

The important detail for this use case: you choose. It is not a random rotation. That matters because the goal isn't to fool anyone with shuffled wording. The goal is to pick the reply that actually fits the person and the situation, without retyping it.

How I structure variations for issues, reviews and community questions

The trick is to label variations by who or how much, not by a vague number. When the picker opens, the labels are what you scan, so make them obvious.

Issue triage: /repro

  • First-timer, friendly: thanks them for the report, explains what a minimal reproduction is, and points to the issue template.
  • Regular contributor, short: "Could you add a minimal repro? Happy to dig in once we can reproduce it."
  • Stale, closing soon: a polite note that the issue will be closed if no repro arrives, with a clear way to reopen it.
  • Can't reproduce on main: asks for version, OS and the exact steps they ran.

Code review: /review

  • Nit, non-blocking: makes it clear the comment is optional.
  • Needs tests: asks for a test that covers the change, with a note on where similar tests live.
  • Scope too large: suggests splitting the PR and offers to review the first part quickly.
  • Approve with thanks: a short, warm approval for first contributions.

Community questions: /faq-install

  • Short answer: two lines and the docs section name.
  • Long answer: full install steps for people who are clearly stuck.
  • Known issue: acknowledges the bug, explains the workaround, and says where progress is tracked.

Three shortcuts, eleven replies. I only remember /repro, /review and /faq-install; the labels do the rest.

Making a picked variation still sound like you

Variations get you most of the way. A few habits close the gap between "template" and "reply":

  • Leave one sentence open. End the template where a personal line naturally goes, then type one specific sentence about their issue.
  • Write variations in your real voice. If you'd never say "We appreciate your patience" out loud, don't save it.
  • Keep them short. Long canned replies are the ones that feel automated. Link to docs by section name instead of pasting the whole page.

Variations vs. dynamic snippets: pick one per snippet

InsertKit also has dynamic snippets on desktop: you add fields like a text input, a dropdown or a date, and typing the trigger opens a small form, then your values replace placeholders such as {{username}} in the content. That's useful when the reply is the same but the details change, like a release note with a version and a date.

A snippet can't be both at once. In the snippet editor, the Snippet variations and Dynamic switches can't be on together, so I decide per snippet:

  • Different wording or length for the same situation: variations.
  • Same wording, different values: dynamic.

For triage replies I almost always want variations, because the tone is what changes.

Where the shortcut works

Because it runs system-wide on Windows, macOS and Linux, the same /repro works in the GitHub web UI, a Discord or Slack message, an email to a user, or a text field in my editor. Variations also work in the Android app and the Chrome extension, so I can answer from my phone with the same set.

A few practical notes from using it as a developer:

  • Slash-command apps. Discord and Slack use / for their own commands. A trigger saved as /repro also works with any other prefix you enable under Settings, Snippets, Trigger Prefixes, so you can switch prefixes for those apps.
  • Pausing while coding. On desktop, F4 toggles all snippets off and on. I press it before long coding sessions so nothing expands mid-identifier.
  • Sharing with a team. Snippets can be Private or shared with your team, which helps when several people triage the same repo and you want consistent but not identical wording.

If you also answer by voice, the same app does voice typing in 100+ languages, but that's a separate topic.

How this compares with other ways of keeping canned replies

GitHub has its own saved replies, and I still use them for things that only live on GitHub. According to GitHub's docs they work in issues, pull requests and discussions, are tied to your personal account, and you can create up to 100. The limit for me was that they stay inside GitHub.

If you're looking for an espanso alternative with a GUI, it's worth knowing what espanso does here, since it's a capable open-source tool. Per espanso's docs, if several matches share one trigger it shows a selection dialog (they call it match disambiguation), it has a Choice extension for picking from a list, and a Random extension that picks one replacement at random. All of that is configured in YAML files. If you like editing config, that's a solid setup.

Approach Where it works How you pick a version How you set it up
GitHub saved replies Issues, PRs and discussions on GitHub Choose from your saved list Web settings
espanso System-wide Selection dialog for shared triggers, or random YAML config files
InsertKit variations System-wide on desktop, plus Android and Chrome Choose variation picker with labels and previews GUI snippet editor

I went the GUI route: I wanted to edit replies in a form, see labels and previews when choosing, and have the same snippets on my phone.

Setting up your first variation snippet

  1. Open InsertKit and go to Snippets, then Add Snippet.
  2. Set a trigger such as /repro and a clear title like "Needs reproduction".
  3. Turn on the Snippet variations switch.
  4. Add items, each with a label ("First-timer, friendly", "Regular, short") and the reply text.
  5. Pick a category like "Triage" so it's easy to filter later, and choose Private or Teams.
  6. Save, open any issue, and type /repro. The picker opens; choose and insert.

If you want to try it, you can download InsertKit for desktop and add your first variation snippet in a few minutes.

FAQ

What is a text expander with multiple variations?

It's a text expander where one shortcut holds several versions of a snippet. When you type the shortcut, you choose which version to insert instead of always getting the same text.

Does InsertKit pick a variation at random?

No. When you type the trigger, a Choose variation picker opens with numbered, labeled items and previews. You select one with the arrow keys and Enter or Tab, or cancel with Esc.

Can I use snippet variations for canned replies on GitHub issues?

Yes. The desktop app expands snippets system-wide, so a trigger like /repro works in GitHub's comment box in the browser, as well as in chat apps, email and editors.

Can one snippet have both variations and fill-in fields?

No. In InsertKit a snippet uses either variations or dynamic fields, not both. Use variations when the wording changes and dynamic snippets when only the details change.

Do variations work on Android?

Yes. When you type the full trigger on Android, a picker appears so you can choose which item to insert. Dynamic fill-in forms are a desktop feature.

What if an app already uses the slash key for commands?

You can enable other trigger prefixes in Settings, and a trigger saved with a slash also works with any enabled prefix. On desktop you can also press F4 to turn snippets off temporarily.

Top comments (0)