Preface¶
When assigning tasks to coding agents, draft prompts are often written too colloquially: the goals are vague, inputs and outputs are not clearly specified, and constraints are also omitted. If sent directly, the model will either ask follow-up questions or act on its own understanding. Conversely, expanding every simple instruction like “read a.csv and sort by b” into a self-contained command in the input box will interrupt your current train of thought.
DeepSeek Harness (command name dsh) is an open-source agent runtime developed by DeepSeek AI. The official repository summarizes its core principle in one sentence: Everything is a Plugin. Models, tools, sessions, sandboxes, and interfaces can be added or removed via profiles without modifying the harness source code. The official onboarding path is to install Node.js and run npx @deepseek-ai/dsh web. It is currently a developer preview version, and the API is subject to change.
The community plugin directory deepseek-harness-plugin.com is an independent site and has no official affiliation with DeepSeek or HyperGAN, and should not be treated as an official app store. The dsh-prompt-polish plugin introduced below is listed in this directory, with a very specific function: it adds a polish button to the toolbar of the web input box, uses the connected large model to rewrite the current draft, keeps the modified content in the input box, and allows you to review it before sending.
This article is organized after cross-checking with the community directory details page, the repository README / README.zh.md, package.json, lib/index.js, lib/client.js, and the DeepSeek Harness official repository.
What is this¶
dsh-prompt-polish is a UI enhancement DSH plugin maintained by JoukoPuro, with the repository address at JoukoPuro/dsh-prompt-polish, licensed under MIT, and primarily written in JavaScript. The version number in package.json is 0.1.0. The community directory categorizes it under “UI Enhancement”; as of 2026-08-18, both the directory page and GitHub show 3 stars. The repository was created on 2026-08-14, and it was added to the directory on 2026-08-15.
It does not solve the problem of “helping you write a brand new prompt”, but rather: when you already have a draft in the input box, you want to refine it to be more professional, self-contained, and easier for coding agents to execute, while preserving the original meaning and language as much as possible. The rewriting uses the model already connected to the current session, and the plugin does not implement a separate key authentication flow.
package.json declares the plugin as a dual-sided bundle: the Host side is attached to the web server, and the browser side injects code into the input box toolbar. Since dsh.client.platform is web, this plugin targets the dsh web interface, not the terminal TUI.
Core Features¶
Pure Icon Button on the Toolbar¶
The browser-side code in lib/client.js registers a button named prompt-polish to the slot conversation.input.right. The button only has an icon and no text: it shows a sparkle (✨) when idle, and switches to a loading animation during rewriting. The hover tooltip and aria-label are “Call LLM to optimize prompt” in Chinese environment.
After clicking, a style menu pops up. After selecting an option, the current draft is sent as a POST request to the same-origin route /prompt-polish. On success, inputActions.setDraft is called to replace the input box content with the returned text. On failure, a Toast will pop up with the template “Prompt polishing failed: {message}”. The button is disabled and will not send requests when the draft is empty or setDraft is unavailable.
Both the directory page and the Chinese README state that the rewriting result will directly replace the content in the input box, and you can review it before sending. The plugin will not click the send button for you.
Four Rewriting Styles¶
The menu and configuration share four style values. The Chinese interface copy is as follows:
| Value | Chinese Menu Item | What the Built-in System Prompt Does |
|---|---|---|
balanced |
Balanced Polishing | Default option. Requires writing more professionally and precisely, and explicitly stating the goal, inputs, expected output format, and constraints |
concise |
Concise & Refined | Removes platitudes and repetitions, retains all requirements, and favors short imperative sentences and compact lists |
detailed |
Detailed Expansion | Adds background context, breaks down into numbered steps, clarifies inputs, outputs, edge cases, and acceptance criteria; prioritizes completeness over brevity |
code |
Code-Focused | Targets programming tasks: keeps code, commands, paths, and language names unchanged, and clarifies the goal, involved files, expected changes, constraints, and how to verify |
These four sets of instructions share a common prefix: they position the model as a prompt engineer for coding agents, require preserving the user’s original intent and the original language, and only return the rewritten plain text without explanations, preambles, or Markdown fences.
The request body is { text, style? }. The priority is: style in the current request → configuration item style → balanced. Unknown values will fall back to the balanced style. If system is configured, the entire built-in prompt will be replaced with this custom instruction, and the four style differences will no longer take effect.
Reuse Connected Models¶
The Host-side code in lib/index.js injects three services: webServer, llm, and agentDefaultModel, uses ctx.llm.stream to perform a streaming rewrite, then concatenates the text incrementally and returns it. The model routing resolution order is:
1. If both provider and model are written in the configuration, use this explicit route.
2. Otherwise, call agentDefaultModel.currentSelection(), which matches the default model of the current session, and carries the reasoningEffort from the selection (if any).
Credentials come from the model configuration already set in the web settings page, and the plugin does not collect API Keys separately. The Chinese README’s environment requirements also state this point: you need a running @deepseek-ai/dsh web profile, and the model adapter has been configured (for example, fill in the API Key for the DeepSeek provider in the settings).
The output length is controlled by maxTokens, with a default of 2048 if not configured. The request body limit is 16 KiB; an empty draft returns HTTP 400 with error as empty draft. An empty text returned by the model will be treated as an error.
Multilingual Menu¶
DSH’s built-in locale only provides Chinese and English IDs, and other browser languages will fall back to Chinese. Therefore, this plugin reads navigator.languages itself, and selects terms from the built-in vocabulary table based on the primary language tag. The coverage listed in the README is: 中文, English, 日本語, 한국어, Français, Deutsch, Español, Português, Русский, Italiano, Türkçe, Tiếng Việt; it falls back to English if no match is found. The page still registers Chinese and English vocabulary tables with DSH as a fallback. It will re-detect when the browser triggers the languagechange event.
Installation and Activation¶
The installation command given on the community directory details page is as follows, based on the original text on the page (the owner section is lowercase joukopuro):
dsh plugin add github:joukopuro/dsh-prompt-polish
The dsh CLI will parse the plugin from GitHub and install it to the current configuration. The directory page also reminds that for reproducible installation, you can pin the commit hash:
dsh plugin add github:joukopuro/dsh-prompt-polish#<commit>
As of 2026-08-18, the latest commit on the repository’s main branch is 53cf8afe5f1cefa9841f358899fce322ce4f9dfd. You should still verify the repository content yourself before pinning the hash.
If you have cloned the source code, the Chinese README also provides a local path installation method, specifying the web profile:
dsh plugin --profile web add ./dsh-prompt-polish
Then restart dsh web so that the profile loads the new bundle:
dsh web
Open the Web UI, write a draft in the input box, and click the polish button in the toolbar. The directory page also recommends using dsh plugins list to confirm that the plugin has been loaded after installation.
The security reminder on the directory page should be understood as-is: the plugin runs with the permissions of the current dsh process, and may execute code during installation. Please check the source code repository and license before installing.
Configuration¶
Optional configuration is written in the user layer of the profile’s cordis.patch.yml (applied after the bundle layer). The example given in the README is as follows, where the provider / model values are examples from the repository documentation, and the actual values should be based on the service provider and model name already configured in your current environment, and the two must appear in pairs:
- id: prompt-polish
config:
provider: deepseek-official # Explicit route specification (optional)
model: deepseek-v4-flash # Must appear in pairs with provider
style: balanced # Default rewriting style: balanced | concise | detailed | code
maxTokens: 2048 # Output limit for rewriting calls
# system: '...' # Custom rewriting instruction (replaces built-in style-specific prompts)
When provider / model are not configured, the plugin uses agentDefaultModel.currentSelection(). The built-in cordis.patch.yml of the bundle only inserts one loader line: id: prompt-polish, name: dsh-prompt-polish, and specific rewriting parameters are left to be overridden by the user layer.
Typical Usage¶
The daily workflow is operated through the interface and does not require remembering HTTP calls:
1. Confirm that dsh web has been started, and available models can be selected in the settings.
2. Write a draft in the input box, for example “read a.csv and sort by b”.
3. Click the ✨ button in the toolbar, and select a style from the menu. The four items in the Chinese interface are “Balanced Polishing”, “Concise & Refined”, “Detailed Expansion”, and “Code-Focused”.
4. Wait for the icon to change to the loading state; after completion, the input box content will be replaced with the rewritten result.
5. Check that the goals, paths, and constraints have not been mismodified, and send after confirmation.
The development instructions in the README also provide a method to directly call the Host route on a temporary port to confirm that the server side is mounted, without going through the button:
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"}'
The request body of the second curl matches the source code: text is the draft, and style is code. The normal response shape is { ok: true, text, style }; on failure, it is { ok: false, error }. This is a verification example from the repository documentation and is not a guarantee of rewriting quality.
Applicable Scenarios and Notes¶
Suitable use cases include:
- You already have a draft that expresses your intent, but lack goals, inputs, output formats, or constraints, and want to polish it before sending it to the agent.
- The prompt is too long and has too many platitudes, and you want to compress it to a few lines while retaining all requirements.
- The task needs to be broken down into steps and written with acceptance criteria, which is suitable for selecting “Detailed Expansion”.
- The draft already contains commands, file paths, or code snippets, and you want to prevent the rewrite from modifying these original contents, which is suitable for selecting “Code-Focused”.
You should be aware of the following boundaries before use:
- Only covers the web input box. The button will not appear if there is no web profile or the current interface is not dsh web.
- You must configure the model adapter first. The plugin has no built-in free models, and rewriting will consume the quota of your connected account.
- Rewriting is another LLM call, and the result depends on the current model and the built-in/custom system prompt. The plugin does not guarantee a correct rewrite on the first try. You should read through the replaced text before sending, especially paths, commands, and hard constraints.
- Drafts larger than approximately 16 KiB will be rejected by the Host. Empty input will not send a request.
- Once system is filled in, the four built-in styles will no longer take effect. provider and model must be configured in pairs; only writing one of them will not use the explicit route.
- DeepSeek Harness is still in developer preview, and the plugin’s peer dependencies specify preview version ranges for @deepseek-ai/cordis, @deepseek-ai/dsh-llm, and @deepseek-ai/dsh-agent, so future interfaces may be incompatible.
- The plugin runs with the permissions of the current dsh process. Before installing, you should read the source code and MIT license of JoukoPuro/dsh-prompt-polish and confirm before executing dsh plugin add.
Summary¶
dsh-prompt-polish integrates “rewriting the current draft with the connected large model” into the web input box toolbar: a pure icon button, four styles, in-place replacement, and reviewable before sending. It does not introduce new model vendors or modify the harness source code, but only connects the existing ctx.llm on both sides of conversation.input.right and POST /prompt-polish.
Directory page: https://deepseek-harness-plugin.com/zh-CN/plugins/dsh-prompt-polish/
GitHub: https://github.com/JoukoPuro/dsh-prompt-polish