Introduction¶
When writing Composer messages in DeepSeek Harness (DSH), it’s common to have only a few draft sentences in the input box: the intent is there, but constraints, output format, and edge conditions haven’t been fully written. Sending directly often requires multiple rounds of clarification; manually expanding the draft yourself is time-consuming and prone to overlooking questions that should be asked first.
Below is an introduction to the community plugin dsh-prompt-enhancer (maintainer: cosmoliu2002, category: model inference). It uses a single independent model call to rewrite the draft into a structured prompt ready to send, and lists “to be confirmed” information gaps before sending; it follows the current session model by default, and can also be pinned to a cheap model for enhancement in the profile.
What Is This¶
dsh-prompt-enhancer is a dual-side plugin for DSH: the Host side registers slash commands and executes one-shot LLM calls; the Client side provides a ✨ button next to the input box. Enhancement does not create session turns nor write to the model conversation history; it only consumes the tokens of this single call.
The return result consists of two parts:
- The rewritten
prompt(can be filled into the input box and sent directly); gaps: a list of questions missing from the original draft that are worth confirming first.
Two Entry Points¶
| Entry | Command | Return |
|---|---|---|
| ✨ Button (client.js) | /enhance-quiet <draft> |
JSON.stringify({prompt, gaps, added}), parsed by the button and filled back into the input box |
| Manual slash command | /enhance <draft> |
Plain text: the rewritten prompt; when gaps exist, a ## To confirm list is appended |
/enhance-quiet is used internally by the button; the command card is hidden and does not disturb the conversation flow. After successful enhancement, a diagnostic bar appears below the input box: explaining what the model added and listing gaps to be confirmed; clicking “Undo” restores the original draft. The diagnostic bar disappears automatically after the message is sent.
Installation and Activation¶
The plugin runs with the permissions of the current DSH process; before installation, it is recommended to review the source code and MIT license of the GitHub repository. There is a package with the same name dsh-prompt-enhancer on npm which is unrelated to this plugin; do not install it via dsh plugin add dsh-prompt-enhancer.
Install from GitHub¶
dsh plugin --profile web add git+https://github.com/cosmoliu2002/dsh-prompt-enhancer.git
After installation, refresh the page; the ✨ button should appear next to the input box (Host hot reload + Client bundle hot mount).
Via the Plugin Marketplace¶
- Built-in “Discover” tab: after adding the index source
https://raw.githubusercontent.com/cosmoliu2002/dsh-prompt-enhancer/main/market/index.json, you can browse and install. - After merging entries from the community directory awesome-dsh-plugin, you can also install in one click from dsh-market.
Catalog page: https://www.skillhub.cn/plugins/cosmoliu2002/dsh-prompt-enhancer
Typical Usage¶
- Write a draft in the Composer input box (no need to write the full prompt).
- Click ✨, or manually run
/enhanceand attach the draft content after the command. - Review the structured prompt filled back and the “To confirm” items in the diagnostic bar; fill in missing information first or click “Undo” to restore if needed.
- Send the message normally after confirming everything is correct.
When typing /enhance-quiet manually, the command still appears in the conversation flow; the button path hides the corresponding command card.
Configuration (Optional)¶
Configuration is written under config of the plugin row in the profile’s cordis.patch.yml; all options are optional, invalid values fall back to defaults. By default, no model is pinned; the enhancement call follows the current session model.
| Key | Default | Meaning |
|---|---|---|
commandName |
enhance |
Text command name (must match ^[a-z][a-z0-9_-]*$) |
quietCommandName |
enhance-quiet |
Internal JSON command name |
provider |
empty | Model route; only takes effect when paired with model |
model |
empty | Model id; paired with provider |
systemPrompt |
built-in | Instructs the model to only output {"prompt","gaps","added"} JSON |
template |
Draft:\n<<<\n{{draft}}\n>>> |
User message template, {{draft}} is replaced with the draft |
maxInputChars |
4000 |
Maximum draft character count |
maxOutputTokens |
1024 |
Maximum output tokens per call |
timeoutMs |
60000 |
Per-call timeout in milliseconds |
Model route resolution order (“follow current session” corresponds to step 2):
config.provider+config.model(explicitly specified as a pair, highest priority);- Current session model: pending in
modelSelectiontakes precedence, followed by the model actually used in the most recent request; - The route of the session’s most recent request (
session.requestHeader().config); - Model options at Agent creation time (
agent.options); ctx.agentDefaultModel.currentSelection()(the default model in settings).
If none can be resolved, the command returns a bilingual error message and does not fail silently. When the main conversation uses a strong model but enhancement wants a cheap model, simply configure provider and model as a pair for the plugin row in the profile’s patch.
Use Cases and Notes¶
Who it’s for: Developers who frequently write task descriptions in the DSH Composer and want to get a structured prompt and gap list before sending.
Things to note:
- Each enhancement consumes one extra model call; by default it uses the same model as the session, so with a strong model it will be slower and more expensive.
- Both commands write
command/run/command/doneevents into the session log (lifecycle records). - It depends on an available model route; when offline, credentials are not configured, or the provider is not registered, an error message is returned.
- When the model output is not valid JSON, no error is raised; the entire output is used as the
promptfallback.
The DSH ecosystem emphasizes “everything is a plugin”; SkillHub, awesome-dsh-plugin, and other community directories are independent sites with no official affiliation with DeepSeek / Hunyuan.
Conclusion¶
dsh-prompt-enhancer turns “draft → structured prompt + questions to confirm” into a one-click action next to the input box or the /enhance command, and follows the current session model by default. When you need to pin which model route is used for enhancement, configure it in the profile’s cordis.patch.yml.
- Catalog page: https://www.skillhub.cn/plugins/cosmoliu2002/dsh-prompt-enhancer
- Source code and documentation: https://github.com/cosmoliu2002/dsh-prompt-enhancer