Preface

DeepSeek Harness (DSH) dynamically assembles system prompts before each conversation, where deployment:persona is the only segment written by the configuration or deployment author (order 0). The default practice is to manually write this text in settings.yaml or cordis.patch.yml, requiring a process restart to change it and offering no visibility into how the persona combines with the harness identity, tool guidance, and other segments.

@xilin3/dsh-prompt-persona brings this persona to the web settings page: visual editing, real-time preview, persistent saving—without modifying the Harness itself. Below, we introduce its positioning, capabilities, and installation usage.

What Is This

@xilin3/dsh-prompt-persona is a DSH client plugin (MIT license, current version 0.1.0) published by maintainer Xilin3. It adds a “System Prompt” section to the Harness settings page, taking over the writing of deployment:persona. This is one of the approaches for “adding system prompts to Harness”—directly modifying the deployment persona.

The plugin is categorized as “Client” in the SkillHub Community Directory; the GitHub repository xilin3/dsh-prompt-persona has approximately 13 stars and 2 forks.

Core Features

Visual Editing in Settings Page

After installing and restarting dsh web, a “System Prompt” section appears on the Settings page, including:

Section Description
Injection Mode Dropdown to select Replace / Append / Off
Custom Prompt Multi-line text area for writing persona content, supports template variables
Save and Apply / Preview Effect Persists to settings.yaml or previews draft effect only
Current Prompt Read-only display of the currently active full system prompt
Add Effect (Preview) Displays the full prompt after applying the draft upon clicking “Preview Effect”

“Current Prompt” and “Add Effect (Preview)” display the complete text after combining the persona with the harness identity, tool guidance, and all other sections—not just the persona segment itself.

Three Injection Modes

mode determines how the custom persona affects deployment:persona:

  • replace (default): Replaces the entire current persona.
  • append: Appends after the existing persona, separated by a blank line.
  • off: Does not inject, preserving the deployment’s default persona.

Real-Time Preview

When clicking “Preview Effect,” the plugin applies the draft to a copy, returns the saved complete system prompt without persisting or contaminating the current state. This is ideal for confirming the combination effect of the persona with other harness segments before officially saving.

Template Variables

Persona text undergoes strict interpolation during saving and rendering, with errors for unregistered variables. Available variables:

Variable Meaning
{{model}} Current model (agent-default-model or runtime variable)
{{provider}} Current provider
{{cwd}} Process working directory

Optimistic Concurrency Saving

Saving performs conflict detection based on settings revision. When the revision does not match, it returns HTTP 409 (code: "settings-conflict"), requiring the client to reload and retry to avoid overwriting simultaneous edits by others.

How It Works

settings.yaml                    HTTP routes
  prompt-persona ──────────────► /_dsh/prompt-persona/settings
       │  (persona, mode)              ▲
       ▼                               │ GET snapshot / POST preview|save
system-prompt/assemble waterfall ──────┘
       │  Writes persona into deployment:persona section
       ▼
Complete system prompt (dynamically assembled each step)
  1. The host plugin (lib/index.js) registers the settings namespace prompt-persona and listens to the global system-prompt/assemble waterfall; after each assembly, it writes the persona from settings into the deployment:persona section according to the mode.
  2. The HTTP backend (lib/web.js) mounts /_dsh/prompt-persona/settings on the same origin, providing current prompt, preview, and save capabilities.
  3. The browser plugin (lib/client.js) injects a React settings panel via the settings.section slot.

Installation and Enabling

Add the plugin to the web profile ($DSH_HOME/profiles/web/, default on Windows C:\Users\<You>\.dsh\profiles\web\).

Method A: Command Line (Recommended)

dsh plugin --profile web add github:xilin3/dsh-prompt-persona

Then append @xilin3/dsh-prompt-persona to the dsh.profile.bundles in that profile’s package.json (see complete example in Method B), and restart dsh web.

Method B: Manually Edit Profile’s package.json

{
  "dsh": {
    "profile": {
      "bundles": [
        "@deepseek-ai/dsh-base",
        "@deepseek-ai/dsh-web-app",
        "@xilin3/dsh-prompt-persona"
      ]
    }
  },
  "dependencies": {
    "@xilin3/dsh-prompt-persona": "github:xilin3/dsh-prompt-persona"
  }
}

In the profile directory, run:

pnpm install

Finally, restart dsh web. Frontend and Host changes do not hot-reload; you must restart the process and refresh the browser.

For local development, you can also use "file:../path/to/dsh-prompt-persona" or copy the source to the profile directory and mount with the relative path "file:dsh-prompt-persona".

Typical Usage

Replace Persona

In the settings page, select “Replace” mode and enter:

You are a senior data analyst, working directory is {{cwd}}.

After saving, the entire deployment:persona is replaced with the above text (variables are interpolated during rendering).

Append Constraints

Select “Append” mode and add to the existing persona:

Always answer in Simplified Chinese.

The result is the current persona concatenated with the appended content, separated by a blank line.

Configuration File

Persisted in $DSH_HOME/settings.yaml under the namespace prompt-persona:

prompt-persona:
  persona: |
    You are a senior data analyst.
    Working directory is {{cwd}}, model is {{model}}.
  mode: replace        # replace | append | off
Field Type Default Description
persona string "" Custom persona text (template)
mode enum "replace" replace / append / off

Illegal mode is normalized to replace; persona is trimmed.

HTTP API

Same-origin route /_dsh/prompt-persona/settings used by the browser settings page:

Method Request Body Description
GET Returns { settings: {value, revision, applies}, currentPrompt }
POST { action: "preview", persona, mode } Returns { previewPrompt }
POST { action: "save", persona, mode, expectedRevision } Saves; returns new snapshot

Use Cases and Considerations

Who It’s For

  • DSH users who need to quickly adjust agent role settings, language style, or domain constraints via the web interface.
  • Deployers who want to manage deployment:persona without modifying Harness source code or manually writing cordis.patch.yml.
  • Scenarios requiring preview of the complete system prompt combination effect before saving.

Considerations

  • The plugin runs with the current dsh web process, performing reads/writes to settings.yaml and mounting HTTP routes with that process’s permissions. Before installation, review the source code and MIT License to confirm they meet your security requirements.
  • This plugin only manages the deployment:persona segment; other sections like harness identity and tool guidance remain managed by DSH core and other plugins.
  • SkillHub is a community-maintained plugin directory, with no official affiliation to DeepSeek / High-Flyer; the DSH ecosystem follows an “everything is a plugin” philosophy, and this plugin is a client extension focused on persona editing.

Summary

@xilin3/dsh-prompt-persona transforms deployment:persona from static text in configuration files into editable, previewable, and persistable content on the settings page, supporting three injection modes—Replace, Append, Off—and template variables {{model}} / {{cwd}} / {{provider}}.