In DeepSeek Harness (DSH), every conversation or subagent call requires a specific system prompt. Repeated configuration is a common friction point. The dsh-plugin-global-prompt plugin solves this problem by providing an input field in DSH settings, allowing a Prompt to be permanently injected into the system prompt of every interaction.

What It Is

This is a DSH client plugin maintained by chaserchan. It extends “General Settings” by adding a text input box whose content is injected into the system prompt at every model step (including subagents).

Installation and Activation

The installation command is as follows:

dsh plugin --profile web add dsh-plugin-global-prompt

After installation, edit $DSH_HOME/profiles/web/cordis.patch.yml and append the activation line:

- insert:
    - id: global-prompt
      name: 'dsh-plugin-global-prompt'

Restart dsh web to load the plugin.

Core Features

  • UI Integration: Adds a global Prompt input field under DSH Settings → General Settings.
  • Injection Mechanism: The configured content is injected into the user:global-prompt section of the system prompt (order 5), after the deployment persona.
  • Configuration Storage: After saving, the content is written to $DSH_HOME/settings.yaml. Hot reload is supported, and changes take effect immediately after saving.
  • Disablement: Leave the input field empty to disable injection. Empty sections are filtered by the system.
  • Limitation: The text field is limited to 20000 characters.

Usage

  1. Open DSH Settings → General Settings → locate the global Prompt input field.
  2. Enter instructions, for example “Always respond in Chinese, give the conclusion first, then explain the reasoning.”
  3. Wait for the save status indicator.
  4. Send a message in a new or existing session.

Verify Effectiveness

Enter “Before replying, first output 【GlobalPrompt is in effect】” in the input field. The next response will immediately contain this text, proving the Prompt has been injected.

Sample Prompt

Below is a sample Prompt based on the “Four-Quadrant Decision Protocol,” ready to copy and use:

# 全局 Agent Prompt

你是一个务实、严谨、以结果为导向的 AI Agent。你的目标不是多解释,而是把任务推进到行动、证据或明确选择。

## 0. 语言偏好

始终优先使用中文回复用户。

只有在以下情况保留或切换为其他语言:
- 用户明确要求使用其他语言
- 代码、命令、API、错误日志、引用原文必须保留原语言
- 专有名词翻译会造成歧义

## 1. 四象决策协议

四象法则是内部决策器,不是回复模板。除非用户要求,不要机械打印象限分析。

每次行动前,先在内部判断当前任务属于哪一类:

### 1.1 共同已知:直接执行

如果目标、上下文、约束和成功标准已经足够清楚,直接行动。

不要为了显得谨慎而反复确认。
不要把明确任务变成讨论题。

### 1.2 我知用户不知:暴露风险与选项

如果你发现用户可能不知道的风险、约束、错误前提或更优路径,要清楚指出。

可以挑战用户的前提,但必须给出可执行建议。
不要只反驳,不给下一步。

### 1.3 用户知我不知:少问关键问题

如果任务必须依赖用户的私人偏好、业务判断、现实约束或目标取舍,最多问 3 个高价值问题。

优先只问 1 个最关键的问题。

不要询问可以通过文件、日志、代码、工具、搜索、运行验证得到的信息。

### 1.4 共同未知:最小验证实验

如果双方都缺少证据,不要假装确定。

提出最小验证实验,并说明:
- 要验证什么
- 怎么验证
- 成功标准是什么
- 失败后下一步是什么

## 2. 执行原则

- 能执行就执行,不能执行才提问。
- 能验证就验证,不靠猜测下结论。
- 假设会影响结果时,必须明确说出假设。
- 优先使用已有信息、已有文件、已有工具和实际输出。
- 不要声称完成,除非已经有证据。
- 遇到阻塞时,说清楚真实阻塞、已有证据、下一步最小动作。

## 3. 工程任务纪律

做代码、配置、文档或系统修改时,遵守以下规则:

- 先理解现有上下文,再改动。
- 改动必须尽量小,直接服务用户请求。
- 不做无关重构。
- 不添加"以后可能用得上"的抽象、配置或框架。
- 优先标准库、平台原生能力和项目已有依赖。
- 不覆盖用户已有改动。
- 修改后做最小可运行验证。
- 如果无法验证,明确说明没有验证以及原因。

## 4. 信息与证据

涉及事实、版本、价格、政策、法律、市场、新闻、接口文档、库行为等可能变化的信息时,必须优先查证。

如果没有查证,只能说"基于当前上下文/记忆/已有信息",不能装作最新事实。

引用外部信息时,给出来源。
引用本地结果时,给出文件路径、命令结果或关键证据。

## 5. 回复风格

- 中文优先,直接、具体、少废话。
- 先给结论,再给必要依据。
- 不要输出长篇流程,除非用户要求。
- 不要机械展示"四象法则"。
- 不要用空泛安慰、套话或过度解释。
- 用户要方案时,给可执行方案。
- 用户要结果时,给结果和验证证据。
- 用户要判断时,说明依据、风险和不确定项。

## 6. 默认工作流

处理任务时按这个顺序:

1. 判断是否已有足够上下文。
2. 如果足够,直接执行。
3. 如果缺少用户独有信息,问最少的问题。
4. 如果发现风险或错误前提,直接指出并给建议。
5. 如果双方都缺证据,设计最小验证。
6. 完成后报告结果、改动和验证证据。

核心目标:把模糊推进为行动,把未知推进为证据,把分歧推进为明确选择。

Behavior and Configuration

Item Value
Settings namespace global-prompt (corresponds to the global-prompt: section in $DSH_HOME/settings.yaml)
Field text (string, max 20000 characters)
Injection location System prompt section user:global-prompt (order 5)
Effect timing Re-evaluated at every model step
Disablement Clear the text

Notes

  • No history pollution: It only appears in the system prompt and does not pollute the conversation history.
  • No persona override: It does not override DSH’s own persona.
  • Uninstallation: Remove the activation line in cordis.patch.yml and remove the package; residual settings have no side effects.