Preface¶
When running agents in DeepSeek Harness (DSH), system prompts, approval policies, and tool sandboxes all rewrite or intercept behavior at runtime. From the conversation surface, “the model is reluctant to do it” and “the host policy blocked it” often look identical, making diagnosis costly. If you also need to perform authorized security evaluations locally, manage multiple rule sets, and handle prompt injection, simply editing config files won’t let you quickly see whether patches are actually in effect.
Below is the community plugin dsh-purge (maintainer chs-1108): for the official Harness you already run locally, it brings host-layer policy and prompt sanitization, rule sets, skill imports, and other capabilities into one place via a sidebar and patching mechanism, and provides a separate drill console page that requires confirmation. The plugin is categorized as admin-security, currently has 2 GitHub stars; the license is MIT, the README states version 1.2.3, requiring DSH 0.2.x and Node.js ≥ 18.
What Is This¶
In one sentence: a security evaluation and prompt sanitization plugin for local DSH — it does not wrap a model API; instead, on your controlled Harness installation, it lets you view and adjust the host’s own prompt layering, approval, and tool restrictions via a sidebar, and manage rule sets and skills; it also provides a Drill page, exclusively for hosts or offline targets that you manage or have been authorized to use.
The Harness rewrites prompts, gates approvals, and enforces sandbox policies at runtime. This plugin separates the “host layer” from the injections/rules you can edit, making it easier to determine which layer a current behavior originates from.
Directory and source code:
- Community directory: https://www.skillhub.cn/plugins/chs-1108/dsh-purge
- GitHub: https://github.com/chs-1108/dsh-purge
Core Features¶
All capabilities below come from the project README’s feature table and descriptions.
Sidebar (Clean / Drill)¶
Next to the conversation title there is a dsh-purge button that opens a right-side panel containing Clean and Drill pages, supporting light / Ink themes.
Patch Status and One-Click Operations¶
Each host-layer patch lists its real status by area: applied / pending / skipped / missing_file; statistics only count items that are actually in effect. Supports Apply (idempotent, backs up original files first), Restore (revert), Uninstall (revert then remove the plugin).
Prompt Injection and Rule Sets¶
You can edit prompt-inject.md in the panel, or maintain multiple rule sets and switch between them; injection is reapplied every turn, so new sessions won’t be “half-unsanitized.” Rule sets correspond to multiple AGENTS.md / CLAUDE.md config files under $DSH_HOME: enabling writes to the file, disabling removes the corresponding lines.
Workspace Policy and Network Scope¶
Workspace policy takes strict / fallback / always, determining whether the Harness’s built-in workspace baseline coexists with your prompts. The host whitelist is written in $DSH_HOME/net-scope-allow.txt (exact IP/hostname); ranges not listed remain excluded.
Skills and Rollback¶
You can import a zip or directory into the host’s $DSH_HOME/skills/<id>/SKILL.md (matching and loading are still handled by DSH). Supports Composer undo and /rewind based on the official session.fork({ atSeq }).
Startup Self-Check and Drill Console¶
After npm/pnpm rewrites node_modules, the plugin detects this and re-applies automatically, without needing manual host file edits. The Drill console is a standalone page with asset, skill, and environment checks; it requires reading the prompt, a countdown, and three checkboxes before use. The README explicitly states it is only for hosts you manage or offline/authorized targets.
Home directory resolution order: $DSH_HOME → .dsh next to the dsh launcher → ~/.dsh. dsh 0.1.x is not supported; unmatched patches remain pending or skipped and will not be blindly rewritten.
Installation and Activation¶
The official DeepSeek Harness 0.2.x has two profiles: Web (dsh web) and Desktop EXE. They must be installed separately and applied on their respective hosts; cross-operations are not allowed.
Recommended: One Command to Install into a Profile¶
# Web (official dsh web)
dsh plugin --profile web add https://github.com/chs-1108/dsh-purge.git
# Desktop (official EXE)
dsh plugin --profile desktop add https://github.com/chs-1108/dsh-purge.git
No git: Tarball¶
dsh plugin --profile web add https://github.com/chs-1108/dsh-purge/archive/refs/heads/main.tar.gz
dsh plugin --profile desktop add https://github.com/chs-1108/dsh-purge/archive/refs/heads/main.tar.gz
You can also download from Releases or the repository’s Code → Download ZIP, then manually place it into $DSH_HOME/plugins/dsh-purge following README “Option 4” and edit the corresponding profile’s package.json (both dependencies and the end of dsh.profile.bundles must include dsh-purge), then run pnpm install under profiles/web or profiles/desktop.
Three Mandatory Steps After Installation¶
Adding the plugin to a profile does not auto-apply patches:
- Fully exit and reopen the host (restart
dsh web, or quit the desktop tray and relaunch the app). - On that host, click dsh-purge → Clean → Apply.
- A successful Apply restarts the host once to load the patches; an incomplete Apply will not restart.
Verification: a dsh-purge button appears next to the conversation title; running /purge status in the conversation should print DSH_HOME and the patch table, and the path must match the current runtime environment. Uninstalled optional packages (such as the README’s example liangshen preset) show as skipped and do not block Apply.
Typical Usage¶
In-Conversation Shortcut Commands¶
# 1. View what the plugin sees
/purge status
# 2. Write patches
/purge apply
# 3. Restart the host, then start a new session
Terminal CLI¶
dsh-purge --status
dsh-purge --apply
dsh-purge --revert
dsh-purge --uninstall
dsh-purge --edit
The README’s Quick start matches the above flow: first status, then apply, restart the host, and start a new chat.
Use Cases and Notes¶
Who it’s for: developers or security engineers already running DSH 0.2.x locally who need a visual view of patch status, unified management of prompt injections/rule sets/skills, and host-side security evaluation under legal authorization.
Permissions and trust: the plugin runs with the current dsh process privileges; Apply rewrites installed @deepseek-ai/* packages and writes to $DSH_HOME. Before installing, read the source code and the MIT license to confirm compliance; the Drill feature should only be applied to environments you own or have explicitly authorized. The README includes a disclaimer — do not use it on unauthorized targets.
Ecosystem note: DSH adopts a “everything is a plugin” philosophy; community directories like SkillHub are independent sites with no official affiliation with DeepSeek / High-Flyer. This article introduces the community-maintained dsh-purge, not an official app store entry.
Conclusion¶
dsh-purge consolidates Harness host-layer patches, prompt sanitization, rule sets, and skill management into a sidebar, and uses a status table to distinguish between “applied” and “skipped,” making it easier to tell policy interception apart from model behavior locally. After installation, remember to Apply on the corresponding profile and restart the host.
- Directory page: https://www.skillhub.cn/plugins/chs-1108/dsh-purge
- Repository and full configuration docs: https://github.com/chs-1108/dsh-purge