DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in
← Plugins
P

@stijnus/dsh-prompt-optimizer

Prompt Optimizer

Optimize the DeepSeek Harness composer draft into a structured prompt through the session model, reusing the Prompt Optimizer rewrite engine. Choose plain, sections, or role-task-goal output.

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add github:Stijnus/dsh-prompt-optimizer#ad5922d74fafd8a1e9cb1f91805c8ed41116b648
READMECompatibilityVersions

Compatibility and provenance

Prompt Optimizer is published as @stijnus/dsh-prompt-optimizer and currently resolves to version 0.2.1. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
web
Release source
github
Registry updated
10/25/2026

Versions

0.2.1stable
10/25/2026
0.2.0stable
10/25/2026

Related plugins

Loading related plugins…

Latest
0.2.1
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
Unavailable
Files
Unavailable
Surface
web
License
MIT
Source
github
GitHub
★ 1
Weekly downloads
0
Last push
10/28/2026
View source ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue

Related plugins

More verified plugins in productivity-workflow.

Acp App@deepseek-ai/dsh-acp-appThe dsh ACP profile bundle: automation-only JSON-RPC stdio and process lifecycle over dsh-baseExperimental Schedule Bundle@deepseek-ai/dsh-experimental-schedule-bundleOptional bundle that adds Schedule, its task page, and time context to the Web compositionClient Ui Task Board@linxin666/dsh-client-ui-task-boardHost-authoritative task board for the DSH Web GUI with real session execution, Host cron scheduling, and optional cross-platform idle-sleep protection; mounted without DSH source changes.Ab Ocrdsh-ab-ocr--- description: "The out-of-tree ocr tool: recognizes a scanned PDF or image page by page, merges the pages in order only after the last one, and saves one Markdown document with the heading levels the model decided." kind: "package-reference" ---

README

@stijnus/dsh-prompt-optimizer

A DeepSeek Harness plugin that optimizes the prompt you are about to send.

It adds a ✨ Optimize prompt control next to the composer send button. Clicking it rewrites the current draft into a structured prompt and streams the result into a panel above the composer, with Use, Undo, Copy, and Close. Nothing is sent to the agent; the draft is only replaced when you click Use.

It runs on the model the session is already routed to (the same route the next turn would use), and it never writes to the Session log.

Prompt style

The rewritten prompt can take three shapes, chosen in Settings → General → Prompt style:

StyleOutput
plain (default)One continuous, heading-free prompt.
sections## Role / ## Task / ## Context / ## Format headings.
role-task-goalRole: / Task: / Goal: labeled lines.

The row stores a per-browser override. A profile can set the default for everyone through the plugin's Config:

- id: prompt-optimizer
  name: '@stijnus/dsh-prompt-optimizer'
  config:
    outputStyle: sections

Until the row is changed, it shows that profile default; an override in the row wins for requests from that browser. The result panel names the style that produced it.

Naming: this package is scoped because the unscoped name dsh-prompt-optimizer already belongs to a different author on npm. This plugin is unrelated to that package; both optimize composer prompts, but this one reuses oss-prompt-optimizer as its rewrite engine.

Install

dsh plugin --profile web add @stijnus/dsh-prompt-optimizer

Then restart the Harness (or refresh the page for the Client half). The plugin appears in Settings → Plugins as Prompt Optimizer.

Compatibility: DSH >=0.2.1-rc.3 <0.3.0-0, Node >=20.

Market

The plugin is listed in the Stijnus market index that the desktop profile already reads, so it appears in Settings → Plugin Market next to Composer Predictions:

  • https://raw.githubusercontent.com/Stijnus/dsh-composer-predictions/main/market-index.json

This repository also publishes its own format-1 index, for anyone who wants a focused source:

  • https://raw.githubusercontent.com/Stijnus/dsh-prompt-optimizer/main/market-index.json

Market sources are cached for 10 minutes per URL by the Host, so a newly published version can take that long to show up in an open market panel.

Where the rewrite logic lives

This plugin does not re-implement prompt rewriting. It imports the engine from the published Prompt Optimizer implementation, oss-prompt-optimizer.

LayerModuleSymbol
Meta-prompt buildeross-prompt-optimizer/lib/meta.jsbuildOptimizePrompt(input, language, extraInstructions, examples, outputStyle, metaLanguage, diagnosis, templates, context, taskType, maxOutputTokens, profile, level, builtinExamples, compact, sceneRefEnabled)
Template dataoss-prompt-optimizer/lib/templates.jsMETA_PROMPT, META_PROMPT_EN, DEFAULT_TEMPLATES
System-prompt wrappeross-prompt-optimizer/lib/prompt.jsbuildOptimizeSystem(ctx, input, outputLanguage, diagnosis, profile)
Rewrite executor (full service)oss-prompt-optimizer/lib/optimizer.jsclass PromptOptimizerService, optimize(rawInput, options)
Output validationoss-prompt-optimizer/lib/validate.jsREQUIRED_SECTIONS, hasValidSections, truncateInput, …

Those files sit behind the package's exports map, which only exposes the root, ./client, ./cordis.patch.yml, and ./package.json. The root re-exports the functions this plugin needs, so the supported import is:

import { buildOptimizePrompt, detectLanguage } from 'oss-prompt-optimizer'

index.js builds the meta-prompt with buildOptimizePrompt(draft, 'auto', …, 'plain', metaLanguage), sends the short user turn "只输出优化后的提示词。" / "Output only the optimized prompt.", and streams the answer back over SSE. That mirrors the upstream PromptOptimizerService.optimize() call shape — but the upstream service itself is not mounted, so this plugin owns its own route, timeout, and SSE framing, and no second ✨ control or settings panel appears.

Those defaults match upstream: outputLanguage: 'auto' (no forced-language line, the rewrite follows the draft) and outputStyle: 'plain' (a heading-free prompt body, which is what the composer holds).

Deep imports such as oss-prompt-optimizer/lib/meta.js are blocked by the package exports map (ERR_PACKAGE_PATH_NOT_EXPORTED). If a future release removes the root re-exports, add an exports entry upstream or vendor lib/meta.js + lib/templates.js into this package.

Files

FileRole
index.jsHost half: POST /prompt-optimizer/optimize (SSE), owner guard, route resolution, timeout, disconnect handling.
client.jsBrowser half: conversation.input.right control and conversation.input.dock panel.
cordis.patch.ymlInserts the prompt-optimizer Host row.
locale/en.json, locale/zh.jsonPlugin Manager / Settings display metadata.
icon.svgOriginal artwork.

UI layout notes

conversation.input.dock renders entries with no width wrapper, so a dock entry that does not constrain itself becomes full-bleed. The panel adopts the host's own dock geometry:

  • max-width: var(--dsh-chat-content-width, 920px) — the inherited transcript / composer column (clamp(680px, column * .64, 920px), user-draggable).
  • margin: 0 auto calc(0px - var(--dsh-composer-stack-gap, 6px) - 3px) and top-only border-radius with no bottom border, so the panel merges into the composer card instead of floating above it.

After a draft is replaced, Undo becomes the primary action and the applied note is an aria-live status region.

Development

npm install
npm test

npm test runs the Client render tests (module format, slot registrations, dock geometry, state transitions) and a Host integration test that streams a stubbed model call through the real route handler.

Local profile install

plugin_manager { action: "install_bundle", target: "<checkout>" }

install_bundle links a local directory (link:), so the profile's pnpm install does not install this package's dependencies — Node resolves imports from the plugin's real path. Run npm install in the checkout first, which creates the local node_modules/oss-prompt-optimizer the Host half imports. Harness packages used inside oss-prompt-optimizer (such as @deepseek-ai/cordis) resolve from the DSH installation at runtime.

Release

Releases are tag-driven: pushing vX.Y.Z runs .github/workflows/release.yml, which checks the tag against package.json, runs the tests, and publishes to npm with a provenance attestation. See RELEASING.md for the one-time trusted-publishing setup.

License

MIT. The imported rewrite engine is MIT-licensed by its author (seven282/oss-prompt-optimizer).

Interrupted or failed rewrites cannot be applied. The original draft remains editable; only a completed result enables Use. Undo restores the draft captured when Use was clicked.