snippet-expander
在终端中运行以下命令:
dsh plugin install JohnXu22786/snippet-expander
将以下提示词粘贴到 DeepSeek Harness 对话框中:
打开 DeepSeek Harness 插件管理页面,安装地址填写开源项目 https://github.com/JohnXu22786/snippet-expander 对应的命令 dsh plugin install JohnXu22786/snippet-expander 即可启用 Steno 缩写展开插件。
插件介绍
When you find yourself retyping long, structurally similar instructions in dsh over and over, every keystroke is friction and every missed detail costs a round-trip. snippet-expander (Steno) turns those high-frequency prompts into YAML snippet libraries: type a short #tag in your message and the message.beforeSend hook expands it to the full configured text before it leaves your client — write once, trigger many times.
The feature set covers the cases that matter in daily use. Load any number of YAML libraries with precedence order and cross-library duplicate warnings; attach multiple aliases to a single snippet; inject runtime values via {{name}} and {{name:default}} placeholders supplied by the host; and compose snippets recursively by referencing other #tags, guarded by built-in loop detection, a depth limit, and a total-expansion cap. Tags inside fenced or inline code blocks are never expanded, so technical writing stays intact.
It is built for two audiences: individual dsh power users who want to collapse a wall of boilerplate into a two-or-three-character trigger word, and small teams that drop a shared library into the project-level .dsh/steno/ directory so everyone calls the same canonical text. There is no external service to run and the only runtime dependency is js-yaml.
使用场景
- 在 dsh 对话中用 #tag 一键触发预配置指令
- 团队共享 YAML 片段库统一常用提示词格式
- 通过变量占位符动态生成带上下文的出站消息
适合人员
- 反复输入同一段长指令的 dsh 高频用户
- 需要统一团队提示词规范的工程团队
- 偏好本地轻量插件、无外部服务的独立开发者