dsh-smart-prompt
Manifest validOne-click prompt refinement for the DSH composer: the ✦ button next to Send rewrites the draft into an agent-ready prompt in Standard or Light mode, with Revert and Retry; asks follow-up questions thr
dsh-smart-prompt
A DSH plugin that turns a rough composer draft into a clear prompt an agent can act on, in one click.
Type your request the way you would say it, click the ✦ button next to Send, and the draft is replaced with a cleaner version. Paths, names, numbers, URLs and code from your draft are kept exactly as you wrote them.
Install
In DSH, open Plugins → Add plugin and enter dsh-smart-prompt. Or from a terminal:
dsh plugin --profile web add dsh-smart-prompt
Restart DSH. The ✦ button appears in the composer, just left of Send. No API key is needed: the plugin uses the models you have already set up in DSH.
To uninstall:
dsh plugin --profile web remove dsh-smart-prompt
Use it
-
Type a draft, for example:
can you change maxRatioFor in src/host/config.ts to 2.5 and check it with
pnpm build -
Click ✦. After a few seconds the draft becomes:
Change
maxRatioForinsrc/host/config.tsto2.5, then verify withpnpm build. -
A short note above the composer shows the result: how many hard facts were kept, the length change, and the time taken.
-
Not happy with it? Use the Revert | Retry buttons next to ✦:
- Revert puts your original draft back.
- Retry generates a new version from your original draft.
They stay available until you edit or send the draft.
Click ✦ again while it is working to cancel. If anything goes wrong (no model, timeout, network error), your draft is left untouched and a short error explains why.
Slash commands work too: in /bugfix <text> the command stays as is and only the text is rewritten.
Follow-up questions
If the draft is missing something only you can answer (which endpoint, what limit, which option), DSH's question card opens in place of the composer with a few short questions. Answer them and the prompt is rewritten again with your answers included.
- Answer "I don't know" and the prompt tells the agent to find it out itself, or to suggest options and carry on with the most reasonable one.
- Skip a question or close the card, and you get the first rewrite with
(TBD: …)notes for the gaps. - If the request fails after you answered, click Retry on the error bubble. Your answers are reused, so you are not asked again.
- No questions are asked when the draft already has what it needs.
What it guarantees
- Nothing important is lost. Before rewriting, the plugin lists the hard facts in your draft: file paths, identifiers, numbers and versions, URLs,
code, and @mentions. It then checks that each one survived. If the model dropped one, it gets one more try. If a fact is still missing, it is added back at the end under "Preserved original details". - Nothing is invented. A vague draft is not padded with made-up requirements. Gaps are marked
(TBD: …)instead. - No runaway length in Light mode. A Light rewrite may grow to 2× the draft, and always at least 600 characters. A longer result gets one chance to shorten. If it is still too long, it is discarded and your draft is kept. Standard mode has no length cap by default (set
standardMaxRatioto add one). - At most three model calls per click: the rewrite, a second rewrite with your answers (only when you answered follow-up questions), and one repair.
Settings
Open Settings → Plugins → dsh-smart-prompt (DSH 0.2 or later).
| Setting | Options |
|---|---|
| Improvement method | Standard: restructures the draft so an agent can execute it directly. Light: only removes filler and clears up ambiguity. |
| Model used to improve prompts | Conversation model: uses the model chosen in the current conversation, or your DSH default. Dedicated model: always uses the model you pick here, with its own reasoning effort. |
| Follow-up questions | The most questions to ask when the draft is missing information. Default 5. |
Session context
When a draft can't stand on its own, such as "do the same for that endpoint" or a very short draft, the plugin includes the last few turns of the conversation. Only your messages and the assistant's text replies are sent. Tool results, images and source code are not.
Advanced
Configuration
Other options live in the profile's cordis.patch.yml. All are optional; the values below are the defaults:
- insert:
- id: dsh-smart-prompt
config:
lightMaxRatio: 2
standardMaxRatio: 0 # 0 = no length cap
acceptanceCriteria: false # Standard: add a checkable "done when" line
temperature: 0.3
maxTokens: 8192
timeoutMs: 180000
maxInputChars: 20000
contextTurns: 3 # 0 turns session context off
contextChars: 6000
smartContext: true
fidelityGate: true
lengthGate: true
reasoningEffort: low # effort used with the conversation model
logFailures: true
Custom prompts
The rewriting instructions are plain Markdown files in prompts/:
discipline.md: the shared rules.standard.mdandlight.md: one file per mode.questions.md: when and how to ask follow-up questions.answers.md: how to fold your answers in, including "I don't know".
To change them, put a file with the same name in $DSH_HOME/dsh-smart-prompt/prompts/. Your file is used instead of the built-in one.
Local HTTP API
These endpoints accept local connections only:
GET /dsh-smart-prompt/api/configreturns the current mode and limits.POST /dsh-smart-prompt/api/improvewith{ "text": "...", "sessionId": "...", "mode": "standard" }returns the rewritten text and its quality figures.
Build from source
pnpm install
npx tsc -p tsconfig.json # host half → lib/
npx tsdown # browser half → lib/client.js
node --test test/*.test.mjs
The built lib/ is committed, so installing from GitHub needs no build.
Credits
Forked from dsh-improve-prompt by hoyyang. See CONTRIBUTORS.
License
Comments
Loading…
Similar plugins
by hoyyang
One-click prompt improvement for the DSH composer: press the sparkle button to rewrite the draft into an agent-ready prompt, replaced in place and undoable, with a deterministic fidelity check that ke
★ 4
↓ 241/wk
MIT
TypeScript
Sep 24, 2026
dsh plugin --profile web add dsh-improve-promptby ruiyukirin
DSH 输入框一键提示词增强按钮 | One-click prompt enhancement for the DeepSeek Harness composer: rewrite the unsent draft into a clearer, more specific prompt, restore the original with one click. Ported from Tencent WorkBuddy's EnhancePrompt design; independent model call that never touches the session log.
★ 1
MIT
JavaScript
Oct 14, 2026
dsh plugin --profile web add dsh-prompt-optimization-masterOne-click prompt enhancement for the DeepSeek Harness composer: a chip beside the model selector rewrites the draft into a structured prompt using the session's own model.
★ 0
MIT
JavaScript
dsh plugin --profile web add dsh-prompt-enhanceOne-click prompt polisher for the DSH composer: a ✨ button next to the message box opens a side-chat where an agent refines your rough draft over multiple turns, then you copy the result back. Replays
★ 0
dsh plugin --profile web add narrative-prompt-polishby xiaoshengliang2002
Enhance the composer draft before sending: a sparkle button in the DSH web GUI rewrites your prompt in a structured or light mode, with an original-versus-enhanced preview.
★ 0
MIT
JavaScript
Sep 15, 2026
dsh plugin --profile web add dsh-prompt-boost-proby zzy6-a
DSH 输入框旁的一键提示词增强:把口语化的一句话改写成目标明确、细节完整的任务说明,可一键撤销;五种改写风格、模型可跟随或固定,含 @引用/命令芯片时自动置灰保护。
★ 1
↓ 2.7k/wk
MIT
TypeScript
Sep 14, 2026
dsh plugin --profile web add dsh-prompt-enhance