dsh-skill-tree-keeper

August 26, 2026 · View on GitHub

English | 简体中文

Skill-tree guard & maintenance plugin for DeepSeek Harness (DSH). Keeps the skills directory protected and fresh even when skills are installed frequently (e.g. from dsh-tech-radar).

Features

  • Protected manifest (expected-skills.txt): every skill present on disk is reconciled into the manifest automatically.
  • Snapshot rotation: skills-snapshot-<date>-<count>.zip refreshed on demand and daily; keeps the newest 2.
  • Guard (hourly scheduled task): detects refilled archived skills and re-archives them; restores missing skills from the latest snapshot; reports unknown directories without deleting.
  • Maintenance (daily 07:10 + triggered after every radar skill install): manifest reconcile + snapshot refresh + pruning.
  • Tools (host): ..._status (health report), ..._maintain, ..._heal, ..._install <name> (install a skill from the local OpenDesign cache with manifest + snapshot refresh).
  • Silent wscript launchers — no console windows.

What's new in 0.1.1

  • Fixed a critical guard vulnerability: an empty/blank skill name entering the refill list made Join-Path resolve to the skills root itself, and the heal loop would delete the whole tree. All names used in delete/restore decisions now pass strict validation (Test-SafeName), and the resolved path must match the name before any Remove-Item.
  • Fixed keeper-script deployment, which never worked: robocopy was called file-by-file (it only supports dir→dir); deployment now uses plain file copy and creates toolsDir when missing.
  • Guard no longer crashes when the archive dir is missing, when no snapshot exists, or when the skills dir/log dir is absent.
  • status tool counts directories only (files no longer inflate skillCount).
  • install tool: robocopy failure detection fixed (exit code ≥ 8 or spawn error), manifest appends are BOM- and trailing-newline-safe, and invalid skill names are rejected before touching the filesystem.
  • maintain/heal tools report spawn failures and timeouts as readable ERR:<message> instead of exit=null.
  • Bundled PowerShell scripts are stored UTF-8 with BOM so Chinese comments parse correctly on any Windows locale.

Layout

src/index.ts         host plugin (deploy + task registration + 4 tools)
keeper/              the bundled guard/maintenance scripts (deployed on activation)
scripts/build.sh     dep resolution from Harness runtime + profile node_modules

Build

Same requirements as dsh-tech-radar (Harness runtime + profile node_modules or DSH_CHECKOUT source checkout):

bash scripts/build.sh
npm pack

Install

Via the DSH plugin inventory / super-injector. On activation the plugin deploys its keeper scripts to C:\DeepSeekHarness\skill-tree-tools (default toolsDir) and registers the DSH SkillTreeGuard (hourly) and TechRadar Maintenance (daily 07:10) scheduled tasks.

Note: deployment skips scripts that are newer on disk. After upgrading the plugin, delete the stale copies under toolsDir (or touch the bundled ones) and reload the plugin to pick up the latest scripts.

Config

skillsDir, toolsDir, skillSourceRoot (local OpenDesign cache skills dir).

License

BSD-3-Clause