DeepSeek Harness (DSH) users often encounter issues with ambiguous instructions and lacking structural constraints when interacting with Agents, leading to deviations in Agent understanding or execution falling short of expectations. The DSH Prompt Optimizer plugin sits between user input and Agent execution, responsible for transforming casual input into structured, actionable prompts before sending.
Maintained by YMRwithNoworry, this is a general-purpose Prompt optimizer. Its core function is to transform casual input into structured, actionable prompts while strictly adhering to a “User Review Mechanism.” Optimization results are displayed only in a preview popup for user comparison and confirmation. They are written back to the input box only when the user explicitly clicks “Adopt Optimized Result,” and messages are never sent automatically.
Installation and Enablement¶
Prerequisites¶
- DSH Version
0.1.7-rc.2(@deepseek-ai/dsh) - Web profile (CLI does not support desktop profile)
- pnpm (must be in PATH)
Installation Steps¶
- Execute the installation command:
dsh plugin --profile web add "git+https://github.com/YMRwithNoworry/dsh-prompt-optimizer.git"
- Manually add the plugin to the bundle configuration. Edit
~/.dsh/profiles/web/package.jsonand add"dsh-prompt-optimizer"to thedsh.profile.bundlesarray. - Restart
dsh --profile web.
Core Features¶
The plugin works through the following steps:
1. Read Draft: Click the “✨ Optimize Prompt” button at the bottom right of the Composer to read the current input (without sending).
2. Smart Analysis: Identify the task domain (e.g., Minecraft, UI Design, Game Development), analyze complexity, and manage character budget.
3. Structured Completion: Based on intensity settings, fill in missing constraints, acceptance criteria, and execution requirements, reusing existing DSH LLM services and authentication.
4. Preview & Write: Display a comparison of the original and optimized results in a popup (supporting line-by-line Diff). After user confirmation, the plugin writes only the optimized result to the input box; the user manually presses send.
Typical Usage¶
- Enter input casually in the input box (e.g., “Help me make a nice admin dashboard”).
- Click ✨ Optimize Prompt.
- View the original Prompt and the optimized Prompt in the preview popup.
- Select Adopt Optimized Result to write back to the input box.
- Check for accuracy, then manually press send.
Configuration and Settings¶
The plugin supports configuration via the settings panel or ~/.dsh/prompt-optimizer.json. Key settings include:
- Optimization Model: Default
current, reuses the current session model. - Thinking Intensity:
light: Only fixes grammar, references, and missing action objects.balanced(default): Fills in constraints, structures multi-step tasks.deep: Establishes goals, criteria, and acceptance conditions, and resolves ambiguities.
- Optimization Language:
auto(follows original),chinese,english,original. - Context Strategy:
- Reference Project Rules: Enabled by default, reads whitelisted files like
AGENTS.md,DESIGN.md(does not read source code). - Reference Session Context: Enabled by default, used only to resolve references, does not copy entire history.
- Visual Context: Enabled by default, only references file names, does not describe or guess image content.
- Reference Project Rules: Enabled by default, reads whitelisted files like
Domain Strategies¶
The plugin includes built-in strategies for different domains, which are automatically applied when keywords are detected. Main domains include:
* minecraft: Focuses on vanilla visual language, pixel grids, and Mod implementation constraints.
* ui-design: Focuses on information hierarchy, interaction states, and accessibility.
* game-development, coding, writing, research, data-analysis, etc.
Precautions¶
- Security Boundary: The plugin strictly enhances intent and never alters the user’s original intent. It does not automatically decide technical selections (e.g., database type) nor does it add features or scope.
- Data Privacy: The plugin does not read source code files, does not copy entire session histories, and visual context retains only file references.
- Version Requirement: DSH 0.1.7-rc.2 or higher is required.
Ecosystem Links¶
- Plugin Directory: https://www.skillhub.cn/plugins/YMRwithNoworry/dsh-prompt-optimizer
- GitHub Repository: https://github.com/YMRwithNoworry/dsh-prompt-optimizer