lizhecome/deepseek-harness-prompt-optimizer

Bundle捆绑包 Native原生 ⭐ 3 MIT Prompts & Skills提示词与技能

面向DeepSeek Harness的LLM驱动提示优化套件

Project Overview项目介绍

This is a native installable profile bundle built exclusively for DeepSeek Harness that adds prompt optimization capability via an auxiliary LLM call. It integrates with the DSH Web UI by adding a sparkle button next to the default send button, and it hooks into DSH’s agent/pre-step waterfall to optimize direct user messages automatically without modifying the core agent loop. To install it, you first clone the repository to your local machine, then run the dsh plugin --profile web add . command in your terminal, and it requires DeepSeek Harness 0.1.0-rc6 or later to work correctly. If you prefer automatic one-shot optimization, you can use the headless profile instead of web during installation.

When using the web UI, you can click the sparkle button to run an optimization request on your current draft before sending it. If you edit the draft while optimization is running, the system will preserve your current draft and discard the optimization result to avoid unwanted changes. For automatic mode, it only optimizes direct text-only user messages that meet the minimum character threshold you configure, leaving short prompts, tool results, images, and other content unchanged. This tool is ideal for DSH users who want to improve the quality of their prompts before sending them to the agent.

This package is released under the permissive MIT open source license, and it supports extensive configuration for your optimization workflow, including provider, model, max tokens, minimum character threshold, delivery mode, and failure handling. It has a few known limitations: it will not optimize multimodal or mixed-block messages, and semantic optimization can occasionally distort your original intent, so it is recommended to use the append delivery mode when auditability is important. Each optimization adds one independent LLM request, so you should account for extra token cost when using this plugin regularly, and be aware that auxiliary optimization requests are not stored as separate model events.

这是一个专为DeepSeek Harness开发的原生配置文件包,为DSH添加提示词优化功能。它会在Web界面的发送按钮旁新增一个闪烁优化按钮,也能够在代理执行步骤前自动优化用户输入的消息,不会修改原有的代理工作循环,要求DSH版本不低于0.1.0-rc6才可正常安装使用。

用户可以在Web界面点击优化按钮,将未发送的草稿替换为优化后的提示词,如果优化过程中用户编辑了草稿,会保留当前草稿不应用优化结果。也可开启自动优化模式,对超过指定长度的纯文本用户消息自动优化,适合所有需要提升提示词质量、减少歧义冗余的DSH日常用户。

这个插件采用MIT许可证开源,支持自定义配置优化使用的服务商、模型、最大token数、优化阈值等参数,存在一定局限性:不支持多模态消息优化,优化结果仍可能曲解用户意图,辅助优化请求不会单独存储为模型事件,可通过DSH官方命令行快速完成安装卸载。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 3 stars - very few users, little community feedback星标只有 3,几乎没人在用,遇到问题缺少社区反馈
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 github:lizhecome/deepseek-harness-prompt-optimizer

把 lizhecome/deepseek-harness-prompt-optimizer 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

DeepSeek Harness Prompt Optimizer

An installable DeepSeek Harness profile bundle that uses an auxiliary LLM call to improve prompts. The Web UI adds a sparkle button beside Send, and the host plugin can also optimize direct user messages on the cooperative agent/pre-step waterfall. It does not patch the agent loop.

中文说明

Install

Requires DeepSeek Harness 0.1.0-rc.6 or later.

gh repo clone lizhecome/deepseek-harness-prompt-optimizer
cd deepseek-harness-prompt-optimizer
dsh plugin --profile web add --ignore-workspace-root-check .

Use headless instead of web to enable automatic optimization for one-shot tasks. The composer button is available only in the web profile. DeepSeek Harness anchors add . to the invoking checkout before pnpm switches to the profile directory. The package manifest declares a dsh.bundle patch and a Web client entry, so installation mounts the host optimizer, invariant companion, and composer control automatically.

To remove it:

dsh plugin --profile web remove --ignore-workspace-root-check @lizhecome/dsh-prompt-optimizer

Behavior

Composer button

The Web UI contributes a sparkle button to conversation.input.right, immediately before the normal send control. It is disabled while the draft is blank or the composer is busy. Clicking it runs one auxiliary request and replaces the unsent draft with the rewritten text.

The button compares both the draft revision and exact text before applying the response. If the user edits while optimization is running, the response is not applied and the current draft is preserved. Transport, routing, and model failures also preserve the draft and place the failure in the button's accessible status and tooltip.

The host exposes the same operation as /optimize-prompt <prompt>. The button marks its successful result for a one-time exact-match bypass: sending that unchanged result does not trigger a second automatic optimization. Editing the result removes that match, so the normal automatic policy applies when it is sent.

Automatic optimization

The listener delegates first, then inspects the final PreStepDecision. It optimizes only direct-user messages whose blocks are all text and whose trimmed length reaches minChars. Plugin context, tool results, goal rounds, relays, images, and short prompts pass through unchanged.

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev oh_my_deepseek_harness 下一个 Next dsh-schedule →