Redirects DSH downloads, artifacts, caches and temp files to user-specified drives (auto-picks the largest non-C drive), injects a path-discipline prompt into every session, and ships a disk_guard tool for status and cleanup — keeps the C: drive from filling up.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:kaka-crypto/dsh-disk-guard
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
Disk guard for DeepSeek Harness (DSH): redirects downloads, artifacts, caches and temp files off the C: drive to user-specified directories (auto-picks the largest non-C drive by default), injects a path-discipline prompt into every session, and ships a disk_guard tool for status and cleanup.
Features
| Capability | Description |
|---|---|
| Download directory | downloadDir: all downloads/exports/installers/artifacts land here |
| Cache directory | cacheDir (temp under <cacheDir>/tmp, npm cache under <cacheDir>/npm) |
| Smart default | no config - auto-picks the largest non-C drive (>=5 GB free) |
| Env redirect | TMP/TEMP/TMPDIR -> temp dir, npm_config_cache -> npm cache (inherited by bash/pwsh subprocesses); synced into $DSH_HOME/.env so every launch inherits |
| Prompt injection | a path-discipline block is prepended to the first user message of every session |
| Built-in tool | disk_guard: status (paths / free space / dir sizes), clean (expired caches; downloads require force:true), set (change dirs, persisted, instant) |
| C-drive check | warns at boot when $DSH_HOME is on C:, ships a one-command migration script |
Install
# inside the repo (after building lib/index.js):
powershell -ExecutionPolicy Bypass -File scripts\install.ps1
# or with explicit dirs:
powershell -ExecutionPolicy Bypass -File scripts\install.ps1 -DownloadDir 'E:\dsh\downloads' -CacheDir 'E:\dsh\cache'
The script copies the plugin into <profile>/vendor/dsh-disk-guard, writes $DSH_HOME/disk-guard.yaml (the file you edit to change dirs), wires it into the profile's package.json (dependency + dsh.profile.bundles), runs pnpm install, and installs the disk-guard skill. Restart DSH and watch for [dsh-disk-guard] 就绪 in the log.
Configuration
Priority: external YAML > patch config > defaults.
- External file (recommended):
$DSH_HOME/disk-guard.yaml
downloadDir: 'E:\dsh\downloads'
cacheDir: 'E:\dsh\cache'
- Patch config: the
config:block incordis.patch.yml(configFilepoints at the external file). - Paths support
~and%VAR%; relative paths resolve against the DSH home.
The prompt (injected per session)
Every session gets, before its first user message:
【磁盘守护 dsh-disk-guard · 路径纪律】1. 下载目录 = ; 2. 缓存目录 = (temp , npm ); 3. 红线:禁止向 C 盘写大文件/缓存/临时文件; 4. 用户没给路径时按 1、2 执行; 5. 查磁盘/清理用 disk_guard。
To fully customize, put your own text in $DSH_HOME/disk-guard-prompt.md.
Migrate DSH home off C:
powershell -ExecutionPolicy Bypass -File scripts\migrate-c-drive.ps1 -MoveData -DeleteOld -Force
Design
- Zero runtime third-party deps (yaml is external, resolved from the profile).
- Cleanup is strictly bounded to the plugin's own configured directories.
- Prompt injected once per session (deduped by session id, skips subagents).
- Any failure is logged, never breaks DSH.
License
MIT
Links
More in this category
Tencent/WeKnora#dsh-weknora★ 38385
Four read-only tools over a WeKnora knowledge base: list knowledge bases, hybrid passage search, reassemble one document's chunks in order, and WeKnora's own cited RAG or ReAct-agent answer with a resumable session id.
DayuanJiang/next-ai-draw-io#dsh-plugin★ 37218
Draws draw.io diagrams in DeepSeek Harness through the next-ai-drawio MCP server: the link in the reply opens a live preview in the right sidebar, you can edit the diagram by hand, and each AI change is a version you can restore. Node.js 18+; npx downloads the MCP server on first use.
yikart/AiToEarn#dsh-plugin-aitoearn★ 28812
Generate copy, images and short videos, and publish with one click to Douyin, Kuaishou, Xiaohongshu, WeChat Official, Bilibili, Facebook, TikTok and more, covering the full content lifecycle from creation to publishing and monetization.
superdesigndev/treg★ 9804
Tool catalog for agents: search ~2,600 external endpoints (SEO and SERP, backlinks, social, people and company enrichment, ad libraries, scraping) by the task you want done, read each one's parameters and per-call price, then call it with the credential injected server-side. Ships the skill plus an MCP row that stays disabled until TREG_TOKEN is set.
T-Auto/dsh-ops★ 6039
Provides bash, PowerShell 7, and high-performance Rust tools for DSH on Windows to reduce token usage.
Hithink-Tech-Org/Financial-API#hithink-finance★ 4659
Query Hithink Finance data in DeepSeek Harness, view charts in chat, and save refreshable dashboards.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.