DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins
P

@stijnus/dsh-prompt-optimizer

Prompt Optimizer

通过会话模型优化 DeepSeek Harness composer 草稿,将其整理为结构化提示词,并复用 Prompt Optimizer 的改写引擎。可选择 plain、sections 或 role-task-goal 输出。

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add github:Stijnus/dsh-prompt-optimizer#ad5922d74fafd8a1e9cb1f91805c8ed41116b648
README兼容性版本

兼容性与来源证明

Prompt Optimizer 以 @stijnus/dsh-prompt-optimizer 发布,当前版本为 0.2.1。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
web
发布来源
github
Registry 更新时间
2026/10/25

版本

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

相关插件

正在加载相关插件…

最新版
0.2.1
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
web
许可证
MIT
发布源
github
GitHub
★ 1
周下载
0
最近提交
2026/10/28
查看源码 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题

相关插件

继续浏览 productivity-workflow 分类下经过校验的插件。

Acp App@deepseek-ai/dsh-acp-appdsh ACP 配置文件包:基于 dsh-base 的仅限自动化的 JSON-RPC stdio 和进程生命周期管理Experimental Schedule Bundle@deepseek-ai/dsh-experimental-schedule-bundle为 Web 组合添加 Schedule、其任务页面和时间上下文的可选捆绑包Client Ui Task Board@linxin666/dsh-client-ui-task-board面向 DSH Web GUI 的主机权威任务面板,支持实际会话执行、主机 cron 调度以及可选的跨平台空闲睡眠保护;以挂载方式提供,无需修改 DSH 源代码。Ab Ocrdsh-ab-ocr--- description: "外部 ocr 工具:逐页识别扫描的 PDF 或图像,仅在处理完最后一页后按顺序合并页面,并使用模型确定的标题级别保存为一个 Markdown 文档。" 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.