Preface¶
In DeepSeek Harness (DSH), the system prompt written on the deployment side belongs to configuration and assembly logic. The documentation also specifies that there is no “modify prompt at any time” interface available to end-users. The deployment persona on the dsh-system-prompt line, as well as the dsh-persona in the preset, typically must be finalized before the session starts. Once the session is running, changing the speaking style or replacing the entire system prompt usually requires stopping the process, modifying the configuration, and starting a new round.
Below is an introduction to the community plugin dsh-persona-switch (maintainer sorbitol25, npm package name dsh-persona-switch). Without patching the core, it utilizes a Cordis plugin to read the currently selected persona file every time the system prompt is assembled. It supports switching within a session via TUI, Web UI, and headless modes. It falls under the “Fun Dress-up” category of capability extensions in the directory classification. The community plugin directory can be found at the SkillHub entry, and the source code and documentation are on GitHub.
What is this¶
dsh-persona-switch is a live persona switcher for DSH: it places persona definitions in $DSH_HOME/personas/*.md and allows switching within a running session via slash commands or the model tool persona_switch, without needing to restart DSH. The package includes seed files such as the example persona jb; longer variants (e.g., jb_full mentioned in the README) are deliberately not included in the repository, and custom personas are managed by the user directory.
The license is MIT; the current version in package.json is 0.1.3. The README indicates that it has been verified on dsh 0.2.0-rc.2 and 0.2.1-rc.1. The Node engine requirement is ^22.19 || >=24.
Why a plugin is needed instead of just changing config¶
The DSH deployment persona is attached to a specific line configuration in the system prompt and cannot be switched via the official API during a session’s lifetime. This plugin registers a section named persona-switch:persona, where the text is a provider function. It calls activeText() during assembly in every turn, rather than being hardcoded at startup. When a switch occurs, it disposes of and re-registers the section, emits system-prompt/change, and the next turn is assembled according to the new persona.
complete controls whether the persona “dominates” the entire system prompt segment: when true, the persona constitutes the entire system content; when false, the persona falls into the deployment-persona prefix slot, preserving DSH’s built-in guidance. The test/capture-prompt.mjs in the README uses a local mock (DEEPSEEK_BASE_URL) to quantify the byte differences in the agent-turn system message under three states: off, jb+complete: true, and jb+complete: false, serving as a behavioral basis.
Core Features¶
-
Slash Commands:
/personato view the current persona and list;/persona listis synonymous;/persona <name>to switch (namecorresponds topersonas/<name>.md);/persona offto stop overriding the system prompt;/persona reloadto rescan the directory after editing files;/persona complete on|off|autoto adjust the complete behavior. -
Model Tool: Registers
persona_switch, allowing the model to initiate a switch during conversation (the README example involves a natural language request to switch). -
Persona Files:
$DSH_HOME/personas/*.md, copied from the package’spersonas/seeds on first run, and maintained by the user thereafter. Optional YAML front-matter:title,complete(defaultfalse),suffix. -
Built-in Seeds (README table):
jb(approx. 8 KB,complete: true, example JB persona),terse(approx. 0.5 KB, non-complete example),_selftest(approx. 0.3 KB,complete: true, only answersBANANA, used to verify wiring). -
State and Scripts:
$DSH_HOME/persona-switch.jsonrecords{ "active": "...", "complete": true|null };$DSH_HOME/persona-switch.logrecords registration and failure reasons. State is shared at the$DSH_HOMEdeployment level; after switching in the TUI, headless instances on the same machine will also read the same active state. -
Plugin Configuration (
cordis.patch.yml):maxPersonaBytes(default 400000, 0 means no truncation),tool(whether to registerpersona_switch, defaulttrue).
Installation and Activation¶
Each DSH profile needs to be installed separately; dsh plugin add writes to dsh.profile.bundles based on the package-declared dsh.bundle.patch, generally without the need to manually modify the bundle. After installation, restart the profile (or start a new one) to use /persona.
Install from npm (README original text, example uses PowerShell):
dsh plugin --profile web add dsh-persona-switch
dsh plugin --profile dsh-tui add dsh-persona-switch
dsh plugin --profile headless add dsh-persona-switch
If a specific version is needed, you can pin it, e.g., dsh-persona-switch@0.1.2 (The README explains that a plain add resolves latest, and pinning is recommended if the pnpm packument is occasionally stale).
Local Development Dependency (file: is a symbolic link; code changes take effect on the next dsh startup):
dsh plugin --profile web add file:C:/path/to/dsh-persona-switch
Electron Desktop Version: The desktop profile is exclusively occupied by the application, so dsh plugin --profile desktop will be rejected. You need to use scripts/install-desktop.ps1 from the README or install manually, and fully exit the tray before starting. If an application update rewrites ~/.dsh/profiles/desktop/package.json, you need to re-run the installation script.
Upgrade and Uninstall:
dsh plugin --profile web add dsh-persona-switch@0.1.2
dsh plugin --profile web remove dsh-persona-switch
Uninstalling does not delete your persona files in $DSH_HOME/personas/*.md.
Typical Usage¶
Switch within a session:
/persona # Current persona + list
/persona jb # Switch to jb.md
/persona off # Turn off override
/persona reload # Refresh after editing $DSH_HOME/personas
Add custom persona: Place my-style.md in $DSH_HOME/personas/, execute /persona reload, then /persona my-style.
Headless Script (README example, state file shared with TUI):
'{ "active": "jb" }' | Set-Content "$env:USERPROFILE\.dsh\persona-switch.json"
dsh headless "..."
Self-test (Inside the repo, does not access real models):
npm test
node test/capture-prompt.mjs --persona _selftest
node test/capture-prompt.mjs --persona off
Use Cases and Notes¶
Suitable for developers who need to quickly experiment with different system prompt personas on the same DSH deployment, or maintain a consistent active state across TUI/Web/headless. complete: true replaces the entire harness identity and guidance with the persona, resulting in significant behavioral differences. It is recommended to use capture-prompt or mocks to clearly inspect the outgoing system message before switching.
The plugin runs with the permissions of the current dsh process; please read the source code and the MIT license yourself before installing, and ensure that the source of the persona .md content is trustworthy. The DSH ecosystem emphasizes “Everything is a plugin”; SkillHub and other community directories have no official affiliation with DeepSeek / High-Flyer. The facts in this article are all derived from the aforementioned GitHub README and package.json.
Conclusion¶
dsh-persona-switch connects persona files, live switching, and deployment-level state into a scriptable path, filling the gap of “the session is already open, but I still need to change the system prompt persona”. For further information, please open the SkillHub plugin page and the GitHub repository.