dsh-input-optimizer: Rewriting prompts in the input box using existing Harness routes

Introduction

When writing prompts in DeepSeek Harness (DSH), drafts tend to be too colloquial, lack constraints, or the model lacks context when you follow up with “make it more formal.” Copying text to external tools interrupts the conversation flow and often requires separate API configuration. This article introduces the standalone plugin dsh-input-optimizer: it adds a “Prompt Optimize” entry next to the DSH input box. It rewrites the current draft via the Harness’s configured LLM route and displays a side-by-side comparison of the original and optimized versions for you to decide whether to adopt.

What is this

dsh-input-optimizer is published by maintainer xkjxziochu, categorized under model inference, and currently has 0 stars on GitHub. It is a standalone DSH plugin: clicking the optimize button next to the input box sends the current draft to the selected optimize route in the Harness and displays the comparison results in a confirmation panel; you can replace the draft by adopting the suggestion or keep it by canceling.

Its capabilities were extracted from dsh-better-input, retaining only prompt optimization. The voice recognition pipeline and ASR transcription cleanup are not included in this plugin.

Core Features

One-click Input Optimization

Click “✨ Prompt Optimize” next to the send button. The current draft is sent to the configured optimize route, and the result appears in the confirmation panel. The panel offers “Adopt” and “Cancel”: adopting replaces the input box content, while canceling keeps the original draft.

Reuses Harness Credentials and Routes

The plugin calls via ctx.llm without requiring a separate API Key, using the provider/model you have already configured in DSH.

Recent Context

By default, it includes the last 3 conversation turns (configurable from 0–20 turns) to facilitate rewriting follow-up instructions within existing context. Setting this to 0 passes no context at all.

Settings

Edit these in the “Prompt Optimization” section of the DSH settings page. The namespace is dsh-input-optimizer (derived from the Config schema exported by the plugin; all fields are .volatile(), allowing live modification in dsh-settings).

Field Description
Optimize provider / model The route used for rewriting; automatically filled with the first available route on first open.
Reasoning effort The effort level for rewriting; leaving it empty disables thinking (uses the model’s advertised off level, otherwise the adapter default).
Custom optimize prompt Completely replaces the built-in system prompt; if empty, the built-in one is used.
Context turns Number of recent turns to include as context (0–20).

Installation & Enablement

It is recommended to install from npm to a specified profile:

dsh plugin --profile <profile> add dsh-input-optimizer

The package includes cordis.patch.yml (declared as dsh.bundle.patch), which inserts the bundle entry dsh-input-optimizer into the profile.

Environment Requirements: dsh ^0.2.0-rc.1. Changes related to this plugin in the 0.2 line include: the Typert codec changed to { create: () => schema }; dsh-settings uses Config to derive namespaces, replacing the original register() with describe() / update().

The plugin runs with the permissions of the current dsh process. Before installing, please review the source code and MIT license of the GitHub repository (package version 0.1.0).

Typical Usage

  1. Configure at least one available LLM route in the Harness.
  2. After installing the plugin, open the “Prompt Optimization” settings and confirm the Optimize provider/model. Adjust Context turns, Reasoning effort, or Custom optimize prompt as needed.
  3. Write your draft in the conversation input box (or write a follow-up that needs rewriting, e.g., to be more formal or concise).
  4. Click “✨ Prompt Optimize” next to the input box and wait for the confirmation panel to display the original and optimized text.
  5. If satisfied, click “Adopt” to write it back to the input box and send it as usual; otherwise, “Cancel” to continue editing the original draft.

Use Cases & Notes

Suitable for: Developers or regular conversational users who have already configured model routing in DSH, want to iterate on prompts within the same interface, and need to compare the original text before deciding to replace it.

Notes:

  • Rewriting quality depends on the selected route and custom system prompt. A large Context turns value may bring in irrelevant history, so adjust it to a suitable value between 0–20 based on the task.
  • Does not include voice input or ASR post-processing; if full “better input” capabilities are needed, please refer to the upstream dsh-better-input.
  • The community directory SkillHub Plugin Page is an independent site with no official affiliation to DeepSeek / High-Flyer. Installation and configuration are subject to the repository README.

Conclusion

dsh-input-optimizer brings “prompt modification” into the DSH input box: it uses existing Harness LLM routes, optional recent conversation context, and a side-by-side comparison for manual adoption. Directory and Source Code:

  • Directory Page: https://www.skillhub.cn/plugins/xkjxziochu/dsh-input-optimizer
  • GitHub: https://github.com/xkjxziochu/dsh-input-optimizer
羽毛球分组比赛记分
小程序二维码

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

Xiaoye