Preface¶
In DeepSeek Harness (DSH), dsh plugin add registers plugins into the profile, but installation alone doesn’t automatically verify whether the plugin can load correctly. Common issues often surface only after the next backend restart: missing build artifacts causing loader fibers failed, improper dependency declarations leading to ERR_MODULE_NOT_FOUND, core packages installed as duplicates resulting in module dual instances, or even supply chain poisoning. This introduces the community plugin dsh-plugin-healthcheck, which chains together static checks, configuration combination validation, isolated trial runs, and trojan scanning. This allows you to identify problems before restarting the backend and provides one-click fixes, automatic rollbacks, or pre-made prompts for handling complex issues.
What It Is¶
dsh-plugin-healthcheck is a plugin health check tool for DSH, maintained by chenw2759-wq. It is categorized as admin-security in the SkillHub community directory, currently with 14 GitHub stars, 1 fork, and licensed under MIT (version 0.1.0).
It provides a “Plugin Detection” entry in the Web GUI settings panel. Its core approach combines: purely static checks + configuration combination validation + isolated trial runs + trojan scanning. Upon detecting anomalies, it can automatically fix, roll back, or package complex issues into pre-made prompts for agent handling.
What Problems It Solves¶
DSH’s plugin installation process only completes registration without startup verification. The README lists several real incident types and their corresponding interception methods:
| Incident | Root Cause | Interception Method |
|---|---|---|
Startup reports ERR_MODULE_NOT_FOUND |
files whitelist missing code-splitting artifacts |
C1 files integrity |
Backend startup reports missing zod / schemastery |
Plugin registered as link: dependency, bypassing profile’s node_modules |
C2 dependency declaration audit |
Agent reports Cannot read properties of undefined (reading 'prepare') |
file: dependency installs a duplicate of the harness core package, causing module dual instances |
C3 critical duplicate detection |
dsh-skin CLI not found (Windows) |
Command not in registry PATH | C5 Windows commands |
Changing link:→file: doesn’t take effect |
pnpm doesn’t re-resolve lockfile | C6 lockfile consistency |
| Disabled plugins long-remain in dependencies | Disabling only suppresses symptoms | C7 disabled plugin identification |
| Supply chain poisoning / malicious code | Malicious logic injected in published packages | C8 trojan scanning |
Startup reports loader fibers failed |
Plugin not built or incorrect cordis usage | C9 cordis usage detection + L2 isolated trial run |
The README also uses dsh-ssh-workspace as an example: the plugin’s lib/ is not built, and synchronous service access after asynchronous ctx.plugin() triggers cannot get property "fs" without inject upon restart. L2 isolated trial run can reproduce similar errors during a complete boot in a child process beforehand, without requiring users to restart the backend.
Core Features¶
L0 Static Check (No Loading, No Startup)¶
Without loading any plugin code, it audits item by item:
- C1 files integrity: Compares
fileswhitelist against actual lib artifacts; missing chunks trigger errors. - C2 dependency declaration: Checks if
link:includes runtime dependencies or iffile:includes harness peers. - C3 critical duplicate detection: Detects if six core packages (cordis, cosmokit, dsh-tools, schemastery, dsh-credentials, dsh-home-paths) are installed as real directory duplicates.
- C4 dependency resolvability: Tests resolving dependencies one by one from the plugin anchor.
- C5 Windows commands: Checks if commands referenced by
execFile/spawnhave corresponding.exefiles in the registry PATH. - C6 lockfile consistency: Checks if specifiers match the
version:prefix in the lockfile. - C7 disabled plugins: Identifies plugins that are disabled but still registered.
- C9 cordis usage: Statically detects three types of errors—synchronous service access after
ctx.plugin(), directlynewing a Service requiring config without providing config, or accessing services not declared ininject.
L1 Configuration Combination¶
Reuses the base composeEntries to combine bundles, profiles, and home patch layers. Using the same algorithm as real startup, it detects patch syntax errors, line ID conflicts, and missing patches.
L2 Isolated Trial Run¶
This is the core capability of “testing without restarting.” The plugin executes boot() fully in a child process to load the entire tree. The webserver port is offset to 0, ensuring zero conflict with the running backend. The base assertEntriesActivated asserts that every enabled plugin is activated, with a 90-second timeout to capture hangs. After failure, it can automatically roll back—writing a disabled line to the home patch, which takes effect via HMR without requiring a restart.
C8 Trojan Scan (Purely Static, Isolated)¶
The trojan scan follows an isolation principle: it only performs readFile, never imports, requires, or executes plugin code. It covers 7 types of malicious patterns (download-and-execute, credential theft, exfiltration, obfuscated backdoor, persistence, destructive, environment hijacking). Strong combination hits (e.g., download-and-execute, destructive, credentials+exfiltration) report errors, while single hits report warnings for manual review. Keys, tokens, and private keys are redacted as [REDACTED] in evidence. The scan skips tests, node_modules, and build artifacts, and includes false-positive control for schemastery conventions, data decoding, loopback IPs, and similar scenarios.
Repair and Iron Rules¶
The repair executor has one hard constraint: it is strictly forbidden to modify the harness source code or installation itself. Only allowed to modify:
- Plugin code (
~/.dsh/plugins/**) - Configuration layers (
~/.dsh/profiles/**,~/.dsh/cordis.patch.yml)
All write paths are gated by assertSafeTarget checks. After UI confirmation, the route still requires confirmed: true. Repairs requiring judgment are packaged as pre-made prompts for agents; the repair executor itself does not run LLMs.
Installation and Enabling¶
The following three steps are from the official installation instructions in the plugin README:
# 1. Clone to the plugin directory
mkdir -p ~/.dsh/plugins
cd ~/.dsh/plugins
git clone https://github.com/chenw2759-wq/dsh-plugin-healthcheck.git
# 2. Add to the web profile
npx @deepseek-ai/dsh plugin --profile web add "file:$HOME/.dsh/plugins/dsh-plugin-healthcheck"
# 3. Restart the backend, open Settings in the lower-left corner → "Plugin Detection"
On Windows, file: paths must use forward slash absolute paths, e.g., file:C:/Users/<you>/.dsh/plugins/dsh-plugin-healthcheck.
Typical Usage¶
Graphical Interface¶
- Open Settings in the lower-left corner of the Web GUI, click “Plugin Detection” in the navigation;
- Select scope (all plugins or specified plugins) and detection level (L0 / L1 / L2 / Trojan scan);
- Click “Start Detection”;
- Results are listed by severity badges, each containing evidence and repair actions: one-click repair (deterministic, with confirmation), automatic rollback (L2 failure writes disabled line, HMR hot effect), copy prompt (complex issues for agent).
HTTP Routes¶
You can also directly call backend routes:
/healthcheck/inventory— Plugin inventory/healthcheck/run— Execute detection/healthcheck/status— Query status/healthcheck/repair— Execute repair/healthcheck/rollback— Automatic rollback/healthcheck/history— History
Use Cases and Notes¶
Who it’s for: DSH users who frequently install community plugins via dsh plugin add; teams needing post-installation verification in CI-ified installation workflows; maintainers concerned about admin-security supply chain risks.
Pre-use notes:
- The plugin runs with the current dsh process permissions. L2 isolated trial runs fully boot the entire tree in a child process. Before installation, you should review the source code and MIT license yourself.
- Trojan scanning is purely static; single hits only warn and require manual review; it cannot replace professional security audits.
- Automatic repairs and rollbacks modify
~/.dsh/plugins/**or configuration layers. The UI will prompt for confirmation before operation, but it’s still recommended to back up profile and patch files first. - SkillHub (https://www.skillhub.cn) is an independent DSH plugin community directory, with no official affiliation to DeepSeek / High-Flyer.
Conclusion¶
dsh-plugin-healthcheck adds “verify upon installation” to the DSH plugin lifecycle: L0 checks files and dependencies for compliance, L1 verifies configuration combinations, L2 trial runs the entire tree in an isolated child process, and C8 performs static trojan scanning. Upon detecting anomalies, it can directly repair, roll back, or hand off to an agent, with repairs strictly limited to plugins and configuration layers by iron rules, without affecting the harness itself.
- Community directory page: https://www.skillhub.cn/plugins/chenw2759-wq/dsh-plugin-healthcheck
- GitHub repository: https://github.com/chenw2759-wq/dsh-plugin-healthcheck