DeepSeek Harness Plugin Hub

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

探索

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

社区

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

相关链接

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

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

Smartprompt — DeepSeek Harness 插件(DSH Plugin)
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins
S

dsh-smartprompt

Smartprompt

DSH Web 插件:编辑器下方的 Smart Prompt 按钮可根据您的工作区规范,将草稿改写为结构化提示词,然后填回编辑器。

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

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

兼容性与来源证明

Smartprompt 以 dsh-smartprompt 发布,当前版本为 0.1.0。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

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

版本

0.1.0stable
2026/10/17

相关插件

正在加载相关插件…

最新版
0.1.0
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
web
许可证
MIT
发布源
github
GitHub
★ 0
周下载
0
最近提交
2026/10/17
查看源码 ↗
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、其任务页面和时间上下文的可选捆绑包Ab Ocrdsh-ab-ocr--- description: "外部 ocr 工具:逐页识别扫描的 PDF 或图像,仅在处理完最后一页后按顺序合并页面,并使用模型确定的标题级别保存为一个 Markdown 文档。" kind: "package-reference" ---Client Ui Task Board@linxin666/dsh-client-ui-task-board面向 DSH Web GUI 的主机权威任务面板,支持实际会话执行、主机 cron 调度以及可选的跨平台空闲睡眠保护;以挂载方式提供,无需修改 DSH 源代码。

README

dsh-smartprompt

A DSH Web plugin that adds a Smart Prompt button under the composer. Click it and your rough draft is rewritten into a structured, executable prompt grounded in your workspace conventions — then filled straight back into the composer.

┌─ composer (draft: "make the login form safer") ─┐
└─────────────────────────────────────────────────┘
  ✨ Smart Prompt          ← appears only while the draft is non-empty
  • Empty draft → the button is not rendered.
  • Click → the button shows Optimizing…, the result replaces the draft, the button turns into ✓ Optimized.
  • Failure → one line of explanation next to the button (timeout / no model / model error); the draft is untouched.
  • Each click leaves one command/run + command/done pair in the session log (that is how DSH's command channel works). The plugin renders that as a single-line summary in the conversation (✨ Smart Prompt · N chars · Fill composer), never as the whole prompt.

中文摘要见文末。

Install

Three routes, in order of availability today:

RouteCommandStatus
Git (works now)plugin_manager(action="install_bundle", target="github:shellpower96/dsh-prompt-optimizer#v0.1.0")✅ published
DSH Discover (market index)add https://raw.githubusercontent.com/shellpower96/dsh-prompt-optimizer/main/market/index.json as an index source✅ published
npmnpm i -g dsh-smartprompt / install_bundle dsh-smartprompt⏳ name reserved, publish pending

The package name is dsh-smartprompt (the npm name dsh-prompt-optimizer already belongs to a different project). The repository keeps its original name, so every git spec stays valid.

DSH's plugin catalog is the package manager itself — there is no separate submission portal. Install this bundle from its git repository:

plugin_manager(action="install_bundle", target="github:shellpower96/dsh-prompt-optimizer#v0.1.0")

...or from a local checkout while developing:

plugin_manager(action="install_bundle", target="/absolute/path/to/dsh-prompt-optimizer")

Installing needs pnpm on PATH (the plugin manager runs pnpm add); without it you get spawn pnpm ENOENT. Remove with:

plugin_manager(action="remove_bundle", target="dsh-prompt-optimizer")

The Host half registers the command; the Client half ships as a browser module via dsh.client. Installing a new bundle can arrive over HMR — if the button does not appear, refresh the page once.

Minimal example

An empty config is enough:

- insert:
    - id: prompt-optimizer
      name: 'dsh-prompt-optimizer'
      config: {}

To point it at your own conventions (this is the only integration surface — the plugin assumes no project layout):

- insert:
    - id: prompt-optimizer
      name: 'dsh-prompt-optimizer'
      config:
        docs: ['AGENTS.md', 'README.md', 'docs/architecture.md']
        contextChars: 6000
        systemPromptLocale: auto

Configuration

Every value is read from the row's config; the plugin reads no environment variables and no settings module of its own. Invalid values throw at activation with the field name.

FieldDefaultMeaning
enabledtrueMaster switch; false registers nothing
maxDraftChars4000Reject longer drafts instead of sending them to the model
contextChars8000Total character budget for the project-facts block
maxOutputChars400Character cap for the optimized prompt, defined in Chinese characters; the English ceiling scales to 1.8x. The meta prompt targets 75% of it, so the hard cap only trims a runaway answer
timeoutMs120000Per-call timeout
docs["AGENTS.md","README.md"]Workspace-relative documents read as facts, in order; missing files are skipped, absolute paths and .. are rejected
includeGoaltrueInclude the session's current goal in the facts block
systemPromptLocale"auto"Language of the meta prompt: auto follows the draft's script, zh/en force one. The produced prompt always follows the draft's language

How the prompt is produced

The meta prompt pins five properties (src/prompt.js):

  1. Faithful — clarify, complete, structure; never widen or narrow scope. User decisions become TBD: ….
  2. Grounded — modules, files, commands, conventions and test approaches may only be named if they actually appear in the facts block; otherwise the model writes needs locating instead of inventing them.
  3. Structured — Goal / Current state and landing spot / Constraints and conventions / Task breakdown / Acceptance criteria; empty sections are dropped.
  4. Executable — acceptance criteria must be verifiable (a command, an observable behavior, a concrete file).
  5. Concise — one length budget per locale, expressed in that locale's native unit (Chinese characters / English words), plus a bullet discipline: at most 3 bullets per section and 10 in total, no background preamble, no restating the draft, no duplicated constraints.
  6. Body only — no preamble, no reasoning, no code fence; finalizeOptimizedText() strips a fence or preamble the model adds anyway.

Length budget

With the default maxOutputChars: 400:

LocaleTarget written into the meta promptHard ceiling on the resultToken budget
zh300 字400 characters334
en94 words720 characters600

The target sits below the ceiling on purpose, so a compliant answer is never truncated. If a model overruns anyway, finalizeOptimizedText() cuts at the last complete line (falling back to a sentence end, then a word break, then a hard cut) and appends a single … — it never slices mid-sentence and never writes explanatory text into the prompt body.

Layout

FileRole
index.jsHost entry: validate config, register /optimize-prompt
src/config.jsDefaults + hand-written validation (fails loudly)
src/facts.jsFact collection: read-only, bounded, never throws; branch comes from .git/HEAD, no subprocess
src/prompt.jsPure: draft parsing, meta-prompt assembly (zh/en), output cleanup
src/optimize.jsOrchestration: parse → collect → resolve model route → stream → clean
client.jsBrowser half: composer button, command-row renderer, copy

Model route: the session Agent's own provider/model wins, then the process default model selection (ctx.agentDefaultModel). The call goes through ctx.llm.stream(), so llm/stream middleware still applies.

Tests

node --test

Three groups: public-API unit tests, no-project-context instantiation (no fs, no cwd, no goals, no default model — assertions are "explicit outcome, never an uncaught throw"), and a project-context regression that drives the plugin with a caller-declared docs list.

Known limits

  • Only renders once a session exists. The button lives in conversation.composer.dock (scope session), so a brand-new conversation's first screen has no button; it appears after the first message.
  • The command name is fixed (optimize-prompt): both halves build the command line from a shared constant, and DSH rejects two registrations of the same name in one scope. Renaming it means editing index.js and client.js together.
  • Not a tool: the plugin changes no system prompt and adds no agent tool.
  • Length is a soft promise plus one hard cut: models are asked to stay inside the budget; the cap is only a guard rail. Raising maxOutputChars raises both the target and the ceiling. Every default in src/prompt.js derives from this one config value, so they cannot drift apart.
  • Verified against DSH 0.2.0-rc.2. No peerDependencies are declared on purpose: DSH blocks installation on an incompatible peer, which would be worse than a documented version note.

License

MIT — see LICENSE.


中文摘要

在 DSH Web 输入框下方加一个「✨ 智能提示词」按钮:有草稿时才出现,点击后结合会话工作目录里 你自己声明的项目文档(默认 AGENTS.md / README.md)、git 分支与会话目标,把草稿改写成 「目标 / 现状与落点 / 约束与规范 / 任务拆解 / 验收标准」五段式提示词并回填输入框。

配置全部由调用方注入,插件不读任何环境变量或项目设置;校验失败在激活时直接抛错。 安装:plugin_manager install_bundle 指向本仓的 git 地址。已知边界:全新会话(还没有 session) 时按钮不出现;命令名 optimize-prompt 不可配。