dsh-prompt-inject: Injecting Custom Text Blocks into DSH System Prompts

Preface

DeepSeek Harness (DSH) assembles system prompts before every conversation. Sections such as persona and tool descriptions are registered jointly by the framework and plugins. If you wish to append constraints like “how to report progress between tool calls” or “communication style” without modifying core code, you typically have to modify profiles or fork built-in logic, which incurs high maintenance costs.

dsh-prompt-inject, published by community maintainer azazo1, is categorized as a workflow. It does exactly one thing: during the assembly phase, it registers a piece of text maintained by you (or an external Markdown file) as a system prompt section, re-reading it during every assembly. By default, it injects nothing; you need to enable it and fill in the text in the plugin configuration when needed. The plugin does not register services, does not register tools, and performs no network access. The source code consists of only two files: src/index.ts (Host) and src/client.ts (Settings Page).

What is this

The introduction matches the implementation: injecting user-maintained text blocks into the DSH system prompt. The repository description mentions that presets are provided by default for “progress reporting standards between tool calls,” used to increase the frequency of agent message output—whether this actually injects depends on whether you enable it and fill in the content; if empty, the section is discarded directly during the assembly phase.

Core Features

Injection Section

The Host side registers a user-controllable text segment to the DSH system prompt. The section is registered with interpolate: false, meaning {{...}} in the text is preserved as-is and will not be treated as prompt variables causing assembly failure.

Configuration Source (One of Three Logics)

  1. Plugin Page Multi-line Editor (text): Can be written directly, or selected from a preset dropdown and filled into the draft (must be saved to write back).
  2. External Markdown File (file): If not empty, this file is re-read during every assembly (supports ~); it takes precedence over text. If you modify text in the editor, the next round will still prioritize the file.
  3. Enable Toggle (enabled): Once turned off, the section is empty and discarded during assembly, but the saved text is retained and can be turned back on at any time.

If the file cannot be read, it falls back to text and logs a warning, without silently discarding content. If both the text block and the file are empty, an empty section is injected without leaving a trace.

Section Order

The default order is 100, following immediately after the persona prefix (0) and before first-party tool guidance (starting at 500). For emphasis further back, it can be set to 10250 (after the persona suffix 10200). Modifying order will remount the plugin and re-register according to the new order.

Built-in Presets

Presets are located in the repository’s presets/ directory, with one entry per file. The front matter contains the title and source URL, while the body is the verbatim original text. There are currently 15 entries, sourced from OpenAI Codex related prompt documentation and community-curated Claude Code system prompts. DSH-specific adaptations for each entry are written in the note of the corresponding front matter. The README explicitly states that three entries conflicting or duplicating DSH’s built-in grep/glob and todo_write were not retained. You do not need to use the whole package; you can assemble a text block as needed.

Installation and Enablement

Execute in the plugin directory (according to the original installation method, requires running within the local cloned or extracted directory):

dsh plugin --profile web add "link:$(pwd)"

Restart dsh web after installation. To uninstall:

dsh plugin --profile web remove dsh-prompt-inject

Configuration entry: Settings → Plugins → dsh-prompt-inject Card. There are four controls on the page: Enable Injection, Injected Text Block (including preset dropdown), External Markdown File Path, and Section Order.

You can also override by plugin ID in the profile’s cordis.patch.yml, for example:

- id: dsh-prompt-inject
  config:
    order: 400
    file: ~/notes/agent-style.md
Field Default Value Description
enabled true If off, injects an empty section which is discarded during assembly
order 100 Section order
text '' Injection text; empty by default
file '' If not empty, reads this Markdown; takes precedence over text

enabled, text, and file are volatile fields that take effect immediately upon saving; changing order will remount the plugin.

Typical Usage

  1. After installing and restarting dsh web, open the plugin configuration card and keep Enable Injection turned on.
  2. In the Injected Text Block, select from the preset dropdown, for example, Codex’s Sharing progress updates or Claude Code’s Reporting outcomes, and save; or write your own section.
  3. If you wish to version control the prompt fragments, fill in the path in External Markdown File (e.g., ~/notes/agent-style.md), maintain the content in the file, and it will be automatically re-read during every assembly.
  4. If you need the instructions to appear after the tool descriptions, adjust the Section Order or order to a larger value like 10250 and save.

Development build (Maintainer flow, excerpted from README):

just install
just verify

Runtime environment requires Node ^22.19 || >=24 (see package.json engines).

Use Cases and Notes

Suitable for: Developers who wish to uniformly append communication/progress reporting/engineering habit system prompts under the DSH Web profile, want changes to files or configuration to take effect in the next round, but do not want to write a standalone Cordis plugin.

Notes:

  • The plugin runs with the permissions of the current dsh process. Before installation, please review the GitHub Source Code and the MIT license yourself to confirm you accept its behavior (only reads local configuration and optional file paths, no network access).
  • The community directory skillhub.cn is an independent site and has no official affiliation with DeepSeek / High-Flyer. The installation command is based on the README; do not fabricate forms like dsh plugin add github:... based on the plugin name.
  • Presets are sourced from third-party prompt collections. Before using them, please understand the DSH adaptation instructions in the note of each entry to avoid redundant stacking with built-in system prompts.

Conclusion

dsh-prompt-inject hands over a section of system prompt that is “editable, externalizable, and sortable” to the user to maintain. It defaults to zero injection and is enabled only when needed. For further instructions and the preset list, see the GitHub README and the SkillHub Directory Page.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye