Overview
Snippets store short commands, prompt fragments, checks, and reusable input templates. A Snippet can be inserted into staged input for editing or sent directly when the saved text is already safe and complete.
Global Snippets cover commands used across Hosts, while Project Snippets keep repository-specific paths, package filters, prompts, and operational checks from mixing with the global library.
When to use it
- Save frequent Git commands for status, diffs, recent history, branch inspection, and staged-change review.
- Reuse focused test, build, package-filter, log-tail, process-inspection, and health-check commands inside an open terminal.
- Keep prompt templates for code review, bug investigation, test generation, refactoring, or implementation planning.
- Store Project-specific commands containing repository paths, workspace names, package targets, or service identifiers.
- Insert a complex command into staged input, adjust arguments for the current task, and review it before execution.
Reuse commands inside an active terminal
Keep Git diff, focused tests, log filters, process checks, and package commands ready while an agent session is already open, without leaving the terminal to find notes.
Build a prompt library
Save recurring review, debugging, refactoring, test-generation, and planning instructions. Insert one into staged input, add the current file or constraint, then send the tailored prompt.
Keep repository details private to a Project
Store paths, workspace filters, package names, service identifiers, and environment-specific checks as Project Snippets so they do not clutter or confuse the global library.
How it works
- Create a global or Project-specific Snippet.
- Give it a recognizable name and save the command or prompt fragment.
- Insert it into staged input or send it directly from the terminal.
Practical guidance
Use Snippets for short input inside an existing session and Actions for complete repeatable tasks. Never store passwords, tokens, or private keys in a Snippet.