SongMiao-tech/dsh-prompt-optimizer
Prompt optimizer plugin for DeepSeek Harness: rewrite a composer draft into a clearer, more executable prompt with one click.
Listed
0
Ui
Bundle verified
What it does
Optimize Prompt button under the composer: one click rewrites your draft into a clearer, more executable prompt, with a before-and-after dialog and one-click replacement.
Best for
- Users who begin with rough composer drafts and want a clearer, more actionable prompt before sending.
- Workflows that benefit from reviewing the original and rewritten prompt side by side before replacement.
- Multilingual prompting where the rewritten result should retain the input language, code, terminology, and URLs.
Not ideal for
- DSH Web profiles without a configured model, because optimization uses the host LLM.
- Empty drafts or prompts that are already finalized and should remain verbatim.
- Fully automatic submission workflows, since the plugin presents a review dialog and replaces the composer text rather than sending it.
README
dsh-prompt-optimizer
A prompt-optimizer plugin for DeepSeek Harness (dsh). It adds an ✨ Optimize Prompt button right below the chat composer: click it to rewrite your draft into a clearer, more executable prompt — then apply it back into the input box with one click.
Features
- Button rendered under the composer (via the
conversation.composer.dockslot) - Reads the current composer text on click; friendly prompt when empty
- Rewrites the draft through the host’s
ctx.llmwith a fixed six-step procedure (intent → context → hidden constraints → gaps → restructure → language check) - Before/after dialog with a Replace into input button that writes the result back
- Output always matches the input language; code, terms, and URLs are preserved
Requirements
- DeepSeek Harness
dsh(web profile) with a configured model (e.g. a DeepSeek API key in Settings → Models)
Install
dsh plugin --profile web add https://github.com/SongMiao-tech/dsh-prompt-optimizer
Or clone and install from source:
git clone https://github.com/SongMiao-tech/dsh-prompt-optimizer.git
cd dsh-prompt-optimizer
pnpm install
pnpm run build
Then register the bundle in your profile’s cordis.patch.yml:
- insert:
- id: prompt-optimizer
name: '@deepseek-ai/dsh-prompt-optimizer'
- id: ui-prompt-optimizer
name: '@deepseek-ai/dsh-client-ui-prompt-optimizer'
Usage
- Type a rough draft in the composer
- Click ✨ Optimize Prompt
- Review the rewrite in the dialog
- Click Replace into input to swap it in, then send
Development
pnpm install
pnpm run build # tsc + tsdown for both packages
pnpm run test # vitest unit tests
Structure
.
├── cordis.patch.yml # bundle manifest patch (host + client rows)
├── packages/
│ ├── prompt-optimizer/ # host half: promptOptimizer Remote over ctx.llm
│ └── ui-prompt-optimizer/ # client half: dock button, dialog, write-back
└── scripts/ # vendored tsdown client-bundle preset
License
Frequently Asked QuestionsFAQ
Use the verified command dsh plugin --profile default add github:SongMiao-tech/dsh-prompt-optimizer in a DSH-enabled shell. The command resolves the public package metadata and keeps the plugin attached to the catalog identity shown on this page.
Compatibility follows the bundle and profile status shown above. If a profile is not detected, keep the plugin disabled there and check the repository documentation before enabling it in production.
The GitHub link and activity metadata are the source of truth for releases and maintenance. Revisit this page after a new release to confirm the catalog has observed the latest version.