Introduction

For DeepSeek Harness (DSH) users, directly passing an incomplete draft (for example, “help me write a sorting”) to an LLM often fails to produce controllable results. The model may fill in missing roles, context, or output formats on its own, leading to uncertain outcomes. The dsh-prompt-enhance plugin adds a star button next to the conversation editor and uses DSH’s built-in model and rule engine to rewrite the original draft into a structured, high-quality prompt.

Core Features

This plugin is ported based on the PromptForge rule-diagnostics engine and provides the following main features:

  1. Structured rewriting: Rewrites the current draft into a structured prompt and fills in missing dimensions (such as role, goal, constraints, etc.).
  2. Built-in model invocation: Uses DSH’s ctx.llm and the session default model for rewriting, with no additional API Key configuration required.
  3. Dual-axis tuning: Provides two adjustable parameter axes:
    • Rewriting depth: Conservative (only patch gaps), Balanced (rebuild the skeleton), Deep (full inference).
    • Prompt type: Task prompt or System prompt.
  4. Bilingual support: Diagnostic rules and rewriting logic support prompts in Chinese and English.

Installation and Enabling

The plugin requires a DSH Web (dsh web) environment and Node 20 or higher.

The installation command is:

dsh plugin --profile web add github:DAIZHISEN/dsh-prompt-enhance

After installation, you must restart dsh web for the star button to appear in the editor toolbar.

Usage

  1. Basic rewriting: Enter a draft in the conversation editor, click the star button next to it, and the plugin will call the model to rewrite it into a structured prompt.
  2. Parameter adjustment: Right-click the star button to adjust the rewriting depth and prompt type. The settings are stored in the browser’s localStorage.
  3. View diagnostics: After rewriting is complete, the star button will display the score before rewriting.

Technical Details

Internally, the plugin follows the flow: rule diagnostics -> request assembly -> model rewriting -> unpacking. The diagnostics process evaluates scores across five dimensions:

  • Goal clarity (25%): whether the verbs are specific and the deliverables are clear.
  • Context completeness (25%): whether the role, background, and constraints are complete.
  • Instruction specificity (25%): whether the instructions are ambiguous and the steps are broken down.
  • Structural conventions (15%): paragraph length and whether segmentation is reasonable.
  • Output format (10%): format, length, language/tone.

Using structured facts (such as “missing acceptance criteria”) to guide the model’s patching is more controllable than letting the model guess on its own.

Notes

  • Hand-written code: The plugin is a hand-written ESM module, with no build steps, no TypeScript, and no third-party dependencies.
  • Dual-mounting risk: If Bundle installation and manual mounting (manually adding id: prompt-enhance in cordis.patch.yml) are used at the same time, duplicate route registration will occur, causing a startup error: duplicate prefix route.
  • License: MIT License.

Conclusion

dsh-prompt-enhance uses a rule engine to help LLMs rewrite prompts. It is suitable for developers who need to quickly generate high-quality prompts. For more details, see the plugin directory or GitHub repository.