wuchubuzai2018/dsh-ai-prompt-optimizer
DeepSeek Harness(DSH)Web 聊天页面的提示词优化插件,帮助你把粗略想法整理成更清晰、完整、可直接发送给 AI 的提示词
Project Overview项目介绍
This is a native plugin built exclusively for the DeepSeek Harness (DSH) web chat interface. It adds a dedicated "✨ AI Optimize" button right next to the send button in the message input box, designed to help users turn rough unstructured ideas into clear, complete prompts that are ready to send directly to an AI model. It addresses a common pain point where hastily written prompts often miss key details like task goals, background context, constraints, or desired output formats, which often leads to inconsistent or unhelpful AI responses from your configured model.
To use the plugin, you first open the DSH web chat page, type your rough original request into the input box, then click the AI Optimize button next to the send button and wait for the optimization process to complete. Once the optimized prompt is generated, it will be filled back into your input box, and you can review, edit, or adjust it before you send it to the AI. The plugin retains your original intent, language, and known facts while adding missing details like task goals, constraints, and output formats, making it useful for any DSH user that wants to improve prompt quality quickly.
This plugin requires DSH Web version 0.1.0-rc.6 or newer, and you must have a working default model configured in your DSH instance to use it. If you install from source code, you will need Node.js 22 or newer and the pnpm package manager. It is released under the open source MIT license, and note that the optimized prompt will replace your original draft in the input box, so you should save a copy of your original text if you need to keep it. Installation can be done via npm, local source, or GitHub, and uninstallation only requires a single DSH CLI command.
这是一款专门为 DeepSeek Harness(DSH)网页聊天页面开发的原生插件,它会在输入框的发送按钮旁添加一个“✨ AI 优化”按钮,帮助用户把粗略的想法整理成更清晰、完整、可直接发送给 AI 的提示词。它解决了临时输入的提示词常缺少目标、背景、约束或期望输出格式,进而导致模型回答不稳定的常见问题。
用户使用时,先打开DSH网页聊天页面,在输入框写下原始需求,点击发送按钮旁的AI优化按钮,等待优化完成后,检查回填到输入框的优化结果,还可以继续修改内容,确认后再发送给AI。它会保留用户原始意图、语言和已知事实,补齐任务目标、上下文、约束、步骤和输出格式,适合所有需要快速整理提示词结构的DSH用户使用。
该插件要求DSH Web版本不低于0.1.0-rc.6,且DSH中已经配置好可用的默认模型,从源码安装需要Node.js 22+和pnpm。它采用MIT许可证开源,优化结果会替换输入框原有草稿,如果原文重要需要提前自行复制保存。安装可通过npm、本地源码或GitHub三种方式完成,卸载也只需要一条DSH命令。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-ai-prompt-optimizer(wuchubuzai2018/dsh-ai-prompt-optimizer)
仓库:https://github.com/wuchubuzai2018/dsh-ai-prompt-optimizer
本站详情页:https://www.yhbd.top/plugins/wuchubuzai2018-dsh-ai-prompt-optimizer/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 5 · 最近提交 2026-08-16 · 主语言 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 更稳。
- Only 5 stars - very few users, little community feedback星标只有 5,几乎没人在用,遇到问题缺少社区反馈
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-ai-prompt-optimizer
把 wuchubuzai2018/dsh-ai-prompt-optimizer 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
DSH AI Prompt Optimizer
一个用于 DeepSeek Harness(DSH)Web 聊天页面的提示词优化插件。它会在输入框发送按钮旁添加 “✨ AI 优化”,帮助你把粗略想法整理成更清晰、完整、可直接发送给 AI 的提示词。
解决什么问题
临时输入的提示词常常会缺少目标、背景、约束或期望输出格式,导致模型回答不稳定。这个插件让你在发送前一键优化当前草稿:
- 保留原始意图、语言和已知事实;
- 补齐任务目标、上下文、约束、步骤和输出格式;
- 信息不足时列出最少且关键的待确认项;
- 优化结果只回填到输入框,不会自动发送,最终内容仍由你确认。
功能特性
- 一键优化:读取当前输入框草稿并生成优化版本;
- 复用当前模型:使用 DSH 已配置的默认模型,不需要单独配置 API Key;
- 发送前确认:优化后不会自动提交,你可以继续编辑;
- 过程可见:请求期间按钮显示“优化中…”;
- 失败可感知:输入为空、模型不可用或调用失败时,会弹出明确提示;
- 更广模型兼容性:只发送基础模型请求字段,避免部分 Provider 不支持可选参数而失败。
效果

环境要求
- DeepSeek Harness Web
0.1.0-rc.6; - DSH 中已经配置可用的默认模型;
- 从源码安装时需要 Node.js 22+ 和 pnpm。
如果系统通过 Corepack 管理 pnpm,可以先执行:
corepack enable pnpm
安装
方式一:从 npm 安装(发布后)
dsh plugin --profile web add dsh-ai-prompt-optimizer
dsh web
方式二:从本地源码安装
git clone <你的仓库地址>
cd dsh-ai-prompt-optimizer
pnpm install
dsh plugin --profile web add .
dsh web
也可以在其他目录中直接指定仓库路径:
dsh plugin --profile web add /path/to/dsh-ai-prompt-optimizer
dsh web
方式三:从 GitHub 安装
dsh plugin --profile web add github:<owner>/<repo>
dsh web
如果 pnpm 阻止 Git 依赖执行构建脚本,请按终端提示,把对应 key 加入 DSH profile 目录下 pnpm-workspace.yaml 的 allowBuilds,然后重新执行安装命令。
使用方法
- 打开 DSH Web 聊天页面;
- 在输入框中写下原始需求,例如“帮我写一个周报”;
- 点击发送按钮旁的 “✨ AI 优化”;
- 等待优化完成;
- 检查回填后的提示词,可以继续修改,确认后再发送。
注意:优化结果会替换当前输入框草稿。如果原文很重要,请先复制保存。
卸载
dsh plugin --profile web remove dsh-ai-prompt-optimizer
dsh web
常见问题
点击按钮后提示“当前没有可用的模型配置”
请先在 DSH 的模型设置中配置并选择一个可用模型,然后重试。
安装后没有看到按钮
请确认:
- 插件安装到了
webprofile; - 安装后已经重启
dsh web; - 当前页面是聊天会话页面;
- 执行
dsh --profile web --dump-config时能看到ai-prompt-optimizer。
优化结果不理想
插件会尽量保留你的原始意图,但原始信息过少时,模型只能补充有限的结构。建议至少写清楚“要做什么、给谁看、希望输出什么形式”。
开发文档
面向插件开发者和维护者的技术文档位于 docs/:
- 技术方案设计:本插件的功能拆解、架构、数据流、打包和安装设计;
- 如何开发 JavaScript 版本插件:动态 JS 插件与可安装 JS 插件的开发方式;
- 如何开发 TypeScript 版本插件:可安装 TS/TSX 插件的完整工程化流程;
- 接口端到端验证手册:新增或修改 Host/Client 接口后的隔离环境验证步骤;
- 发布策略:为什么本仓库将 lib 构建产物提交进 Git,以及发布前的检查清单。
贡献
提交改动前请至少运行:
pnpm run typecheck
pnpm run pack:check
titanwings/distilly
YuJunZhiXue/dsh-purge
Clearailhc/clearai-dsh
yejiming/MuseAI
superdesigndev/superdesign-skill
Miaotofu01/Study-Mate