JoukoPuro/dsh-prompt-polish
一个DeepSeek Harness(DSH)插件:在Web输入框的工具行中添加一个✨图标按钮。点击后选择打磨风格,已接入的大模型会把你草稿中的提示词改写得更专业、更易被AI理解。
Project Overview项目介绍
dsh-prompt-polish is a DeepSeek Harness plugin that adds a sparkle button to the web composer's tool row. Clicking it lets you pick a rewrite style and uses the already-connected LLM to rewrite your draft prompt more clearly for an AI, replacing the text for review before sending. It offers four styles (balanced, concise, detailed, code), a multilingual menu, and optional config for provider, model, style, maxTokens, or a custom system prompt. Caveat: it requires a running DSH web profile with a configured model adapter.
dsh-prompt-polish 是 DeepSeek Harness 插件,在 Web 撰写区工具栏加入✨按钮。点击后选择改写风格,调用当前已连接的 LLM 将草稿改写得更专业、易于 AI 理解,并替换原草稿以便发送前审阅。提供平衡、简洁、详细、代码四种风格,UI 支持多语言。可在 cordis.patch.yml 配置 provider、model、style、maxTokens 或自定义 system 提示词。注意:需在已配置模型适配器的 DSH Web 环境下运行。
请帮我了解并安装插件:【dsh-prompt-polish】【https://github.com/JoukoPuro/dsh-prompt-polish】
Send this message to DSH in your current session. CLI install commands may not be accurate across systems — DSH will figure it out for you.把上面这条消息直接发给当前会话里的 DSH,让它帮你了解并安装。安装命令不一定准确,发给 DSH 更稳。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add github:JoukoPuro/dsh-prompt-polish
把 JoukoPuro/dsh-prompt-polish 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-prompt-polish
English | 中文
A DeepSeek Harness (DSH) plugin that adds a ✨ sparkle button to the web composer's tool row. Click it, pick a rewrite style, and the already-connected LLM rewrites your draft prompt to be more professional and easier for an AI to understand — then replaces the draft so you can review before sending.
- Icon-only button — a sparkle glyph in the composer tool row; no text, tooltip gives the full description.
- Four rewrite styles — balanced / concise / detailed / code-oriented.
- Multi-language UI — menu copy follows your browser language (zh, en, ja, ko, fr, de, es, pt, ru, it, tr, vi; falls back to English).
- Uses your connected model — resolves the current default agent model
(
agentDefaultModel), or an explicitprovider/modelfrom config.
Requirements
- DeepSeek Harness (
@deepseek-ai/dsh) web profile running, with a model adapter configured (e.g. the DeepSeek provider with an API key in Settings).
Install
# from a checkout of this repository (or the directory containing it)
dsh plugin --profile web add ./dsh-prompt-polish
Then restart dsh web so the profile picks up the new bundle:
dsh web
Open the web UI, type a draft, and click the sparkle button in the composer tool row.
Configuration
The plugin accepts optional config in the profile's cordis.patch.yml
(user layer, applied after the bundle layer):
- id: prompt-polish
config:
provider: deepseek-official # explicit route (optional)
model: deepseek-v4-flash # must be paired with provider
style: balanced # default rewrite style: balanced | concise | detailed | code
maxTokens: 2048 # output cap for the rewrite call
# system: '...' # custom rewrite instruction (replaces the built-in per-style prompts)
Without provider/model, the plugin uses
agentDefaultModel.currentSelection() — the same default model the session
uses.
How it works
| Half | File | Role |
|---|---|---|
| Host | lib/index.js |
Registers POST /prompt-polish on the web server; streams one LLM rewrite via ctx.llm |
| Browser | lib/client.js |
Registers the sparkle button into conversation.input.right; opens a style menu; posts the draft and replaces it with the polished text |
The bundle's package.json declares both faces of the dual-face plugin:
dsh.bundle— the profile patch layer (cordis.patch.yml) that inserts theprompt-polishloader row.dsh.client— the web boot row;client-modulesserveslib/client.jsat/plugins/dsh-prompt-polish/client.js.
Development
Edit lib/index.js (host) and lib/client.js (browser). The browser bundle is
a hand-built closure-factory artifact (window.__ModuleLoader__.load({ id, factory })) — keep externals limited to the platform modules
(react, @deepseek-ai/dsh-client-ui-primitives) and inline everything else,
matching the loader's module-table rules.
Verify on a scratch port before touching the live profile:
dsh web --port 3099
curl -s http://127.0.0.1:3099/plugins/dsh-prompt-polish/client.js | head
curl -s -X POST http://127.0.0.1:3099/prompt-polish \
-H 'content-type: application/json' \
-d '{"text":"read a.csv and sort by b","style":"code"}'
License
MIT
a735624258/dsh-skill-picker
omdsh-dev/dsh-llm-fallbacks
MJorgin/dsh-agent-conductor
kuaiyukuaikuai/dsh-agent-sync