dsh-prompt-rewriter: A Prompt Rewrite Button Inside the DeepSeek Harness Composer
huaguoxingkong/dsh-prompt-rewriter
A DSH plugin that rewrites your composer draft in place, filling in goal, format and boundaries without ever sending it — undo anytime.
dsh-prompt-rewriter is a one-click rewrite entry beside the DeepSeek Harness composer, built for drafts that are only a single sentence and lack goals or boundaries. It puts goal, output format, and constraints back into the sentence you already wrote, so the model does not have to guess and you skip another round of rewording. The result stays editable in the composer, is never sent automatically, and Ctrl+Z or the undo arrow restores your original. Four button states — static whale tail, spinning spiral, undo arrow, and red retry — report progress, with failure reasons shown right beside the icon.
How to Install
dsh plugin --profile web add dsh-prompt-rewriter- Category
- Tools & Capabilities
- Platform
- DSH Plugin
- Author
- huaguoxingkong
- Distribution
- Plugin
dsh-prompt-rewriter Key Features
dsh-prompt-rewriter Repo Summary
What Does It Do?
Prompt Rewriter is a DSH plugin for DeepSeek Harness that turns a half-formed draft in the composer into a task instruction you can actually run. It solves the problem of one-line drafts missing goal, format, and boundaries, which forces the model to guess and often costs another round of rewording. Clicking the whale-tail icon left of the model name rewrites the draft in place, and it never sends the message. The rewritten text stays editable in the composer, and Ctrl+Z or the undo arrow restores your original draft.
Core Features
- In-place rewriting without sending: only the composer content is replaced, so nothing is dispatched and any change can be undone in one click.
- Automatic goal, format, and boundary filling: it reads your sentence and adds the missing pieces, e.g. turning "help me write a scraper for Douban movies" into scraping the Top 250 titles, ratings, and links, outputting a CSV file, respecting robots.txt, waiting at least 2s between requests, and backing off on rate limits instead of circumventing them.
- Four button states: a static whale tail when idle, a spinning spiral while rewriting (click again to cancel), an undo arrow when done, and a red retry icon with the failure reason shown right next to it.
- Optional conversation context: a small dot in the button's lower-right corner means the rewrite will also read earlier turns; turning off "Reference the conversation" removes the dot and saves tokens.
- Images from the current composer only: images from earlier messages are deliberately out of scope to avoid slow processing and misreads.
- Background execution: after clicking you can switch to another session and the task keeps running, with two sessions rewriting independently.
How to Use This Plugin?
Type any draft in the DSH composer (shorter is fine) and click the whale-tail icon just left of the model name; about a second later the draft is replaced with the rewritten prompt. Click again mid-run to cancel, or press Ctrl+Z / click the undo arrow to restore the original. Speed depends mostly on the selected model, so switch to a more stable, faster model if it feels slow; to pin a model for enhancement without affecting normal chat, enable "Use a fixed model" in Settings. The dot on the button tells you whether earlier turns will be referenced, and you can turn off "Reference the conversation" in settings. Maintained by huaguoxingkong under the MIT license, it is an unofficial community project.
How to Troubleshoot This Plugin?
When a rewrite fails, the button turns into a red retry icon and the reason is displayed right beside it, so there is no need to hunt through logs. If a rewrite takes a long time to return, the selected model is usually the cause; switch to a more stable model as described in the official instructions. If long conversations feel slow or expensive, turn off "Reference the conversation" in settings to drop the context overhead.
This page is an independent rewrite of the plugin's official README — for authoritative documentation and the latest changes, refer to the source: huaguoxingkong/dsh-prompt-rewriter. The plugin is third-party code that runs on your machine once installed; inclusion does not imply endorsement — please review the source before installing.
DSH Plugin FAQ
