Introduction

DeepSeek Harness (DSH) uses a plugin-based architecture to make agent development more flexible. During development, we often need to set a global “preamble instruction” for all conversations, such as unified security constraints, role settings, or specific output format requirements. Implementing this by modifying the source code is costly and hard to maintain, while manually concatenating it for each request is error-prone.

The dsh-session-prompt plugin solves this problem. It provides an injection point that can be edited in real time through the Web interface, allowing custom prompts to be inserted at the very top of the system prompt for every session.

Plugin Overview

This is a DSH client plugin maintained by masknull. Its core role is to inject user-configured content as the highest-priority layer when the system prompt is assembled for each model request. The plugin includes built artifacts, so it can be installed and used without local compilation.

Core Features

  • Top-level injection: Injects custom prompts to the very top of the system prompt (before the built-in identity settings), applying to every session and every request.
  • Web interface editing: Through the plugin configuration card on the Settings page, supports multiline editing, enable/disable toggle, save, discard changes, and restore default settings.
  • Immediate effect: After saving the settings, the next model request uses the latest prompt content without restarting the DSH service.

Installation and Enabling

This plugin depends on the host environment version. Make sure the requirements are met.

Environment requirements:
* DSH version must be ≥ 0.1.7-rc.1.
* A DSH instance with Web UI installed, and the dsh CLI command-line tool available in the system path.

Installation command:

dsh plugin --profile <你的profile名> add github:masknull/dsh-session-prompt

After running the command, it is recommended to restart DSH to ensure the new bundle layer takes effect.

Usage

  1. Open the Web interface and go to Settings;
  2. Click the Plugin Configuration tab;
  3. Expand the “Session Header Prompt” card;
  4. Select Enable Injection, edit Prompt Content, and click Save.

Notes

  • Scope: The injected prompt belongs to the global root section and applies to all sessions, not just a specific session.
  • Version compatibility: If the host DSH version is lower than 0.1.7-rc.1, the plugin cannot be loaded.
  • Text safety restrictions: The system prompt renderer has strict interpolation requirements for {{variable}} templates. To prevent incorrect template syntax from causing request errors, the plugin rejects text containing complete {{…}} groups when saving. A standalone {{ (without a closing }}) is allowed as literal text.