dsh-prompt-smith: Forging Drafts into Structured Prompts with One Click in DSH

Introduction

When writing prompts in DeepSeek Harness, you often start by drafting a casual, colloquial description in the input box, then iteratively rewrite it into a clearly structured, boundary-complete specification based on experience. This “rewrite” process is repetitive and tends to overlook implicit states and edge cases.

dsh-prompt-smith adds a ✨ button to the input toolbar, to the left of the model selector. One click forges your current draft into a clearly structured, boundary-complete prompt; clicking ↺ restores the original text. This invokes the LLM service from your current profile locally—nothing is written to the session log, and your conversation history remains clean.

What Is This

This is a DeepSeek Harness plugin with the package name @cyberpzy/dsh-prompt-smith, version 1.0.3. It occupies two UI slots: conversation.input.right (the input toolbar button) and settings.section (a panel on the settings page). The plugin has no npm dependencies; both index.js and client.js are pure JavaScript.

Core Capabilities of Prompt Enhancement

  • One-click enhance & restore: Click ✨ to replace the input content; click ↺ to revert. Both are single Ctrl+Z undoable actions.
  • Requirement expansion, not wording polish: All facts, commands, placeholders, and task scope in the draft are preserved while implicit reasonable defaults are made into explicit requirements.
  • State & boundary completion: Interactive requirements get a full state machine (initial / in-progress / completed / failed / empty state), trigger mechanisms, edge cases, and acceptance criteria.
  • Injection guardrail: Draft content is wrapped in <draft> tags with an explicit declaration that it is not an instruction, preventing the model from misinterpreting it.
  • Model selection: You can specify provider ID, model ID, and reasoning effort. If unspecified, it auto-selects a route whose ID contains deepseek and a model whose ID contains flash.

Installation & Activation

Prerequisites:

Item Requirement
Host DeepSeek Harness ≥ 0.2.2-rc.3 (manifest field dshTarget)
Profile Must have an llm service and at least one model provider adapter; profile with a Web layer
CLI dsh command (bundled with Harness; the GUI version is located at resources\runtime\cli\bin in the install directory)
Network No special requirements; installs directly from the public repository

Install command (replace desktop with the name of the profile you are actually running):

dsh plugin --profile desktop add github:CyberPzy/dsh-prompt-smith

After installation, restart the app (or restart dsh web), then press Ctrl+R in the browser to refresh the page.

Upgrade (re-run the same command to pull the latest version from the default branch):

dsh plugin --profile desktop add github:CyberPzy/dsh-prompt-smith

Pin a version:

dsh plugin --profile desktop add github:CyberPzy/dsh-prompt-smith#v1.0.3

Uninstall:

dsh plugin --profile desktop remove @cyberpzy/dsh-prompt-smith

For offline or network-restricted environments, use a local directory:

dsh plugin --profile desktop add link:C:\path\to\dsh-prompt-smith

Configuration

Configuration is sourced from two places: the “Settings → Prompt Enhancement” panel and the cordis.patch.yml patch entry in your profile (with id: prompt-smith). Both read and write the same underlying state.

Name Type Default Description
enabled boolean true When disabled, the input button is hidden and the enhancement endpoint returns 502 DISABLED.
prompt string '' Built-in system prompt. Leave empty to use the built-in default; a non-empty value replaces it entirely.
provider string '' Provider ID used for refinement. Leave empty to auto-select a route whose ID contains deepseek, or fall back to the first available provider.
model string '' Model ID used for refinement. Leave empty to auto-select a model whose ID contains flash, otherwise use the provider’s first model.
reasoningEffort string 'auto' Reasoning effort. auto uses the minimum level declared by the model; you can also hard-code a level ID (e.g., low, high).
temperature number 0.3 Sampling temperature. Valid range 0–2; out-of-range values are clamped to the boundary.
maxTokens number 1200 Maximum output tokens. Valid range 200–8192; rounded to an integer.
maxChars number 6000 Maximum draft character count eligible for refinement. Valid range 200–20000; rounded to an integer; overly long drafts are rejected with a prompt to split.

Patch file example:

- id: prompt-smith
  name: '@cyberpzy/dsh-prompt-smith'
  config:
    enabled: true
    prompt: ''
    provider: ''
    model: ''
    reasoningEffort: auto
    temperature: 0.3
    maxTokens: 1200
    maxChars: 6000

Typical Usage

Button States

State Icon Tooltip Click Behavior
Input is empty (including whitespace only) Button hidden — —
Ready to enhance ✨ Enhance prompt Refine and directly replace the draft; original is cached
Refining ◌ spinning (disabled) Refining… Not clickable
Enhanced ↺ Restore original Restore the cached original
Failed ✨ (red) Error message Auto-resets after 4 seconds

Minimal Working Example

  1. Install the plugin, restart the app, and press Ctrl+R to refresh.
  2. Type a draft in the input box:
登录很慢
  1. Click the ✨ button on the input toolbar (to the left of the model selector).
  2. The input content is directly replaced with a structured prompt, and the button changes to ↺; clicking ↺ restores 登录很慢.

Example output (actual output varies by model and draft; word-for-word match is not guaranteed):

诊断并修复登录缓慢问题:定位耗时环节(前端请求、后端接口、鉴权、数据库),
给出瓶颈证据与修复方案;说明修复前后各状态(初始 / 进行中 / 成功 / 失败)的预期反馈,
覆盖空输入、重复提交、网络超时与失败恢复;给出验收标准。

Specifying a Model & Testing

  1. Open “Settings → Prompt Enhancement” and select a provider and model under “Refinement Model” (switching models does not change the already-selected reasoning effort).
  2. Choose a level under “Reasoning Effort”; the dropdown lists the model’s declared levels first, falling back to off / minimal / low / medium / high if none are declared.
  3. Click “Test current model & effort”: a spinner appears during the call; on success a green checkmark with “Success” is shown; on failure a red cross with “Failed” is shown; both return to the normal state after ~1 second. The failure reason persists in red below the button until the next successful test.

Custom Prompt

Edit the “Built-in Prompt” text area and click away to save, or directly modify the prompt field in the patch entry. Clearing the content and saving reverts to the built-in default prompt.

API Reference

The following are local same-origin HTTP routes (intended for plugin client calls only). All five routes require the request to originate from the local page with the same origin, and the request body is capped at 64 KiB; otherwise they return 403 FORBIDDEN.

POST /dsh-prompt-smith/enhance

Request:

{ "draft": "登录很慢" }

Success response 200:

{
  "ok": true,
  "text": "<rewritten prompt>",
  "provider": "<auto-resolved local provider>",
  "model": "<auto-resolved local model>",
  "reasoningEffort": "off"
}

Error responses: 400 EMPTY_DRAFT (empty draft), 400 TOO_LONG (exceeds maxChars), 502 <model error code> (includes provider / model), 502 EMPTY_RESULT (model returned no content), 500 HOST_FAILED.

GET /dsh-prompt-smith/settings

Returns { ok, config, defaults, models }: the currently effective configuration, default values (defaults.prompt is the full built-in prompt text), and the model catalog (grouped by provider, 60-second cache). models enumerates the providers and models on the current machine in real time via the host’s ctx.llm.listProviders() / listModels()—each computer sees its own local providers; the plugin neither distributes nor embeds any provider list.

POST /dsh-prompt-smith/settings

Request { "patch": { ... } }, with the same fields as the configuration table. On success returns { ok, config }; on validation failure returns 400 INVALID (e.g., temperature must be a number); on persistence failure returns 500 SAVE_FAILED (in-memory value has been rolled back).

GET /dsh-prompt-smith/efforts?provider=&model=

Returns { ok, provider, model, advertised, efforts }. When advertised is true, efforts contains the model’s declared levels; otherwise it contains the common fallback list.

POST /dsh-prompt-smith/test

Request { "provider": "", "model": "", "reasoningEffort": "auto" }—initiates a minimal call (16 tokens, temperature 0, no retries). On success: 200 { ok, provider, model, effort }; if the level is not supported: 422 EFFORT_UNSUPPORTED.

FAQ

I installed the plugin but can’t see the button?
Verify that --profile matches the profile you are actually running; use dsh plugin --profile <p> why @cyberpzy/dsh-prompt-smith to check installation status; confirm the profile’s package.json has this package name in dsh.profile.bundles (packages with dsh.bundle.patch are written automatically by the host); then restart dsh web and press Ctrl+R.

The test reports “This model does not support the selected reasoning effort (xxx)”?
That combination is not accepted by the provider. Try a different level or a different model; during refinement, a similar rejection will automatically retry once with the effort field removed.

Installation returns 404 / permission denied?
Verify the repository name and tag spelling (github:CyberPzy/dsh-prompt-smith; add #v1.0.3 to pin a version). This is a public repository; no credentials are required.

Will clicking Enhance pollute my conversation?
No. It is a standalone one-shot call—nothing is written to the session log and no model-visible message is generated.

What’s the cost?
Roughly 200–500 output tokens per call, billed by your chosen provider; maxTokens can cap the upper limit.

Will it conflict with other plugins?
It only occupies the conversation.input.right and settings.section slots. It registers no tools, intercepts no requests, and modifies no conversation loop.

Is there any residue after uninstalling?
remove deletes the dependency entry, the node_modules package, and the bundle registration. User configuration in the profile’s patch entry is preserved and automatically reconnected upon reinstallation. For complete removal, manually delete the id: prompt-smith entry from cordis.patch.yml.

How do I roll back a failed installation?
If dsh plugin add fails, it does not write to package.json, so no rollback is needed. If an interrupted install leaves a partial node_modules, re-run add to overwrite it, or run remove first and then install again. To roll back to an older version, use add ...#v<version> to pin the tag.

Host version is below dshTarget?
A warning is emitted at load time, and neither the button nor the settings panel is registered. Upgrade Harness to 0.2.2-rc.3 or later.

Use Cases & Caveats

Ideal for users who frequently need to rewrite casual drafts into structured prompts in DSH, especially for interactive requirements that need state, boundary, and acceptance criteria completion.

The plugin runs with the current DSH process’s permissions. We recommend reviewing the source code and license (MIT, Copyright (c) 2026 pzy) before installing.

Closing

dsh-prompt-smith is a tool in the DeepSeek Harness plugin ecosystem, focused on forging drafts into structured prompts. It does not alter DSH’s core interaction flow—it simply adds a one-click enhancement entry point next to the input box. For installation and configuration details, refer to the plugin directory page and the GitHub repository.

  • Directory page: https://www.skillhub.cn/plugins/CyberPzy/dsh-prompt-smith
  • GitHub: https://github.com/CyberPzy/dsh-prompt-smith
羽毛球分组比赛记分
小程序二维码

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

Xiaoye