dsh-smart-prompt: One-click convert Composer drafts to executable Agent prompts

Introduction

When conversing with an Agent in DSH, drafts in the input box are often colloquial, lack specific steps, and mix paths with commands. Sending them directly works, but the model is more likely to miss file changes or misunderstand the scope. A common practice is to manually rewrite them into “where to change, what to change, how to verify”; repeating this is time-consuming. dsh-smart-prompt hooks into the Composer input area and uses a single model call before sending to organize the draft into a clearer, more executable prompt, while striving to preserve the paths, identifiers, numbers, URLs, and code snippets you wrote. Maintained by Arrosam, this plugin is an MIT-licensed personal fork of dsh-improve-prompt, categorized as model inference in the community directory. The current npm package version is 1.0.0, and the GitHub repository has 1 star.

What is this

dsh-smart-prompt is a DeepSeek Harness (DSH) plugin: you write your requirements in the Composer as you normally speak, click the ✦ button to the left of the send button, and after a few seconds, the draft is replaced with a cleaner version. No separate API Key configuration is required; the rewrite uses the conversation model you have already configured in DSH (you can also specify a dedicated model in the settings).

  • Directory Page: https://www.skillhub.cn/plugins/Arrosam/dsh-smart-prompt
  • Source Code & Documentation: https://github.com/Arrosam/dsh-smart-prompt

Core Features

One-click Rewrite, Undo, and Retry

After the rewrite is complete, a brief summary appears above the input box: how many “hard facts” were preserved, the change in length, and the time taken; if the provider reports token usage, it displays usage in the format input(cached) - output. If you are not satisfied, you can use Revert to restore the original draft or Retry to generate a new version based on the original draft. These buttons remain available until you edit or send the text. Clicking ✦ again while the rewrite is in progress will cancel it. If there is no available model, a timeout, or a network error, the draft will not be modified, and a brief error message will be displayed.

In slash command scenarios, e.g., /bugfix <text>, the command prefix remains unchanged, and only the text following it is rewritten.

Hard Fact Protection & Gap Annotation

Before rewriting, the plugin lists the hard facts in the draft: file paths, identifiers, numbers and versions, URLs, code blocks, and @ mentions. After rewriting, it checks if they are still present in the text; if the model omits any, it retries once; if they are still missing, they are appended under “Preserved original details” at the end of the text. Vague requirements will not result in fabricated details; gaps are marked with (TBD: …).

In Light mode, the rewritten result does not exceed twice the length of the draft and must be at least 600 characters; if it is too long, it attempts to shorten it. If it still exceeds the limit, the rewrite is discarded, and the original draft is kept. Standard mode has no default length limit, but can be restricted via standardMaxRatio in advanced configuration.

Attachments & Session Context

Images and attachments in the Composer are sent with the draft to the rewriting model, facilitating requirements like “fix the error based on the screenshot” or “implement according to the attachment specifications.” Text attachments are read for content, up to the first 20,000 characters per file; other types are passed only by filename. Attachments remain in the Composer and are sent to the Agent as usual; you must wait for the upload to complete before clicking ✦.

When the draft cannot be understood independently (e.g., “do the same thing for that endpoint”), the plugin can include the last few turns of the conversation: your messages (including images attached at that time) and the assistant’s text replies. If that is still insufficient, it can search and read earlier messages in the session according to Session lookup rounds (default 3, 0 to disable). Tool results, injected contexts, and source code read by the Agent are not sent.

Follow-up Questions & Stardea

If the draft lacks information that only you can determine (which endpoint, limits, options), a follow-up question panel pops up in the input area, with your original text still displayed at the top. After answering, it rewrites again incorporating the answers; selecting “I don’t know” instructs the prompt to require the Agent to find out itself or proceed with a reasonable default after providing options. Skip or leaving it blank skips the corresponding question, marking the gap with (TBD: …) in the first version of the rewrite; × closes the panel and cancels the rewrite, leaving the draft unchanged.

Next to the follow-up questions is Stardea: it can combine the current conversation with model self-proposals, and perform web searches if Stardea web search is enabled and DSH is configured for web search. It provides up to Stardea ideas per click suggestions per click (default 4) and marks the sources. You can check suggestions and add text; clicking Stardea again appends non-duplicate new suggestions below. Each click performs up to Stardea search rounds search rounds (default 1; if 0, only self-proposals are used, and web search is disabled by default).

Installation & Enablement

Open Plugins → Add plugin in DSH and enter dsh-smart-prompt; or run the following in the terminal:

dsh plugin --profile web add dsh-smart-prompt

After restarting DSH, a ✦ appears to the left of the Composer send button. To uninstall:

dsh plugin --profile web remove dsh-smart-prompt

Settings entry: Settings → Plugins → dsh-smart-prompt (requires DSH 0.2 or higher).

Setting Item Description
Improvement method Standard: Reorganize the draft for direct execution by the Agent; Light: Only remove redundancy and disambiguate
Model used to improve prompts Conversation model or Dedicated model (can select model and reasoning effort separately)
Follow-up questions Follow-up question limit, default 5
Session lookup rounds Number of lookup rounds within the session, 0–10, default 3
Stardea ideas per click Number of new suggestions per Stardea click, 1–8, default 4
Stardea search rounds Number of search rounds per Stardea click, 0–10, default 1
Stardea web search Whether to allow Stardea to use DSH web search, default off

More options are available in the profile’s cordis.patch.yml, all optional; see the Advanced / Configuration sections of the repository README for details.

Typical Usage

The example given in the README is as follows.

  1. Enter a draft in the Composer, e.g.:
    can you change maxRatioFor in src/host/config.ts to 2.5 and check it with pnpm build
  2. Click ✦, and after a few seconds, the draft might become:
    Change maxRatioFor in src/host/config.ts to 2.5, then verify with pnpm build.
  3. Check the explanation above the input box regarding the number of facts preserved, length, and time taken. Send after confirmation; or adjust further using Revert / Retry.

Use Cases & Notes

Suitable for developers who frequently write development tasks in DSH Composer, wish to unify prompt structure before sending, but do not want to manually rewrite them item by item. The rewrite calls your configured model, which may incur token consumption; multiple calls within a single click (rewrite, re-rewrite with answers, fix, session lookup, Stardea) continue on the same session chain, and providers supporting prompt caching can count duplicate inputs as cache hits.

DSH plugins run with the permissions of the current dsh process. Please review the source code and MIT license of the GitHub repository before installing. The community plugin directory (such as SkillHub) is an independent site and has no official affiliation with DeepSeek / High-Flyer. The facts in this article are based on the repository README and package metadata.

Conclusion

dsh-smart-prompt condenses “colloquial draft → executable prompt” into a single click in the Composer, emphasizing that hard facts are not lost, gaps are not fabricated, and actions can be undone and retried. For installation instructions and complete configuration, please refer to the directory page https://www.skillhub.cn/plugins/Arrosam/dsh-smart-prompt and https://github.com/Arrosam/dsh-smart-prompt.

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

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

Xiaoye