Snippets
A Snippet is a saved prompt with an optional pinned provider and model. Snippets live in their own sidebar tab and exist for the kind of prompt you reach for over and over - “summarise this in three bullets”, “review this diff for security issues”, “translate to formal Polish”.
Creating
Open the Snippets tab in the sidebar and click New snippet. Fill in a Title (up to 80 characters) and the Prompt, then Create. Optionally pick a model in the Model field so Run always starts a chat there; picking Default model at the top of the same list removes the pin. Pinning is a nice fit for prompts that genuinely need a particular model - a vision-capable model for image work, a coding-tuned model for review.
Enter in the title moves on to the prompt, or saves once both are filled in; Ctrl + Enter in the prompt saves. Under the prompt, the editor shows what its placeholders will do. Closing the editor with unsaved changes asks before discarding them, and an unsaved draft survives the app lock. Editing a snippet works the same way, with Save.
Looking for ideas? The Prompt gallery link at the top of the Snippets page opens a collection of ready-made prompts at loach.dev/prompt-gallery in your browser.
Running
Hit Run on a Snippet to open a fresh chat (outside any Space, with the pinned model if there is one) and put the prompt in the composer. You can edit it before sending - Snippets are a starting point, not a one-shot button. Run in Space in a tile’s … menu does the same in a new chat inside the Space you pick, so it gets the Space’s instructions, sources and memory; a model pinned on the snippet still wins over the Space’s default.
When the snippet has placeholders to fill in, their dialog comes first, and the chat is created only once you run it - cancel, and no empty chat is left behind. There are three ways to run one:
- From the Snippets page - the Run button on a tile, or Run or Run in Space in its
…menu. - From search - press Ctrl + K, type part of the title or prompt (add
in:snippetsto search only Snippets) and pick the result. It runs just like Run on the Snippets page. See Search. - With
/snippet <name>- puts the snippet into the composer of the chat you’re in, without opening a new chat or changing its model./list snippetslists them. See Slash commands.
Save a prompt you already sent
Each message you sent has a … menu just below it (hover the message, or Tab to it). Pick Save as Snippet and Loach opens the editor with that text filled in, ready for a title. The action is on your own messages only - not on assistant replies, and not in the right-click menu.
The Snippets page
The Snippets tab shows a tile grid, most recently created or edited first. Each tile shows the start of the prompt, the pinned model (or Default model) and when it was last changed. Click a tile to edit it; its … menu has Run, Run in Space, Edit and Delete. Deleting asks for confirmation and can’t be undone. A Search snippets box above the grid filters the tiles by title or prompt text.
Snippet variables
Snippet bodies can contain {{PLACEHOLDER}} variables that get filled in when the snippet runs. A placeholder name is uppercase letters, digits and underscores inside double braces; anything else in braces, such as {{name}}, is left as typed.
- Static variables - reusable values you define once in the Variables panel above the snippet grid (for example
{{TEAM_NAME}}→ “Engineering”). They’re substituted automatically every time a snippet that uses them runs. - Built-in variables -
{{USER_NAME}}and the{{CURRENT_*}}date and time template variables are filled in at the moment the snippet runs, so the composer receives the actual name and date. The Variables panel lists them under Built in - filled in automatically, each with its value right now;{{USER_NAME}}comes from your name in Settings → General. - Prompt-on-use placeholders - any placeholder still unresolved after that opens a small fill-in dialog when you run the snippet. Your answers are remembered per snippet for next time.
The snippet editor shows each placeholder in the prompt under the field, marked built-in, saved value (a static variable) or asked when run. A name that doesn’t fit the rule, such as {{topic}}, is flagged as one that won’t be filled in.
Defining static variables
In the Variables panel, click New and fill in a Key, a Value and an optional Description, then Create (Save when editing); Enter in any field does the same. Closing the dialog with unsaved changes asks first. Keys are converted to uppercase as you type; they can use letters, digits and underscores, can’t start with a digit, and can be up to 64 characters. The built-in names (USER_NAME and the CURRENT_* ones) are reserved. Use the pencil and trash icons on a row to edit or delete a variable.
A value can itself contain other placeholders, which are expanded in turn; a loop (a variable that ends up referring to itself) is left as literal text. An empty value substitutes nothing rather than prompting. Deleting a variable turns its placeholders into prompt-on-use ones until you define it again.
Filling in placeholders
When a snippet still has placeholders after the static pass, the Fill in snippet variables dialog lists one field per placeholder, in the order they appear. Every field needs a value. Enter moves to the next field and, on the last one, runs the snippet - as does Run snippet. Cancel runs nothing: no chat is created, and with /snippet the composer stays as it was. Values you’ve typed survive the app lock.