runfali/dsh-skill-curator0

dsh-skill-curator

DeepSeek Harness 自动技能策展插件:后台评审子代理定期复盘对话,自动创建/更新 SKILL.md,让智能体在真实使用中持续自我进化,零侵入、不改 dsh 源码。Automatic skill curation for DeepSeek Harness — a background subagent reviews conversations periodically and creates/updates SKILL.md files; zero-intrusion bundle plugin, no dsh source changes.

包名
dsh-skill-curator
版本
0.1.0
许可证
MIT
最近更新
2026年8月25日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:runfali/dsh-skill-curator

dsh-skill-curator

Automatic skill curation for DeepSeek Harness (DSH). After every N real conversation turns (default 3), the plugin fires a background subagent that reads a digest of the session and creates or updates SKILL.md files under the user skills directory (~/.dsh/skills//SKILL.md) — the same self-improvement loop Nous Research's Hermes Agent runs, ported to DSH as a zero-intrusion bundle plugin.

中文说明见 README.zh-CN.md.

How it works

turn ends ──▶ agent/turn-stopping (scoped listener, counted per agent)
    │ 3 turns reached?  (skillNudgeInterval)
    ▼
async fire-and-forget (never blocks the turn close)
    ▼
session digest built ──▶ latest N messages verbatim + older turns compressed
    ▼
spawn subagent (provider: spawn) with digest + review instructions
    │  toolFilter allow = skill-library-* only (whitelist, hermes-style)
    ▼
subagent reviews and writes ~/.dsh/skills//SKILL.md
    │  frontmatter is stamped author: dsh-skill-curator (ownership marker)
    ▼
summary logged (host journal) + visible in the settings card status panel

Backstage review subagent in the Tasks panel

The review subagent runs as a visible task in the Tasks panel — here you see queued/idle skill review entries; open the panel to watch a curation as it happens.

Manual trigger: /skill-refine [focus] runs a review of the current session immediately.

Design decisions (vs Hermes)

Hermesdsh-skill-curator
turn_finalizer nudge counters (10)scoped agent/turn-stopping counters (3, configurable)
fork of AIAgent in a daemon threadplatform subagent (ctx.subagents.start) — visible in the UI, fully isolated session
replay full conversation (warm prefix cache)digest injection (tail-verbatim + head compression) — DSH has no cache advantage
runtime tool whitelist (memory+skills)toolFilter.allow whitelist + prompt constraint
curator ownership markersfrontmatter author: dsh-skill-curator + skill-library-adopt
/refine/skill-refine command

Behavioral parity matrix: docs/COMPARISON.md.

Install

cd /path/to/dsh-skill-curator
dsh plugin --profile web add ./
# restart dsh, then open: Settings → Plugins tab → "Skill Curator" card

Skip the restart? The plugin only takes effect on next start (standard bundle plugin; no dsh source changes, ever).

Settings (Settings → Plugins tab → "Skill Curator" card)

Settings card (part 1)Settings card (part 2)
Settings card 1/2Settings card 2/2
  • enabled — master switch (default on)
  • skillNudgeInterval — turns between reviews (default 3)
  • notifyMode — off / on / verbose (segmented buttons)
  • reviewProvider / reviewModel — optional review subagent model override (empty = follow the session's current model)
  • reviewBaseUrl / reviewApiKey — optional custom review endpoint (OpenAI-compatible /chat/completions). When reviewBaseUrl + reviewModel are set, the review subagent runs against that endpoint through a dedicated adapter route (provider name = reviewProvider, or skill-curator-review by default). Settings are read live on every request — no restart needed
  • Review history persists to ~/.dsh/skill-curator/reviews.json (last 50 entries) — survives plugin removal/reinstall and restarts
  • Review fallback — if the custom endpoint/model fails (HTTP/network/auth/rate-limit/model missing/timeout), the review automatically retries once on the session's own model. The fallback is marked in the host log, the review log, and the status panel (⚠️已回退主模型)
  • reviewTimeoutMs — review subagent budget (default 15 min)
  • digestTail / digestMaxChars — digest shape
  • adoptSkills — comma-separated names of skills the curator may maintain although created elsewhere

Skill library tools (whitelist)

The review subagent can only call these six (they are also usable by any session):

ToolPurpose
skill-library-listlist skills (name, description, owned?)
skill-library-readread one SKILL.md
skill-library-createcreate a class-level umbrella skill (Chinese body, bilingual description)
skill-library-patchtargeted oldString→newString or whole-body replacement (frontmatter preserved)
skill-library-write-filesupport files under references/ templates/ scripts/
skill-library-adopttake ownership of an unowned skill (stamps the author marker)

Ownership guard: only skills stamped author: dsh-skill-curator or listed in adoptSkills can be patched; everything else is refused with an explicit "adopt first" message. Paths are boundary-checked; writes are atomic (tmp + rename).

Development

pnpm install        # or symlink node_modules to your dsh install (see test notes)
pnpm test           # node --test unit suites
node test/smoke.mjs         # module/tool/whitelist smoke
node test/client-smoke.mjs  # client bundle smoke (real component-tree execution)

License

MIT