Introduction¶
In DeepSeek Harness (DSH), the common way to have an Agent check disk space is to run dir, Get-ChildItem, or throw together a temporary script layer by layer. Scans are slow, consume tokens, and cleanup steps are hard to fully trace in the conversation. disk-sentinel consolidates scanning, reporting, estimation, user confirmation, and cleanup into stable tools plus a Web panel; scans run through a host RPC instead of relying on the LLM probing directories one by one.
Below is an introduction to @dsh-plugin/disk-sentinel, published by community maintainer wee-b: a disk analysis and safe-cleanup plugin for Windows DSH web profiles. This is a community-maintained unofficial plugin and is not affiliated with DeepSeek AI. See SkillHub for the directory page and GitHub for the source code (MIT license, current package version 0.1.1).
What Is This¶
After installation, a disk-sentinel entry appears in the DSH Web UI sidebar. The plugin provides WinDirStat-style directory scanning, cleanup of predefined junk categories, dev-environment directory detection and migration, plus software usage rankings, scan report references, and historical deltas between two scans. The design goals are: visual operations must be auditable, and the Agent side must have stable tool names (disk_scan, clean_disk, dev_env_migrate) instead of writing shell scripts on the fly every time.
Core Features¶
Tools and Panel¶
| Capability | Description |
|---|---|
disk_scan |
Directory scan returning a directory tree, top large directories, top large files, and elapsed time |
clean_disk |
Predefined junk categories with a three-phase list, estimate, clean flow |
dev_env_migrate |
Builds a migration plan from the most recent dev-environment scan and executes it after user confirmation |
| Disk analysis | Select a disk in the Web UI, background scanning, task cancellation, capacity and usage view |
| Software usage ranking | Identifies common install directories, user data, and game libraries from scan results; Top 10, with cross-disk aggregation |
| Scan report | Saves the report and sends an @file reference to the current session for AI analysis |
| History delta | Compares two scan reports to show added, disappeared, grown, and shrunk entries |
| Dev environment analysis | Scans path-based environment variables and common dev caches, and provides safe migration entry points |
Full-disk scans go directly to the host through the /disk-sentinel RPC, bypassing the LLM, and no underlying scan command needs to be specified in the prompt.
Safe Cleanup Flow¶
Cleanup is fixed as:
list -> estimate -> user confirmation -> clean
estimate only estimates space and does not delete files; only clean performs irreversible deletion. The plugin protects the disk-sentinel workspace to avoid mistakenly deleting scan reports and other DSH runtime data.
Predefined cleanup categories include (excerpt): windows_temp, windows_prefetch, windows_update_cache, recycle_bin, npm_cache, pnpm_store, yarn_cache, pip_cache, thumbnail_cache, edge_cache, chrome_cache, delivery_optimization, dns_cache, and more; see the repository README for the full list of IDs and path descriptions.
Dev Environment Migration¶
Before migrating, the plugin validates the scan source, system-protected directories, source directory, target disk, and configuration state. The target must be on a different disk with free space of at least 105% of the source directory size. An empty target can be used directly; if the target already contains content, a second confirmation is required, and the existing content is fully backed up before being replaced. The execution order is: copy and verify, then change configurations; on success the original directory is renamed and kept as a backup, and on failure the plugin attempts to restore.
Tools supporting manual migration include Maven local repository, npm/pnpm/Yarn caches, Go workspace, NuGet, Gradle, Cargo, Rustup, the Android user directory, and more. Config-file-type directories modify the corresponding config files; environment-variable-type directories modify Windows user environment variables; the system Path is not modified.
Installation and Activation¶
Prerequisites: a Windows system with DeepSeek Harness (dsh) installed. When installed from GitHub, the repository already contains the built browser-side files, so no additional pnpm or build step is needed.
dsh plugin --profile web add git+https://github.com/wee-b/disk-sentinel.git
dsh web
After startup, a Disk Sentinel entry should appear near the sidebar settings area.
To update, first remove and then re-add:
dsh plugin --profile web remove @dsh-plugin/disk-sentinel
dsh plugin --profile web add git+https://github.com/wee-b/disk-sentinel.git
dsh web
To uninstall:
dsh plugin --profile web remove @dsh-plugin/disk-sentinel
Uninstallation does not automatically delete local scan reports; if you no longer need them, manually delete %TEMP%\磁盘哨兵.
Typical Usage¶
Web Disk Analysis¶
- Select the target disk or the entire hard drive.
- Click to start analysis; while it is running you can see the number of directories scanned, the current path, and the elapsed time, and you can cancel.
- View capacity, top directories, and top files, or pick two historical reports to generate a delta.
- Click “Let AI analyze” and the current session will receive an
@filereference to the scan report.
When scanning a single disk, the software ranking only reflects that disk; for a cross-disk total, select “entire hard drive”.
Having the Agent Clean Up in Conversation¶
Example intent (as written in the README):
Help me analyze C drive space, and after confirmation clean up caches that can be safely deleted.
It is recommended that the Agent first call clean_disk with list and estimate, and call clean only after user confirmation.
Dev Environment Analysis¶
Upon entering the page, path-based dev environment variables and common dev caches are scanned; within 24 hours the workspace cache is used by default. “Rescan dev environment” skips the cache. Directories without a manual migration button can be handed to the AI, but dev_env_migrate is still required to generate a plan and execute it after user confirmation. After migration completes, restart terminals and IDEs to confirm the tools point to the new directory.
Configuration¶
These can be adjusted in the plugin settings (defaults come from the README):
| Setting | Default | Description |
|---|---|---|
scanTimeoutMs |
300000 | Disk scan timeout (5 minutes) |
cleanTimeoutMs |
120000 | Cleanup timeout (2 minutes) |
migrationTimeoutMs |
1800000 | Dev environment migration timeout (30 minutes) |
maxDepth |
8 | Default recursion depth for tools |
topDirsCount |
30 | Number of top directories |
topFilesCount |
50 | Number of top files |
treeRenderMaxNodes |
200 | Maximum nodes in tree-formatted text |
Use Cases and Caveats¶
Who it’s for: Users doing local development with the DSH Web profile on Windows who need to check C drive usage regularly, clean up caches, or migrate Maven/npm and similar toolchains to another disk.
Compatibility (per the README): Windows only; DSH profile must be web. The documentation records that DSH 0.1.5-rc.2 and 0.2.0-rc.2 were verified (the latter verified loading and Web startup; scan/cleanup/migration have not been regression-tested item by item), with Node.js 24.21.0. The plugin itself does not connect to external services and has no telemetry. Other 0.2.x versions are not declared compatible.
Permissions and risks: The plugin runs with the permissions of the current dsh process; it is recommended to read the source code and the MIT license before installing. Scanning reads directories and sizes on the selected drive; paths that cannot be accessed are skipped and privileges are not automatically escalated. Reports and deltas are written to %TEMP%\磁盘哨兵; %TEMP% may be cleared by the system or other tools, so save important reports elsewhere. Only clean_disk’s clean deletes data; before cleanup and migration, carefully review the estimates and plans, and important data should have separate backups. Ordinary disk scans do not go through the LLM; only when you click AI analysis or actively reference a report do paths and statistics go to the model provider configured in DSH.
Known limitations: The software usage ranking is estimated from directory ownership and is not equivalent to Windows “installed apps”; shared libraries, custom install paths, and similar factors may cause deviations. Protected or occupied paths may not be scanned or cleaned.
Conclusion¶
disk-sentinel brings Windows disk scanning, delta comparison, predefined safe cleanup, and dev environment migration into DSH’s stable tools and Web panel. It reduces the time and token cost caused by the Agent scanning disks ad hoc, and makes the confirmation steps repeatable and auditable.
- Directory page: https://www.skillhub.cn/plugins/wee-b/disk-sentinel
- GitHub: https://github.com/wee-b/disk-sentinel