In the development workflow of DeepSeek Harness (DSH), transforming rough drafts into clear, actionable instructions is a common pain point. This plugin renders a button below the editor and uses LLM capabilities to rewrite and optimize Prompts directly in the input box.
Plugin Introduction¶
This plugin is maintained by SongMiao-tech and is positioned as a Prompt optimization tool for DeepSeek Harness. It leverages the host’s ctx.llm to process user-input drafts through a fixed six-step flow, ultimately producing a high-quality Prompt in the same language as the original. It addresses the issues of unclear manually written Prompt structure and poor instruction execution quality.
Core Features¶
- UI integration: The button is rendered below the chat editor via the
conversation.composer.dockslot. - Interaction logic: Clicking the button reads the current editor text and displays a friendly prompt if it is empty.
- Rewriting flow: It calls the host’s
ctx.llmand executes a fixed six-step process (intent → context → hidden constraints → gaps → restructuring → language check). - Result handling: It displays the rewritten result and provides a Replace into input button to write the result back into the input box.
- Content preservation: The output language matches the input language, while code snippets, technical terms, and URLs remain unchanged.
Installation and Enablement¶
Prerequisites: Ensure that DeepSeek Harness dsh (web profile) is installed and configured with a model.
Install using the official command:
dsh plugin --profile web add https://github.com/SongMiao-tech/dsh-prompt-optimizer
Install from source:
git clone https://github.com/SongMiao-tech/dsh-prompt-optimizer.git
cd dsh-prompt-optimizer
pnpm install
pnpm run build
After building from source, the bundle must be registered in the profile’s cordis.patch.yml:
- insert:
- id: prompt-optimizer
name: '@deepseek-ai/dsh-prompt-optimizer'
- id: ui-prompt-optimizer
name: '@deepseek-ai/dsh-client-ui-prompt-optimizer'
Typical Usage¶
- Enter a rough Prompt draft in the editor.
- Click the ✨ Optimize Prompt button below.
- Review the AI-rewritten result in the dialog box.
- Click Replace into input to populate the input box with the result, then send it.
Applicable Scenarios and Notes¶
- The plugin runs with the permissions of the current DeepSeek Harness process.
- Review the source code and license (MIT) before installation.
- Ecosystem context: DSH follows the philosophy of “everything is a plugin.” This plugin is maintained by the community and has no official affiliation with DeepSeek or High-Flyer.
By using a structured Prompt rewriting process, this plugin lowers the barrier to writing high-quality instructions. For more details, see the DSH plugin directory or the GitHub repository.