dshbase

Plugin directory / Developer / dsh-prompt-inject

dsh-prompt-inject

Verified · install-tested on dsh H1a3x

✓ Actively maintained Builds on 2 official DSH packages

View on GitHub ↗ ← Back to plugin directory

0Stars
0Forks
0Open issues
JavaScriptLanguage
2026-08-14Last push
Cross-platformPlatform

What it does

System-prompt template injection for DeepSeek Harness — named templates with a global default plus per-workspace overrides.

✅
Our take
Works — verified, early-stage project

System-prompt template injection for DeepSeek Harness — named templates with a global default plus per-workspace overrides. It installs cleanly and boots without issues in our testing. It's early-stage but functional.

“Verified” means our automated CI actually ran dsh plugin add in a clean profile and it booted — nothing more. Feature descriptions and version compatibility are the author’s claims. This is not a security audit and not an endorsement of third-party code.

README

dsh-prompt-inject

简体中文 | [English](README.en.md) > 为 https://github.com/deepseek-ai/deepseek-harness Web 界面提供的系统提示词注入模板管理器。 https://img.shields.io/npm/v/dsh-prompt-inject](https://www.npmjs.com/package/dsh-prompt-inject) https://img.shields.io/badge/license-MIT-blue](LICENSE) 在 **设置 → 插件 → 提示词注入模板** 中维护多套命名提示词模板,并把选中的模板注入到每个会话的**系统提示词正文**。支持一个全局默认模板 + 每个工作区独立选一套模板;选中即生效,无需单独开关,切换后下一条消息即生效。

功能

- 🗂️ **多套命名模板**:增、删、改、预览任意数量的提示词模板 - 🌐 **全局 + 按工作区**:一个全局默认模板;每个工作区可独立选择「跟随全局 / 不注入 / 指定模板」 - ⚡ **即时生效**:变量在每次组装时求值,中途切换下一条消息即生效,新会话自动生效 - 🧩 **注入系统提示词正文**:order 50(位于部署人设之后、工具指引之前) - 🌍 **中英文双语**:卡片文案跟随 Harness UI 语言(zh / en) - 🎨 **深浅主题适配**:UI 使用 Harness 主题 CSS 变量自动跟随明暗

安装

``bash npx dsh-prompt-inject install ` 安装器会自动完成(幂等,可重复运行): 1. 将包安装到 $DSH_HOME/profiles/node_modules/dsh-prompt-inject(dsh 插件解析根,真实目录) 2. 将组合行写入 $DSH_HOME/profiles/<profile>/cordis.patch.yml 完成后**重启 dsh 并刷新浏览器页面**即可。重启是唯一需要手动完成的步骤——宿主模块与组合在进程内缓存,插件无法安全地重启自己的宿主进程。

从源码安装

`bash git clone https://github.com/H1a3x/dsh-prompt-inject.git cd dsh-prompt-inject node scripts/install.js --from . --force `

可选参数

| 参数 | 说明 | |------|------| |
--profile <name> | 指定目标 profile(默认 web) | | --force | 覆盖已安装的包 | | --from <path> | 从指定目录安装(默认脚本所在包的根目录) |

使用

安装并重启后,打开 **设置 → 插件 → 提示词注入模板**: 1. 点「添加模板」,输入名称与提示词正文 2. 在「全局生效模板」下拉里选一个作为默认模板(未在下方覆盖的工作区使用它) 3. 在「按工作区覆盖」里给某个工作区单独选一套模板,或选「不注入」 4. 每个模板行有「预览」按钮,可随时查看正文 选中即生效——无需单独的开关。切换后下一条消息即注入新模板,新会话自动生效。 > 工作区匹配以 host 侧 realpath 规范化后的路径为键,与 agent 会话的
cwd 同源,因此一一对应。

工作原理

` lib/index.js 宿主半:settings 命名空间 + systemPrompt 变量/段 + /prompt-inject 路由 lib/client.js 浏览器半:设置页卡片(shell module-table 格式,无构建步骤) scripts/install.js 一键安装器 ` 注入通过 systemPrompt.variable() + systemPrompt.section() 实现:段文本固定为 {{dsh_prompt_inject_text}},变量 provider 在每次组装时读取当前 settings 与 agent 的工作区,返回该工作区应注入的模板文本。 **插件装载契约**: - package.json 声明 dsh.client.platform = "web" 及 inject 依赖,宿主扫描器据此生成 window.__DSH_BOOT__ 图行并挂载 /plugins/<id>/client.js 路由 - 浏览器半以模块表格式打包,工厂返回 { apply, inject } - UI 入口通过 ctx.slots.inject('settings.plugin.item', …) 注入到设置 → 插件 配置段 - 热更新边界:lib/client.js 内容变化刷新页面即生效;dsh.client 声明变化需要重启 dsh

卸载

删除
$DSH_HOME/profiles/node_modules/dsh-prompt-inject 目录,并从 cordis.patch.yml 移除以下行,然后重启 dsh: `yaml - insert: - id: prompt-inject name: dsh-prompt-inject ` 也可以保留组合行,在 Harness 设置页的插件清单里禁用本插件。

开发

`bash npm run check # 语法检查 npm run install:local # 本地安装验证 ``

许可证

[MIT](LICENSE) © H1a3x

友情链接

- https://linux.do/

Install

🧩 Let your agent install it (recommended)

Install the catalog once, then DeepSeek Harness can find and install any plugin from this site automatically:

dsh plugin add dshbase-catalog

Then say "install dsh-prompt-inject for me" — your agent finds it in the directory and installs it. Docs: dshbase-catalog · verified packs.

Web profile:

dsh plugin --profile web add dsh-prompt-inject

Headless (CLI) profile:

dsh plugin --profile headless add dsh-prompt-inject

Package

npm: dsh-prompt-inject · version 0.1.0 · tested on dsh 0.1.0-rc.6

Test report

Verified end-to-end: L1 install + L2 load + L3 runtime Q&A on dsh 0.1.0-rc.6.

When to use it

Extend the agent's coding surface — give it a new tool, workflow, or integration so it handles a dev task it couldn't before.

Who it's for

Developers who want dsh to behave like a teammate on real codebases — editing, running, and verifying changes rather than just answering.

For developers — extending it

The tool/command surface is the seam: expose more of the SDK, add smarter context wiring, or tighten the loop between code changes and verification.

Security: not yet scanned — our daily static scan will cover it shortly.

Share this badge

More in Developer

Browse all 7797 plugins →