dsh-prompt-optimizer
Manifest validPrompt Optimization Plugin: Trigger method = button next to the input box, click to rewrite the draft; Optimization engine = call the large model of the current session; Optimization goals = structure
dsh-prompt-optimizer
A DeepSeek Harness bundle that rewrites the composer draft with the model this session already uses, then shows an estimated before/after quality comparison.
Install
- Open Plugins in DSH and choose Add plugin.
- Point it at this directory (the one containing
package.json):C:\Users\langb\Documents\deepseek-harness\default-workspace\dsh-prompt-optimizer - Confirm the row
dsh-prompt-optimizerappears and is enabled, then open a new session.
Installing writes the profile manifest for you; do not hand-edit the profile.
Use
- The 优化提示词 / Optimize prompt control sits in the composer's right control row, before the model picker.
- It is greyed out only while a rewrite is running. Clicking with an empty draft, or while a message is being sent, explains why instead of failing silently.
- On success the draft is replaced and a comparison card appears under the composer: total score before → after, six dimensions, the model's change list, character and ≈token counts, and 恢复原文 / Restore original.
- If you type while the rewrite is in flight, the draft is not overwritten: the card offers 应用改写 / Apply rewrite or 保留我的 / Keep mine.
Verify
bash tools/check-all.sh
Runs four independent gates, all offline: JS syntax for every module, the Host route contract (tests/host.test.mjs), the client slot components (tests/client.test.mjs), and the effect gate (tests/verify.mjs), which scores six paired prompts with the shipped scorer and fails the build if any sample or dimension regresses.
Publish
DSH has no upload endpoint. A plugin reaches other machines through npm, through the community catalog, or through a market index — publish/PUBLISH.md walks each one, and tools/preflight.mjs checks the rules those channels enforce (including whether the package name is still free on npm).
node tools/preflight.mjs --online # manifest, files, locale, name availability
node tools/build-index.mjs # write publish/index.json (format 1, officially validated)
Layout
| Path | Role |
|---|---|
index.js | Host half: three loopback-only HTTP routes, model call through ctx.llm |
client.js | Browser half: composer button + comparison panel, --dsw-alias-* tokens only |
lib/score.js | Deterministic six-dimension estimator (shared by Host, UI, and the gate) |
lib/prompt.js | The rewrite instruction and the tolerant JSON reader |
tests/ | Offline gates and the scored fixtures |
docs/DETAIL.md | Plugin detail page (estimate table, request flow, failure modes) |
Comments
Loading…
Similar plugins
Optimize Prompt button under the composer: one click rewrites your draft into a clearer, more executable prompt, with a before-and-after dialog and one-click replacement.
★ 0
↓ 185/wk
dsh plugin --profile web add dsh-prompt-optimizerby EmotionG
Prompt optimizer for the DeepSeek Harness composer: a normal/optimize mode toggle in conversation.input.right that optimizes the draft with the session's current model and writes it back to the composer.
★ 0
MIT
TypeScript
Sep 17, 2026
dsh plugin --profile web add dsh-prompt-optimizerOne-button prompt optimizer: rewrites the composer draft via a configurable strategy, with an editable template, few-shot examples, pinned models and reasoning effort.
★ 0
dsh plugin --profile web add @panando/dsh-prompt-optimizerby du-u-uck
Adds a one-click prompt optimization button to the DSH composer, with undo and an optional dedicated optimizer model.
★ 0
MIT
TypeScript
Sep 13, 2026
dsh plugin --profile web add dsh-prompt-optimizationby naitoupi
DeepSeek Harness (DSH) plugin: ? optimize the composer draft with the current model. Installable bundle (dsh.bundle + dsh.client); Settings tab: on/off switch, generation params, editable system promp
★ 0
MIT
JavaScript
Sep 21, 2026
dsh plugin --profile web add prompt-optimizer-pluginby LiWenzhuo001
Prompt optimizer plugin for DeepSeek Harness: one click rewrites your composer draft into a clear, verifiable prompt. Zero dependencies.
★ 1
MIT
JavaScript
Oct 1, 2026
dsh plugin --profile web add dsh-plugin-prompt-optimizer