AI Agent Hub
Back to plugins
🧠

dsh-plugin-windows-guard

Memory Updated 2026.08.25

Run the following command in DeepSeek Harness:

dsh plugin install Pasumao/dsh-plugin-windows-guard

Paste the following prompt into your AI chat to install this plugin:

Run dsh plugin install Pasumao/dsh-plugin-windows-guard in your terminal to install; the plugin source code is available at https://github.com/Pasumao/dsh-plugin-windows-guard

About this plugin

Running PowerShell and file operations on Windows inside DeepSeek Harness tends to trigger a familiar loop of pain: garbled GBK output, nested-quoting syntax errors, port conflicts from orphan processes, MAX_PATH overflows. dsh-plugin-windows-guard distills the high-frequency pitfalls from 255 archived real sessions into a zero-dependency, zero-build plugin that both steers the model away from traps before they happen and surfaces concrete repair guidance the moment something goes wrong. Install it, restart dsh, and it is ready to work with no manual configuration.

The plugin operates on two layers. The skill layer ships two self-contained guides: windows-enc covering encoding rules, quoting and escaping, and garble recognition; and windows-sys covering file paths, process and port diagnostics, CRLF pitfalls, and cross-platform quirks. Each guide auto-loads only when the task description matches, keeping the resident token cost near zero. The active-guard layer watches pwsh tool results for GBK mis-decoding or FFFD flooding and appends a fix hint without altering the original output; intercepts dangerous write commands such as Set-Content, Add-Content, or Out-File targeting JSON, YAML, or TOML without an explicit -Encoding flag and suggests the correct WriteAllText call; and registers two utilities, windows_encode_detect and windows_encode_fix, for one-click encoding diagnosis and repair to UTF-8 without BOM with automatic backup. Every layer can be toggled independently via configuration and is enabled by default.

Ideal for developers who use DeepSeek Harness on Windows for day-to-day coding, system diagnostics, or batch file work and are tired of being tripped up over and over by PowerShell encoding traps, quoting nightmares, and cross-platform differences.

Use Cases

  • Auto-detect GBK mis-decoding or FFFD flooding in PowerShell output and append a fix hint
  • Intercept dangerous write commands lacking -Encoding targeting JSON, YAML, or TOML files
  • Auto-load the matching pitfall-prevention guide when the model handles Windows encoding, path, process, or port tasks

Best For

  • Developers using DeepSeek Harness on Windows for daily coding
  • Users who frequently invoke PowerShell for file I/O or system diagnostics
  • Engineers tired of GBK garble, nested-quoting failures, and orphan-process port conflicts