Preface

The system prompt of DeepSeek Harness is typically dynamically assembled from multiple sections. When customizing behavior for a specific agent or overriding the default prompt, modifying the main configuration directly is often not flexible enough and may easily cause conflicts. This article introduces a plugin designed to provide an independent injection point, allowing users to add additional prompt sections through a configuration bundle.

Plugin Introduction

This is a DeepSeek Harness plugin developed by lovstudio, classified under “Workflow”. It registers a custom prompt section into Harness’s system prompt assembly registry via ctx.systemPrompt.section(), and is distributed in bundle form.

Core Features

  • Inject Prompt Sections: Injects additional system prompt content into DeepSeek Harness agents.
  • Configurable Bundle: The plugin itself is distributed as a bundle and can be enabled or disabled through configuration.
  • Registration Mechanism: Uses ctx.systemPrompt.section() to add a new entry to the registry.

Installation and Configuration

Prerequisites: Node.js 22.19+ or 24+, and pnpm 11 (can be enabled via corepack enable or installed globally).

Installation Command:

pnpm dsh plugin --profile web add -w github:lovstudio/dsh-inject-system-prompt#v0.1.2

Activation Configuration:
The plugin is inactive by default (empty text removes the section), and needs to be activated by overriding the configuration file. Edit $DSH_HOME/profiles/web/cordis.patch.yml, and add or modify the following lines:

- id: inject-system-prompt
  name: '@lovstudio/dsh-inject-system-prompt'
  config:
    text: |
      You are concise and always answer in Simplified Chinese.

Start the Web UI:

dsh web   # 对应 profile web

Configuration Description

The plugin provides the following configuration items:

  • text: The prompt text to be injected. If left empty (default is an empty string), the section will be removed.
  • name: The name of the prompt section, defaults to injected:prompt (must be unique within the same scope layer).
  • order: Sort order, defaults to 50. Typically 0 is used for persona, and 100-199 for tool guidance.
  • complete: Boolean, defaults to false. When set to true, the section becomes the complete system prompt, overriding all other content.

Notes

  • Dependency Requirements: The plugin requires the systemPrompt service provided by @deepseek-ai/dsh-base, which is the first bundle of each profile. There are no additional runtime dependencies.
  • Distribution Format: The plugin is distributed through a bundle (dsh.bundle.patch), which ultimately maps to cordis.patch.yml.

Summary

This plugin enables DeepSeek Harness users to inject custom system prompt content at the level of a specific agent. For more technical details and source code, refer to its GitHub repository.