errorcode7/dsh-prompt-manager
DeepSeekHarness 的提示词管理器插件
Project Overview项目介绍
This is a natively-developed plugin built exclusively for DeepSeek Harness, focused on managing and visualizing system prompt assembly. It converts the opaque black-box system prompt string into a transparent, configurable pipeline that users can audit and adjust. Users can install it via the DSH CLI with the command dsh plugin --profile web add dsh-prompt-manager, or install it from a local source directory. It shows every individual segment that makes up the final prompt, their origins, and lets users modify the prompt via presets with full control over rendering order. It also lets users review the full assembly process for up to the most recent 20 conversation rounds.
Each preset stores a full set of prompt changes including inserts, replaces, and removes. Built-in presets are included with the plugin installation as read-only, while all user-created presets are stored in the $DSH_HOME/prompts/ directory on the user’s machine. The plugin provides a visual form-based editor for presets, so users do not need to memorize YAML syntax to create or edit rules. Each rule is broken into four clear orthogonal fields, with dropdown selections for actions and positions that prevent invalid configurations. This plugin is ideal for users who want to customize system prompt behavior, test prompt injection defenses, or fine-tune agent responses.
The plugin is released under the open source MIT license, and it leverages existing DSH extension points to work without modifying core DSH code or other installed plugins. Disabling all active presets will completely restore the original system prompt behavior with no residual changes. File changes to presets are automatically hot reloaded without needing to restart DSH. There are a few key limitations users should be aware of: the plugin will not work on prompts that have a complete: true segment, presets apply globally across all user sessions, and any preset change only takes effect starting with the next model step.
这是一个专为 DeepSeek Harness 开发的原生插件,它将原本黑盒字符串形式的系统提示词转变为可视化、可配置、可审计的组装流水线,方便用户精细化管理发给模型的提示词内容。用户可以清晰查看最终提示词由哪些片段拼接而成、各片段来源是什么,还能通过预设对任意片段做增删改操作,并精确控制渲染顺序,支持回看历史轮次的组装过程。
插件将一组提示词改动封装为一个预设,内置预设随插件分发(只读),用户自定义预设存储在 $DSH_HOME/prompts/ 目录下,支持开关切换和文件修改后的即时热重载。它提供可视化编辑器,无需记忆 YAML 语法,每条规则通过下拉选择完成配置,避免出现语法正确但无效的组合,适合需要自定义系统提示词、验证注入防御的用户。
本插件采用 MIT 许可开源,完全借助 DSH 官方提供的系统提示词扩展点实现预设改写和组装观测,不修改核心注册表,也不影响其他插件,停用预设即可完全还原原始行为。它存在一定限制:当存在 complete: true 作用域段时预设不生效,预设对所有会话全局生效,切换后从下一个模型步骤开始生效。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-prompt-manager(errorcode7/dsh-prompt-manager)
仓库:https://github.com/errorcode7/dsh-prompt-manager
本站详情页:https://www.yhbd.top/plugins/errorcode7-dsh-prompt-manager/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 10 · 最近提交 2026-08-14 · 主语言 JavaScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- 10 stars - an early-stage project星标 10,属于早期项目
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add dsh-prompt-manager
把 errorcode7/dsh-prompt-manager 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-prompt-manager
把 DeepSeek Harness 的系统提示词从"黑盒字符串"变成可视化、可配置、可审计的流水线,方便精细化管理和学习提交到服务器的提示词:
- 提示词由哪些段拼成、各段从哪来、最终发给模型的是什么,一目了然;
- 用预设(preset)对任意段做替换 / 插入 / 删除,并精确控制渲染顺序(谁在前谁在后);
- 幕布按真实模型步骤还原组装过程,支持回看历史轮次。
界面预览
设置页「提示词管理」——预设列表、开关切换与表单化规则编辑器:

全屏幕布——提示词组装流水线(来源 → 覆盖 → 插值 → 最终):

最终渲染结果展示——系统提示词渲染输出:

核心能力
围绕两个目标:管理提示词、展示提示词是怎么来的。
管理:把系统提示词当"配置"管
- 一套方案 = 一个预设文件:把一组提示词改动(新增/替换/删除某些段)存成一个预设。内置预设随插件分发(只读),你自己的存在
$DSH_HOME/prompts/。想换风格、想验证注入防御,开关一下,下一个模型步骤就生效;直接改文件也即时热重载。 - 可视化编辑,不用记 YAML:一条规则 = 动作(做什么)+ 段名(对谁做)+ 渲染位置(放哪)+ 内容,四个字段正交。动作、位置都是下拉选择,段名从现有段里挑或自己写,锚点段同样可挑——不会配出"语法对但没效果"的组合。
- 精确控制顺序:想让某段"压倒一切"就置顶,想让它跟在某段后面就选锚点,想精确插缝就给 order 数值。
展示:把"黑盒字符串"变成看得见的流水线
- 幕布:一次真实请求的提示词是怎么拼出来的——来源片段 → 预设覆盖 → 变量插值 → 最终系统提示词 → 完整请求(含消息与工具 schema),画布上一眼看到谁覆盖了谁、变量替换成了什么。
- 回看历史轮次:最近 20 轮真实组装随时翻看,能对照"当时发给模型的是什么"。
工作原理
Harness 的系统提示词本来就不是一整块文本:各插件用 systemPrompt.section({ name, order, text }) 注册分段,组装时按 order 升序渲染、空段丢弃、以空行连接。本插件借这套机制的扩展点做"预设改写"和"组装观测",不碰注册表、不动其他插件——停用预设即可完全还原:
| 我们的功能 | 借用的框架机制 | 实现方式 |
|---|---|---|
| 预设改写提示词 | 官方 system-prompt/assemble waterfall 扩展点 |
挂在 waterfall 末尾,组装完成后按激活预设的规则改写(replace / insert / remove),返回值权威、对所有作用域生效 |
| 置顶 / 精确排序 | 注册表按 order 排序的既有语义 |
任一规则带 order/top 时整体稳定升序重排;top = order: -1000,压过 harness:identity(-100)排到最前 |
| 编辑 / 切换 / 固化 | ctx.tools.register(dsh-tools) |
4 个 agent 工具:switch_prompt / list_prompts / get_prompt / save_prompt |
| 设置页管理界面 | client 模块 + ctx.slots.inject("settings.section") |
注册「提示词管理」设置 tab |
| 幕布全屏页 | webServer.register 独立路由 + loopback /api RPC |
页面每次加载实时拉取组装快照 |
| 实时快照与轮次回看 | system-prompt/assemble + agent/pre-step 事件 |
每次真实模型步骤捕获 pristine / applied / 变量 / 工具 / 用户输入,host 保留 20 轮 |
| 预览 = 最终效果 | previewPreset RPC 复用同一纯函数 |
host 用与运行时同一个 applyPreset 应用草稿并返回落位(单一事实来源),客户端不复制算法;基准取最近一次真实组装 |
| 文件热重载 | fs watch + 版本守卫 | 预设目录变更即重载;并发刷新乱序提交被丢弃 |
几个要点:
- 预览为什么不自己算:
applyPreset是纯函数,预览和运行时共用它,预测落位必然与模型实际收到的一致。 - 幕布为什么可信:快照来自真实模型步骤(含每轮变量、工具、用户输入),不是事后推算——"模型当时实际收到什么"就是什么;主图只展示生效视图,草稿通过
?draft=浮层叠加。 - 提示词预设 ≠ Agent 预设:本插件只管系统提示词内容;Agent 预设(会话的工具/插件组合)是另一套机制,两者独立,以后可以考虑加进来。
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
titanwings/distilly
YuJunZhiXue/dsh-purge
Clearailhc/clearai-dsh
yejiming/MuseAI
superdesigndev/superdesign-skill
Miaotofu01/Study-Mate