Introduction¶
When writing prompts in the DeepSeek Harness (DSH) Web client, you often run into the same problem: the draft is too short, the boundaries are vague, or you want it to stay in first person without turning into a task sheet — yet you have to manually revise it over and over. Current workarounds either rely on manual polishing or require switching to a different toolchain. The dsh-prompt-natural plugin mounts a star-shaped button in the DSH Web input bar. One click sends the current draft to the built-in prompt-enhance skill, retrieves the enhanced version and backfills it, while keeping the first-person voice and completing the scope and output specification.
What It Is¶
dsh-prompt-natural is a workflow plugin maintained by zhy451. It integrates the prompt-enhance skill into the DSH Web Composer input bar, triggered by left-click or a keyboard shortcut. A Python script rewrites the prompt, and the result is backfilled into the editor. The plugin ships with its own skill directory and does not depend on whether prompt-enhance is installed locally; it supports online calls to the DeepSeek API and also provides an offline template as a fallback. Built-in undo supports up to 5 steps, and it offers three style tiers by mode: “Light → Natural → Detailed.”
Installation & Activation¶
The plugin must first be installed into the DSH profile, then the package name added to bundles, and finally the client must be restarted.
- Install the package into the profile (macOS / Linux example):
npm install "<path-to>/dsh-prompt-natural" --prefix "$HOME/.dsh/profiles/desktop"
Windows PowerShell uses the same syntax — just replace the path with a Windows-style one.
- Add the bundle to the profile’s
package.json:
"dsh": { "profile": { "bundles": ["dsh-prompt-natural"] } }
- Restart the DSH client and refresh the Web page. A star-shaped button will appear on the left side of the input bar.
Core Features¶
Prompt Enhancement¶
Inside the Web GUI input field, a left-click on the star button sends the current draft to the prompt-enhance skill. The script preserves the first-person voice, completes the input scope and output format, and prevents the prompt from devolving into a task sheet. Once enhancement is complete, the result replaces the draft and appears in the input field.
Style Tiers¶
Right-clicking the button cycles through style tiers: Light → Natural → Detailed, corresponding to 1.4× / 2× / 3× expansion intensity. The browser remembers the current tier via localStorage, so the same setting persists the next time you open the page.
Keyboard Shortcuts & Undo¶
Alt+E: Enhance directly when the input field has focus.Alt+Z: Undo the last enhancement (up to 5 steps, persists across page refreshes).Esc: Dismiss error or confirmation overlays without modifying the draft.- Left-click while enhancement is in progress: Cancel the request (via
AbortController). - The “Undo” pill to the right of the star: Revert to the pre-enhancement state without obscuring the input field content.
Safety Confirmation¶
Before enhancing, the plugin inspects the draft content to prevent accidental overwrites:
- If the draft contains @ references, a confirmation dialog appears first, since backfilling will convert them to plain text;
- If the draft exceeds 4,000 characters, the intensity is automatically reduced by one tier;
- If the draft already has ≥3 Markdown headings, a confirmation is requested first to avoid redundant expansion.
Technical Composition¶
skill/: The prompt-enhance skill (scripts, templates, examples) bundled with the package. The host prioritizes this over the user-level~/.dsh/skills/directory.lib/index.js: The host-side interface, providingPOST /dsh-prompt-natural/enhanceandGET /dsh-prompt-natural/status.POSTaccepts{text,mode,lang,style}, invokesprompt_enhance.py --mode <m> --style <natural|spec> --json, and passes the draft via stdin;GETis used to self-check the Python interpreter and script paths.lib/client.js: The browser-side module. Registers theconversation.input.leftslot, readsprops.useInput.draft, and backfills viaprops.inputActions.setDraft; if actions are unavailable, it falls back tocontenteditable+execCommand.test/: Contains 7 host-side test cases and 5 client-side test cases, run withnode:test.
Dependencies & Environment¶
- Node.js >= 20: Bundled with DSH.
- Python 3.9+: The script uses only the standard library. If Python is not on
PATH, setDSH_PROMPT_ENHANCE_PYTHONto specify the interpreter. - API key: Read by default from the
refs:section of~/.dsh/.credentials.yamlasDEEPSEEK_API_KEY. When the key is present, the officialapi.deepseek.comendpoint is used; otherwise, it automatically degrades to the offline template. The package does not include any third-party proxy addresses. To connect to another OpenAI-compatible endpoint, add it toprovidersinskill/config.jsonand include it inorder, or specify it per invocation via--base-url/--model/--api-key.
Self-Check & Debugging¶
You can check the plugin status via the HTTP interface:
curl http://127.0.0.1:<port>/dsh-prompt-natural/status
Send an enhancement request:
curl -X POST http://127.0.0.1:<port>/dsh-prompt-natural/enhance \
-H "content-type: application/json" \
-d '{"text":"Help me write a web scraper","mode":"fast"}'
Uninstallation¶
macOS / Linux:
npm uninstall dsh-prompt-natural --prefix "$HOME/.dsh/profiles/desktop"
Windows PowerShell:
powershell -ExecutionPolicy Bypass -File uninstall.ps1
Use Cases & Caveats¶
dsh-prompt-natural is active only in the DSH Web GUI; the button is mounted on the conversation.input.left slot. The mobile dsh-go Flutter native input bar does not render Web plugins, so for the same session you need to open the Web GUI URL in a browser. The plugin runs with the permissions of the current DSH process — it is recommended to review the source code and license before installing.
Conclusion¶
dsh-prompt-natural embeds the prompt-enhance skill directly into the DSH Web input flow, providing one-click enhancement, multi-tier styles, undo, and safety confirmation — ideal for agent developers who need to frequently refine prompts. See the directory page and the GitHub repository for more details.