DSH Plugins Marketplace

DSH Plugins

Plugins

/

dsh-inject-head

H

dsh-inject-head

Discovered

Inject a fixed block of text at the very top of every DeepSeek Harness system prompt, including complete-prompt presets. Zero dependencies.

dsh-inject-head

Inject a fixed block of text at the very top of every DeepSeek Harness system prompt — including presets that normally discard outside contributions.

Zero dependencies. One file to edit. Takes effect on the next turn, no restart.

your text                                  ← line 1, this plugin
You are an AI agent that helps the user…   ← harness identity
…deployment persona, tools, policies…

Why this needs two mechanisms

DSH assembles a prompt by sorting sections ascending on (order, name) and joining the non-empty ones with blank lines. A section at order -5000 therefore lands above harness:identity (-1000) and the deployment persona (0):

SectionOrder
operator:head ← this plugin-5000
harness:identity-1000
deployment:persona-prefix0
tools / policies1000 … 9900
deployment:persona-suffix10200

But a preset declared complete: true (for example minimal) runs sections: [ownPersona] at the end of assembly and throws every other section away. No section can reach it — that is host behaviour, not a limitation of this plugin.

So the plugin registers two things from the same text source:

  1. the global section operator:head at order -5000, with interpolate: false so braces and {{…}} in your own words can never break an assembly;
  2. the prompt variable inject_head.

Section-based presets get the text for free. For a complete: true preset, add one line to that preset's persona prefix:

prefix: >-
  {{inject_head}}

  You are a helpful software engineer assistant.

The same file still drives the text. Nothing else about the preset changes.

Install

The package declares dsh.bundle.patch, so it installs as a normal bundle.

git clone https://github.com/HYBB-rash/dsh-inject-head.git

Then point the plugin manager at the cloned directory — install_bundle with its absolute path — or add it to ~/.dsh/profiles/<profile>/package.json by hand:

{
  "dependencies": {
    "dsh-inject-head": "link:/absolute/path/to/dsh-inject-head"
  },
  "dsh": {
    "profile": {
      "bundles": ["…", "dsh-inject-head"]
    }
  }
}

Link the package into the profile's node_modules, then restart the harness once. Editing the text afterwards never needs a restart.

Configure

One text source, four levels, highest priority first:

PrioritySourceNotes
1DSH_INJECT_HEAD_TEXTinline; trimmed
2DSH_INJECT_HEAD_FILEpath to a UTF-8 file; trimmed
3$DSH_HOME/inject-head.mddefault path (~/.dsh/inject-head.md)
4DEFAULT_TEXT in index.mjs'' — inject nothing
mkdir -p ~/.dsh
printf 'Answer in English. Prefer short answers.\n' > ~/.dsh/inject-head.md
  • edit the file → next assembly picks it up (cached on mtime)
  • empty the file → injection silently stops
  • delete the file → nothing is injected

Use the environment variables when you want the text to travel with the shell rather than with the home directory — useful for per-project overrides.

Verify

Ask the harness to dump the composed prompt, or check the first line of any session:

dsh --profile "$DSH_PROFILE" --dump-config

The plugin row appears as inject-head with name pointing at index.mjs. To check the assembled prompt instead, ask your agent "what is the first line of your system prompt?" — it should be your text verbatim.

Run the plugin's own tests:

npm test    # 9/9 passed

Limits

  • complete: true presets need the one-line persona edit. The plugin cannot inject a section into them; only the variable route works.
  • Don't edit a preset persona that another plugin asserts on. Some plugins validate a preset's persona by exact string equality and silently disable themselves when it changes. Adding {{inject_head}} to such a preset will trip that check — use a different preset, or leave that one uncovered.
  • The text enters session history. It is part of the system prompt, so it shows up in exported or shared sessions. Never put secrets in it.
  • It costs tokens every turn. A short line is negligible; a paragraph is not.

中文说明

在每份系统提示词的最上方注入一段固定文本。

  • 唯一真源是 ~/.dsh/inject-head.md,改完下一轮即生效,不用重启
  • 清空文件即关闭注入,删除文件则什么都不注入
  • 也可用 DSH_INJECT_HEAD_TEXT(直接给文本)或 DSH_INJECT_HEAD_FILE(指定文件)覆盖

覆盖范围:普通 preset(standard / ptc / cordis 这类按 section 组装的)自动生效;声明了 complete: true 的 preset(如 minimal)在组装末尾会丢弃所有其它 section,需要你在它的 persona 前缀里加一行 {{inject_head}},文本仍由同一个文件驱动。

已知边界:若某个 preset 的 persona 被其它插件按精确字符串校验,改它会让那个插件静默失效 —— 这种情况请换一个 preset,或让它保持不覆盖。注入内容会进入会话历史,导出或分享会话时可见,不要放密钥。

License

MIT © 2026 Herman Hong

Comments

Loading…

Similar plugins

dsh-inject-system-prompt

by lovstudio

Inject an extra system-prompt section into a DeepSeek Harness agent

Development & InfrastructureManifest valid

★ 0

MIT

JavaScript

Sep 4, 2026

dsh plugin --profile web add @lovstudio/dsh-inject-system-prompt

by yukk4159-bit

DeepSeek Harness plugin: inject a reusable prompt preset into the front of a message at send time - next message only, or every turn. 提示词注入器

Development & InfrastructureManifest valid

★ 7

MIT

JavaScript

Oct 11, 2026

dsh plugin --profile web add dsh-prompt-injector

by tianyaojiudi-prog

DSH(DeepSeek Harness) 插件:把一段可在设置页随时改写的文字,作为全局系统提示词段注入到所有会话,含子代理与工作流内部子代理;文本与开关即时生效,无需重启。

Tools & CapabilitiesManifest valid

★ 9

MIT

JavaScript

Oct 4, 2026

dsh plugin --profile web add dsh-djy-xttsc

by XuezuoYS

这是一个适用于 Deepseek Harness 的插件,向用户提供 GUI 下自定义且区分模型的发送 Prompt 注入功能。

Manifest valid

★ 0

MIT

JavaScript

Oct 24, 2026

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

by Xin-kon

DeepSeek Harness (DSH) plugin that pins zh-CN thinking and replies into the system prompt. Zero runtime deps, single file, capability probing, silent degradation.

Tools & CapabilitiesManifest valid

★ 0

MIT

JavaScript

Oct 19, 2026

dsh plugin --profile web add dsh-lang-guard

by Mryuanliu

DeepSeek Harness prompt presets help you quickly fill in the prompt in English with one click.

Manifest valid

★ 0

JavaScript

Aug 18, 2026

dsh plugin --profile web add dsh-prompt-presets