dsh-prompt-lab: Rewriting Drafts into Agent Structured Prompts in the DSH Input Bar

Preface

When writing prompts in DeepSeek Harness (DSH), a common approach is to simply hand them to the model for “one round of polishing.” The output is often smoother, but it may not be organized into an Agent pipeline with role / task / context / constraints / output format, and reusing or iterating on it later in the composer is not intuitive.

Below we introduce the community plugin Prompt Workshop (dsh-prompt-lab, maintained by xueccci). It provides an Optimize entry in the DSH Web input box: it first uses rules or an optional LLM to rewrite the current draft into an executable Agent structure, then shows the original draft alongside a confirmation dialog with five-layer diagnostics and an output score, letting you decide whether to write it back to the composer. Local rules work offline; when fine-tuning is needed, you can use hybrid, DSH-only, or an OpenAI-compatible cloud API.

What Is This

dsh-prompt-lab is an Agent-structured prompt optimization plugin for DeepSeek Harness, categorized under model-reasoning-related capabilities. It addresses the problem of organizing scattered drafts in the composer into structured prompts with role, task, context, constraints, and output format, and gives you a clear confirmation step before writing back.

The plugin is an independent community project under the MIT license and is not affiliated with DeepSeek AI. Installation and capability documentation are governed by the GitHub repository and the SkillHub directory page; SkillHub is an independent plugin directory site, not an official DeepSeek app store.

Environment requirements: DSH >= 0.2.0-rc.2 (the Typert strict codec requires the create() factory; model metadata is read via llm.resolveModelInfo()).

Core Features

Differences from ordinary “polishing”

Generic polishing-type plugins dsh-prompt-lab
Method Lets the model rewrite once First performs Agent ladder structuring
Modes Multiple strategy tags Standard optimization / Condense / Expand
Offline Usually depends on the model Local rules can produce structured results
Confirmation Silent write-back Dialog + score + explicit actions
Failure Hard failure Falls back to local, with a yellow bar hint

Three Modes

  1. Standard optimization: rewrite into an Agent structure (role / task / context / constraints / output format).
  2. Condense: extract the backbone—core task, hard constraints, deliverables.
  3. Expand: only elaborate the requirements the user explicitly named in the original draft.

Four Engines

Engine Behavior
Local only Offline rules, does not call a model, draft never leaves the machine
hybrid (default) Local skeleton → then refined through DSH when provider and model can be resolved
DSH only Prefer DSH; if no model or on failure, fall back to local + yellow bar
Cloud API OpenAI-compatible HTTP (DeepSeek or custom); on failure likewise falls back to local + yellow bar

hybrid / DSH only / Cloud API will send the draft and local skeleton to the configured model provider; Local only keeps data on the machine.

Request timeout: idle 15s / total 60s.

Confirmation Dialog

After clicking Optimize (or Ctrl/Cmd+Enter), the dialog shows the original draft, the result, five-layer chips, and an output score. The original draft on the left is editable.

Action Behavior
Continue optimizing Run another round on the current left draft (same logic as the entry Optimize)
Backfill input Fill the right result into the left original draft for secondary editing
Adopt Write the left original draft back to the composer, toast “Written”; only writes back when the composer’s original draft has not been modified
Copy Copy the right result to the clipboard
Cancel / Esc / × Do not modify the composer draft

Installation and Activation

Given DSH is installed and using the web profile, install the pinned version according to the README:

dsh plugin --profile web add github:xueccci/dsh-prompt-lab#v0.2.0

Restart the Web process for that profile and force-refresh in the browser with Ctrl+Shift+R. On Linux you can use the following command to confirm the plugin is loaded (the Windows documentation example uses findstr; you can switch to grep according to your environment):

dsh --profile web --dump-config | grep dsh-prompt-lab

After success, an Optimize button should appear on the left side of the composer input box.

Typical Usage

  1. Write your draft in the composer input box.
  2. Click Optimize or press Ctrl/Cmd+Enter.
  3. View the original draft and result in the dialog; you can edit on the left, or Continue optimizing / Backfill input.
  4. Once confirmed correct, click Adopt to write the left content back to the input box (effective when the composer draft has not changed).

In Settings → Prompt Workshop you can adjust:

  • Engine: Local only | hybrid (default) | DSH only | Cloud API
  • Mode: Standard optimization | Condense | Expand
  • Cloud API: Base URL / Key / Model, including connection test
  • Reasoning behavior: Self-loop, keyboard shortcuts (enabled by default)
  • About: Maintainer and plugin information

The Cloud API key is stored in browser localStorage and will not be written to workspace files.

Applicable Scenarios and Caveats

Suitable for: developers who often write Agent-style prompts in the DSH Web composer, want a unified five-part structure, and need manual review before writing back.

Caveats:

  • The plugin runs with the permissions of the current DSH process; before installing, it is recommended to read the source code and the MIT license (see the repository’s LICENSE and NOTICE).
  • Non-local engines will send the draft and skeleton to the configured provider; for sensitive content please prefer Local only, or build your own controllable cloud endpoint.
  • If refinement fails, local structured results will still be provided; pay attention to the yellow bar message in the interface.

The DSH ecosystem emphasizes “everything is a plugin”; this plugin’s current package version is 0.2.0, with 3 GitHub stars (as shown on the directory page and repository page).

Links

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

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

Xiaoye