dsh-windows-c-cleanup: A Windows System Drive Cleanup Plugin for DeepSeek Harness

Introduction

DeepSeek Harness (DSH) uses a plugin-based architecture to facilitate capability extension. In Windows environments, insufficient C-drive space is usually not caused by simple junk files, but by accumulated caches, indexes, models, and other content that should be located elsewhere. Directly deleting IDE indexes or virtual disks incurs rebuild costs and even risks data loss.

The dsh-windows-c-cleanup plugin organizes cleanup into an auditable operational chain through a pipeline of “scan → five-level grading → report generation → user confirmation → tiered execution/migration.”

Core Features

The plugin provides the following core capabilities:

  • Scan: Performs full-disk scanning based on a rule base and hotspot directories.
  • Five-Level Grading: Divides cleanup items into safe for deletion, cautious deletion, recommended for migration, protected list, and long-term protection, with reasoning provided.
  • Visual Reports: Generates reports in Markdown or JSON format, showing freed space and trends.
  • Tiered Execution: Supports batch execution of the safe tier and item-by-item confirmation of the cautious tier.
  • Migration and Rollback: Supports migrating caches to another drive and preserving directory junctions at the original location; one-click rollback is supported.
  • Historical Trends and JSON Reports: Records historical scan data and compares space changes.
  • Scheduled Scanning and Alerts: Supports scheduled tasks and triggers alerts when space is insufficient.
  • Web GUI Panel: Completes the full process of “understand → select → preview → execute” through a Web interface.

Installation and Activation

npm installation is recommended because built artifacts are included and no local compilation is required. DSH must be restarted after installation for changes to take effect.

dsh plugin --profile web add dsh-windows-c-cleanup

If you need to pin a specific version:

dsh plugin --profile web add dsh-windows-c-cleanup@0.5.2

Typical Usage

The plugin registers the disk_cleanup tool. Common parameters are as follows:

  • action: Required. scan (scan), apply (execute), migrate (migrate), etc.
  • scope: hotspots (scan hotspots only) or full (top-N across the full disk).
  • dryRun: Defaults to true. Preview mode; does not actually delete files.
  • grade: Select scope by tier (safe, caution, migrate).

Examples of common operations:

// 1. Scan the C drive
{ "action": "scan", "scope": "full" }

// 2. Preview safe tier (does not delete files)
{ "action": "apply", "grade": "safe" }

// 3. Migrate to the D drive
{ "action": "migrate", "items": ["C:\\Users\\..."], "targetDrive": "D" }

// 4. Permanent deletion (requires disabling dryRun)
{ "action": "apply", "items": ["..."], "mode": "permanent", "dryRun": false }

Use Cases and Precautions

Use Cases:
* Insufficient DSH runtime space in a Windows environment.
* Need to audit cleanup operations and avoid accidental deletion of critical files.
* Desire to migrate caches to another drive to save C-drive space long-term.

Precautions:
* The plugin is not a “one-click cache deletion” script, but a cleanup process split into auditable pipeline stages.
* DSH must be restarted after installation to load the plugin.
* During migration, the target drive must differ from the source drive; otherwise, execution is refused.
* Migration operations preserve a junction at the original location to ensure applications remain unaware.
* dryRun defaults to true; please check the report before execution.
* Direct installation from GitHub requires build approval; using npm installation is recommended.

Summary

This plugin provides standardized disk management capabilities for DSH in Windows environments. Through its grading mechanism and migration strategy, users can effectively free up system drive space while ensuring safety.

GitHub Repository | Plugin Directory

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye