Preface

In the plugin-based approach of DSH, the system prompt is typically not a single, manually maintained text but is assembled by registering multiple plugins into segments and then combining them in order. For agent developers, this poses a specific challenge: it is often not straightforward to see which segments make up the final prompt sent to the model, where a particular segment comes from, or whether changing one segment might affect others.

dsh-prompt-manager addresses this issue by turning the “system prompt” into a visual and configurable pipeline. This document introduces its capabilities, installation methods, and typical usage.

What Is This

dsh-prompt-manager is a DeepSeek Harness (DSH) plugin maintained by errorcode7, licensed under MIT. In one sentence, it enables viewing, modifying, and switching DSH system prompts through presets while visually displaying the assembly pipeline.

It primarily solves two types of problems:

  • Management: Using presets to replace, insert, or delete prompt segments, and control the rendering order;
  • Display: Showing the source segments, preset overrides, variable interpolation, final system prompt, and complete request in a single visual chain.

Core Features

The following lists the verified capabilities.

Preset Rewriting

The plugin supports performing the following actions on system prompt segments through presets:

  • replace: Replace a segment;
  • insert: Insert a new segment after a specified one, or append based on rules;
  • remove: Delete a segment.

Order Control

The plugin can precisely control the rendering order of prompt segments, supporting:

  • Top placement;
  • Anchors (e.g., after to specify a position after a segment);
  • Numeric order values.

Visual Pipeline

The plugin displays the prompt assembly process:

  • Source segments;
  • Preset overrides;
  • Variable interpolation;
  • Final system prompt;
  • Complete request.

History Review

The plugin supports reviewing the recent 20 rounds of actual model assembly history for comparison with the content sent to the model at that time.

Settings Page

The plugin provides a settings page “Prompt Management” that includes:

  • Preset list;
  • Toggle switches;
  • Form-based rule editing.

Instant Effect

Preset file modifications are hot-reloaded instantly; switching takes effect at the next model step.

Agent Tools

The plugin provides four agent tools:

  • switch_prompt: Switch the active preset or disable it;
  • list_prompts: List presets, active state, and current prompt segments;
  • get_prompt: Read the current text of a specified section;
  • save_prompt: Solidify the current section text into a replace rule for a preset.

Preview Consistency

The preview and runtime share the applyPreset pure function to ensure consistency between preview and actual execution.

Installation and Enabling

First, install the plugin. The npm installation command in the README is noted as “after publishing to npm”; it is not confirmed whether it has been published yet.

dsh plugin --profile web add dsh-prompt-manager

If installing from a source directory, you can use:

dsh plugin --profile web add /path/to/dsh-prompt-manager

Before installation, it is recommended to check the source code and license. This plugin runs with the current dsh process permissions; files, routes, tool registrations, and client injections in the source code may affect local behavior. Confirm before installing.

File Layout

Personalized presets are saved in $DSH_HOME/prompts/.

$DSH_HOME/prompts/
├── active.yml
└── <preset>.yml

Where:

  • $DSH_HOME/prompts/active.yml: Specifies the enabled preset with active: <preset>; null indicates no preset is active;
  • $DSH_HOME/prompts/<preset>.yml: One file per preset, which can contain label, description, and overrides.

Built-in presets are distributed with the plugin and are read-only; personalized presets can be edited or deleted.

Preset File Format

Below is the YAML format with given examples. Rules consist of actions, target segments, positions, and content.

label: Creative Mode
description: Prompt set for creative writing
overrides:
  - action: replace
    section: deployment:persona
    text: |
      You are a creative writing assistant...
  - action: insert
    section: creative:guidance
    after: tools:guidance
    text: |
      Writing process suggestions...
  - action: insert
    section: security:top-guard
    top: true
    text: |
      Top priority rules...
  - action: remove
    section: plan-mode:prompt

Field descriptions:

  • action: replace / insert / remove;
  • section: Target segment name;
  • text: Text to write or replace;
  • after: Optional, indicates insertion after this segment;
  • top: Optional, indicates top placement / overriding everything.

{{variable}} in replacement text (e.g., {{provider}}, {{model}}, {{cwd}}) will be preserved for normal interpolation during the rendering phase.

Typical Usage

The following describes the steps in order: “install first, then enable, and then use tools to adjust”.

  1. Install the plugin:
dsh plugin --profile web add /path/to/dsh-prompt-manager
  1. Prepare personalized preset files, for example:
$DSH_HOME/prompts/active.yml
$DSH_HOME/prompts/creative.yml
  1. Enable a preset in active.yml:
active: creative

To disable it, use:

active: null
  1. View or switch via tools in the agent:
  • Use list_prompts to view the current preset, active state, and current prompt segments;
  • Use get_prompt to read the current text of a specified section;
  • Use switch_prompt to switch the active preset or use off: true to disable it;
  • Use save_prompt to solidify the current section text into a replace rule for a preset.

After completing the above steps, you can view the preset list and form-based rule editing in the settings page “Prompt Management”, as well as inspect the source, overrides, interpolation, final prompt, and complete request in the visual pipeline.

Applicable Scenarios and Notes

Suitable for the following scenarios:

  • Need to confirm how the DSH system prompt sent to the model is assembled;
  • Need to adjust certain prompt segments globally per session;
  • Need to switch between multiple presets and retain visual records;
  • Need to solidify the current text of a segment into a preset rule.

Notes:

  • When a scope contains a complete: true segment, the registry restores it as the sole prompt segment after the waterfall, and preset modifications to sections will not take effect;
  • Presets apply to global assembly (all sessions); per-agent overrides require implementation via the dsh-persona line or agent.ctx registration in agent presets;
  • Preset file modifications are hot-reloaded instantly; switching takes effect at the next model step;
  • The community directory is an independent site and has no official affiliation with DeepSeek / High-Flyer; do not interpret the directory page as an official app store.

Links

  • GitHub: https://github.com/errorcode7/dsh-prompt-manager
  • Plugin directory page from clues: https://www.skillhub.cn/plugins/errorcode7/dsh-prompt-manager (not seen in fetched materials)