DeepSeek Harness Plugin: dsh-enhance-prompt

Introduction

DeepSeek Harness (DSH) adopts a “everything is a plugin” architecture, allowing community developers to extend functionality as needed. When building complex agents or debugging long conversations, manually rewriting a rough draft into a structured prompt is a common yet tedious task. dsh-enhance-prompt, a Web GUI plugin, adds a ✨ button to the input toolbar that rewrites the current draft into a clearly sectioned, easy-to-read prompt while preserving attachments and references.

What Is This

dsh-enhance-prompt is a DSH plugin maintained by Canvai1337 (catalog page: https://www.skillhub.cn/plugins/Canvai1337/dsh-enhance-prompt, GitHub: https://github.com/Canvai1337/dsh-enhance-prompt). It is a model-inference composer button located to the left of the model selection button. Clicking it rewrites a plain-text draft into a structured prompt without losing images, files, or inline references.

Core Features

One-Click Structural Rewrite

The ✨ button sits to the left of the model selection button and shows “Enhance Prompt” on hover. Upon clicking, the plugin issues a standalone model request to rewrite the draft into the following structure:

  • Objective: what to accomplish
  • Tasks: step-by-step concrete actions
  • Output Format: expected output style
  • References: preserved original file citations

The rewrite avoids Markdown headings or bold text to prevent model violations; structure is delineated by line breaks and lists.

Preserving Attachments and References

The plugin preserves files, images, and @references in the input box:

  • Inline references are passed as opaque markers [[DSH_REF_n]]
  • After the request completes, markers are rebuilt into original chips
  • Lost attachments are automatically restored
  • Files are never converted to plain text, and images are never dropped

Undo and Cancel

  • An “Undo” button on the result bar restores the original draft
  • A loading animation appears during the request; clicking again after 400 ms cancels it
  • Dual timeout protection on both the client and the Host

Error Handling

The plugin provides specific error messages for various edge cases without corrupting the original draft:

  • Empty draft
  • Files only
  • Command mode
  • Malformed draft structure
  • Input state not editable
  • Model errors
  • Timeout
  • Draft too long
  • Model dropping markers

Modifying the draft during a request will not cause it to be overwritten.

Performance and Implementation

  • Language adaptation: only a single-language system prompt is sent based on the draft’s language, reducing latency and cost
  • Single request, no history: enhancement sends one standalone request without carrying conversation history
  • Lightweight frontend: stable selectors avoid duplicate subscriptions
  • Robust pipeline: auth fence → method/type validation → bounded body read → JSON validation → length check → model call → finish/marker validation → normalized output

Installation and Activation

  1. Download the plugin folder (the extracted enhance-prompt)
  2. In DSH, go to Plugins → Add plugin
  3. Select that folder
  4. Refresh the page

Method B

Run in the terminal:

plugin_manager install_bundle target=<absolute path to this folder>

If application: applied is returned, it is active.

Add the following to the dependencies in $DSH_PROFILE_DIR/package.json:

"dsh-enhance-prompt": "link:<absolute path>"

Then add the package name to dsh.profile.bundles and restart DSH.

If the button does not appear: refresh the page first; if it’s still missing, restart DSH or toggle the plugin off/on in Plugins.

Configuration

By default, the deployed default model is used. To tune parameters, override by row id in the profile’s cordis.patch.yml (see examples/config.example.yml for a sample):

- id: enhance-prompt
  name: dsh-enhance-prompt
  config:
    structured: true          # true=sectioned structure; false=paragraph style
    maxInputChars: 32000
    maxOutputTokens: 4096
    timeoutMs: 75000
    temperature: ''           # empty = parameter not sent
Field Default Description
structured true Whether to output sectioned structure
provider / model empty (uses default model) Model routing for enhancement
reasoningEffort inherits default Only effective when explicitly routed; value must be within the model’s declared tiers
maxInputChars 32000 Draft character limit
maxOutputTokens 4096 Output token limit (auto-doubles and retries once if truncated)
timeoutMs 75000 Host-side per-attempt timeout
temperature empty empty = parameter not sent; set 0–2 to send to model
system built-in Custom system prompt

Typical Usage

Enter the following in the draft:

[[DSH_REF_0]] Summarize this document and explain what to do next

After clicking ✨, the draft is rewritten to:

Objective:
- Summarize the attached document and explain the next steps.

Tasks:
1. Read and understand the document in the references.
2. Summarize the main content and key points.
3. Based on the document, outline the actions to take next.

Output Format:
- Provide the document summary first, then suggestions for next steps.

References:
[[DSH_REF_0]]   ← This remains a file chip, not plain text

Use Cases and Notes

Best suited for organizing fragmented drafts into structured prompts, particularly when debugging long conversations or building complex workflows.

The plugin runs with the current DSH process permissions. It is recommended to review the source code and license before installation.

Limitations

  • Command mode (draft starting with /command) is not yet supported
  • Inline quote nodes degrade to equivalent plain text (no text is lost)
  • Write-back relies on setDraft accepting a semantic draft object
  • Only applicable in the DSH environment

Ecosystem Context

DSH’s philosophy is “everything is a plugin”; the community catalog is an independent site with no official affiliation with DeepSeek or High-Flyer.


dsh-enhance-prompt: A DSH plugin that rewrites fragmented drafts into structured prompts. Catalog page: https://www.skillhub.cn/plugins/Canvai1337/dsh-enhance-prompt | GitHub: https://github.com/Canvai1337/dsh-enhance-prompt

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye