Repository navigation
Releases
Releases · Minus77/dsh-prompt-optimize
v0.1.0 · 首个可用版本 / First working release
在 DeepSeek Harness 的输入框里就地改写提示词:一句话草稿变成可执行的任务说明,替换前逐行 diff 确认,替换后 9 秒内可撤销。
中文
核心流程
- 点输入框右下角的「提示词优化」,浮层在输入区上方展开,边写边流式生成
- 「替换草稿」先给逐行 diff:红色是原文、绿色是改写,确认后才写回输入框
- 写回后 9 秒内可一键撤销;同样的撤销轨道也覆盖「写回模板」和历史写回
不只是改写
- 两种模式:提示词(一句话 → 结构化任务说明)、迭代优化(保留上一版,只改你指出的地方)
- 7 个模板:角色契约、人格文件、任务简报、结构化规格、示范驱动、推理脚手架、增量改写
- 变量抽取:把「周五」「已有用户」这类片段标成
{{变量}},一键写回模板 - 本地历史与版本对比:默认关,开启后只存在本机浏览器里,可逐版对比结构变化
- 中英双语界面跟随 DSH 语言设置;模型可跟随当前模型或手动固定
安装
npm pack # 生成 minus77-dsh-prompt-optimize-0.1.0.tgz
dsh plugin --profile web add file:$PWD/minus77-dsh-prompt-optimize-0.1.0.tgz然后把 @minus77/dsh-prompt-optimize 加进该 profile 的 dsh.profile.bundles,重启 DSH。
English
Rewrite prompts right inside the DeepSeek Harness composer: a one-line draft becomes an executable task brief, reviewed as a line-by-line diff before it replaces your text, with a 9-second undo afterwards.
Flow
- Click "Prompt optimizer" in the composer; the panel opens above the input and streams the rewrite
- "Replace draft" shows a diff first — red for the original, green for the rewrite
- A 9-second undo toast follows the replacement; the same undo track covers template write-back and history restore
Beyond rewriting
- Two modes: Prompt (one line → structured task brief) and Iterate (keep the last version, change only what you name)
- Seven templates: role contract, persona file, task brief, structured spec, worked examples, reasoning scaffold, minimal diff
- Variable extraction: mark fragments like "Friday" or "existing users" as
{{variables}}and write the template back - Local-only history with version compare, off by default, never uploaded
- Bilingual UI follows the DSH locale; optionally pin a specific model
Install
npm pack
dsh plugin --profile web add file:$PWD/minus77-dsh-prompt-optimize-0.1.0.tgzAdd @minus77/dsh-prompt-optimize to dsh.profile.bundles in that profile, then restart DSH.
MIT © 2026 Lewis Wu