Preface¶
In DeepSeek Harness (DSH), each agent’s system prompt is composed from a preset and deployment-level configuration. If you want “all sessions and all agents (including sub-agents) to respond according to the same habits”—for example, stating conclusions first, using plain language in code, keeping the tone brisk and avoiding pleasantries—saying it once in a session works, but you’ll need to repeat it in new sessions, and sub-agents won’t carry these preferences either.
A more intuitive approach would be to modify personaPrefix in dsh-system-prompt, but official Agent presets attach @deepseek-ai/dsh-persona to each agent, whose section name is identical to the deployment-level persona. Its semantics are “override” rather than “append in parallel,” so changing it that way often does not take effect and does not report an error: the configuration can be read, but the model never receives it.
dsh-prompt-editor is a community-maintained DSH client plugin (maintainer AGImentu, MIT license, current package version 0.1.0). It adds a page under “More Settings” for viewing, modifying, and saving a global system prompt shared by all agents. Once saved, the Loader reassembles it immediately, and the next conversation round takes effect. The following sections introduce its positioning, capabilities, installation methods, and usage notes.
What Is This¶
In one sentence: dsh-prompt-editor turns “personal response preferences” into a global setting—write it once in the settings page, and afterwards all agents, sub-agents, and new sessions will automatically carry it, with no need to instruct each one individually.
The plugin is pure JavaScript (ESM) with no build step; it does not modify the DSH kernel and only uses official public slots and services. On the host side it registers an independent section name prompt-editor:global-instructions (order 10), inserted after the official identity line and persona prefix, and before the first-party tool instructions; because the name is unique, it cannot be overridden by Agent presets.
It is classified as a client plugin: the browser half registers a settings page into the settings.section slot (order 310); the interface follows the --dsw-alias-* theme variables and supports both Chinese and English text.
Core Features¶
The following capabilities are drawn from the repository README and package.json descriptions; you can verify the source code on GitHub before installing.
- Shows on open the currently saved global instruction text, reading the actual configuration of the current profile.
- Saving takes effect immediately: it writes to the current profile’s
cordis.patch.yml, the Loader reassembles immediately, and the next conversation round uses the new prompt, with no need to restart the client (only a page refresh is needed when changing the browser-halfclient.js). - Clearing cancels the customization: after clearing the input box and saving again, the override entry in the configuration is removed.
- The first-line footnote on the settings page shows the path of the current configuration source file, for easy cross-reference with the local profile directory.
Installation and Activation¶
Prerequisite: DSH runs normally (Electron desktop client or dsh web).
Method 1: Plugin manager (recommended, especially for the desktop version)
Sidebar “Plugins” → “Add plugin” → paste the local absolute path of this repository (e.g., D:\Desktop\dsh-prompt-editor) → install. The manager automatically performs the pnpm link, adds this package to dsh.profile.bundles, and activates it immediately via HMR.
Method 2: CLI
dsh plugin --profile <profile> add github:AGImentu/dsh-prompt-editor
The Electron desktop client’s profile is managed exclusively by the application, and the CLI will refuse to operate (e.g., prompting profile "desktop" is managed exclusively by the Electron application). Use Method 1 for the desktop version.
Method 3: Manual link (when the CLI is unavailable)
Run in the $DSH_HOME/profiles/<profile> directory:
pnpm add "link:<absolute path to this repository>"
Then add dsh-prompt-editor to the dsh.profile.bundles array in the same package.json.
After installation, restart the client (or wait for HMR reassembly); a global system prompt page appears under “More Settings” (the README screenshot shows its position near the “Cost statistics” plugin page, but your local sidebar may differ).
Typical Usage¶
- Open the client’s “More Settings” and go to the global system prompt page registered by this plugin.
- Write or modify the instructions you want all agents to follow in the text box (e.g., response structure, tone, code explanation style).
- Save; the next conversation round carries the new section. To undo the customization, clear the text box and save again.
Example of the configuration on disk (written to the current profile’s cordis.patch.yml):
- id: prompt-editor
name: "dsh-prompt-editor"
config:
text: |-
...your prompt...
You can locate the above file through a “Open configuration file”-type entry on the settings page (subject to the plugin’s actual UI). DSH rendering-time variables can be used in the prompt, e.g., {{model}} and {{cwd}} are guaranteed to exist by the framework; typing a wrong variable name causes prompt assembly to fail, and DSH will report an explicit error rather than silently degrading.
How It Works (Brief)¶
The host half (index.js) registers the section via ctx.systemPrompt.section({ name, order, text }) and provides GET /prompt-editor/prompt and POST read/write through ctx.webServer.register; writes use ctx.configEditor.edit(), which features validation, atomic replacement, and immediate reassembly, and explicitly rejects when overridden by a higher layer rather than writing an invalid file.
The browser half (client.js) only registers a settings page UI into the settings.section slot (React, with no JSX build step).
| File | Responsibility |
|---|---|
index.js |
Host: registers the system prompt section and HTTP routes |
client.js |
Client: settings page UI |
cordis.patch.yml |
Inserts the host line into the profile bundle |
package.json |
Declares dsh.bundle.patch and dsh.client |
Suitable Scenarios and Notes¶
Who it’s for: developers or heavy users who need to unify agent behavior style inside DSH over the long term and do not want to repeat preferences verbally in every session.
Permissions and security: the plugin runs with the permissions of the current DSH process; you should read the repository source code and the MIT license before installing to confirm the routing and configuration write behavior are acceptable. The README notes: the read/write routes, like other local plugin routes, only listen on localhost, and there is no additional cookie validation; other local programs could theoretically call and modify the prompt as well.
Known limitations (from the README):
- After modifying the host
index.js, you must restart the client (the Node side does not participate in hot updates). - Only applies to the current profile:
dsh weband the desktop client are different profiles and must be configured separately. - Do not rely on directly modifying
personaPrefixto achieve the same effect; this plugin is designed specifically to bypass the preset override problem.
The DSH ecosystem philosophy is “everything is a plugin”; the community plugin directory (such as skillhub.cn) is an independent site with no official affiliation with DeepSeek / Huanfan. Information about this plugin on the directory page and GitHub stars is based on what each site displays at the time (GitHub stars were 0 at the time of crawling).
Conclusion¶
If your pain point is “set globally once, and it takes effect consistently across all agents and both old and new sessions,” dsh-prompt-editor provides a maintainable path on top of the official slots: editing on the settings page, persisting to cordis.patch.yml, and taking effect in the next conversation round after saving.
- Community directory: https://www.skillhub.cn/plugins/AGImentu/dsh-prompt-editor
- Source code and full documentation: https://github.com/AGImentu/dsh-prompt-editor