Skip to content
Back to search

dsh-ai-prompt-optimizer

DeepSeek Harness(DSH)Web 聊天页面的提示词优化插件,帮助你把粗略想法整理成更清晰、完整、可直接发送给 AI 的提示词

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/wuchubuzai2018--dsh-ai-prompt-optimizer/badge.svg)](/listings/wuchubuzai2018--dsh-ai-prompt-optimizer)

HTML

<a href="/listings/wuchubuzai2018--dsh-ai-prompt-optimizer"><img src="/api/listings/wuchubuzai2018--dsh-ai-prompt-optimizer/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

方式一:从 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`,然后重新执行安装命令。

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 131 lines
  1. # DSH AI Prompt Optimizer
  2. 一个用于 DeepSeek Harness(DSH)Web 聊天页面的提示词优化插件。它会在输入框发送按钮旁添加 **“✨ AI 优化”**,帮助你把粗略想法整理成更清晰、完整、可直接发送给 AI 的提示词。
  3. ## 解决什么问题
  4. 临时输入的提示词常常会缺少目标、背景、约束或期望输出格式,导致模型回答不稳定。这个插件让你在发送前一键优化当前草稿:
  5. - 保留原始意图、语言和已知事实;
  6. - 补齐任务目标、上下文、约束、步骤和输出格式;
  7. - 信息不足时列出最少且关键的待确认项;
  8. - 优化结果只回填到输入框,不会自动发送,最终内容仍由你确认。
  9. ## 功能特性
  10. - **一键优化**:读取当前输入框草稿并生成优化版本;
  11. - **复用当前模型**:使用 DSH 已配置的默认模型,不需要单独配置 API Key;
  12. - **发送前确认**:优化后不会自动提交,你可以继续编辑;
  13. - **过程可见**:请求期间按钮显示“优化中…”;
  14. - **失败可感知**:输入为空、模型不可用或调用失败时,会弹出明确提示;
  15. - **更广模型兼容性**:只发送基础模型请求字段,避免部分 Provider 不支持可选参数而失败。
  16. ## 效果
  17. ![UI截图](ui/ui1.png)
  18. ## 环境要求
  19. - DeepSeek Harness Web `0.1.0-rc.6`;
  20. - DSH 中已经配置可用的默认模型;
  21. - 从源码安装时需要 Node.js 22+ 和 pnpm。
  22. 如果系统通过 Corepack 管理 pnpm,可以先执行:
  23. ```bash
  24. corepack enable pnpm
  25. ```
  26. ## 安装
  27. ### 方式一:从 npm 安装(发布后)
  28. ```bash
  29. dsh plugin --profile web add dsh-ai-prompt-optimizer
  30. dsh web
  31. ```
  32. ### 方式二:从本地源码安装
  33. ```bash
  34. git clone <你的仓库地址>
  35. cd dsh-ai-prompt-optimizer
  36. pnpm install
  37. dsh plugin --profile web add .
  38. dsh web
  39. ```
  40. 也可以在其他目录中直接指定仓库路径:
  41. ```bash
  42. dsh plugin --profile web add /path/to/dsh-ai-prompt-optimizer
  43. dsh web
  44. ```
  45. ### 方式三:从 GitHub 安装
  46. ```bash
  47. dsh plugin --profile web add github:<owner>/<repo>
  48. dsh web
  49. ```
  50. 如果 pnpm 阻止 Git 依赖执行构建脚本,请按终端提示,把对应 key 加入 DSH profile 目录下 `pnpm-workspace.yaml` 的 `allowBuilds`,然后重新执行安装命令。
  51. ## 使用方法
  52. 1. 打开 DSH Web 聊天页面;
  53. 2. 在输入框中写下原始需求,例如“帮我写一个周报”;
  54. 3. 点击发送按钮旁的 **“✨ AI 优化”**;
  55. 4. 等待优化完成;
  56. 5. 检查回填后的提示词,可以继续修改,确认后再发送。
  57. > 注意:优化结果会替换当前输入框草稿。如果原文很重要,请先复制保存。
  58. ## 卸载
  59. ```bash
  60. dsh plugin --profile web remove dsh-ai-prompt-optimizer
  61. dsh web
  62. ```
  63. ## 常见问题
  64. ### 点击按钮后提示“当前没有可用的模型配置”
  65. 请先在 DSH 的模型设置中配置并选择一个可用模型,然后重试。
  66. ### 安装后没有看到按钮
  67. 请确认:
  68. 1. 插件安装到了 `web` profile;
  69. 2. 安装后已经重启 `dsh web`;
  70. 3. 当前页面是聊天会话页面;
  71. 4. 执行 `dsh --profile web --dump-config` 时能看到 `ai-prompt-optimizer`。
  72. ### 优化结果不理想
  73. 插件会尽量保留你的原始意图,但原始信息过少时,模型只能补充有限的结构。建议至少写清楚“要做什么、给谁看、希望输出什么形式”。
  74. ## 开发文档
  75. 面向插件开发者和维护者的技术文档位于 `docs/`:
  76. - [技术方案设计](docs/technical-design.md):本插件的功能拆解、架构、数据流、打包和安装设计;
  77. - [如何开发 JavaScript 版本插件](docs/develop-js-plugin.md):动态 JS 插件与可安装 JS 插件的开发方式;
  78. - [如何开发 TypeScript 版本插件](docs/develop-ts-plugin.md):可安装 TS/TSX 插件的完整工程化流程;
  79. - [接口端到端验证手册](docs/e2e-verification.md):新增或修改 Host/Client 接口后的隔离环境验证步骤;
  80. - [发布策略](docs/publishing-strategy.md):为什么本仓库将 lib 构建产物提交进 Git,以及发布前的检查清单。
  81. ## 贡献
  82. 提交改动前请至少运行:
  83. ```bash
  84. pnpm run typecheck
  85. pnpm run pack:check
  86. ```
  87. ## License
  88. [MIT](./LICENSE)

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.