Back to home@Wisdoverse

dsh-skills-manager-plugin

Skill manager for DeepSeek Harness: proactive skill activation with trigger hooks, GitHub source sync, and a Settings management UI.

Stars
0
Language
JavaScript
Created
Aug 28, 2026
Updated
Aug 28, 2026
GitHub repo

Introduction

dsh-skills-manager

Proactive skill activation, hook orchestration, and GitHub sync for DeepSeek Harness.

English · 简体中文

npm version CI License Node.js Last commit GitHub stars

Turn passive SKILL.md files into event-driven, GitHub-managed capabilities that activate when they are actually useful.

DSH already exposes the lifecycle hooks. This plugin connects those hooks to skill declarations, adds proactive matching, and provides a complete install/update/settings workflow—without changing DSH core.

Table of contents

Why this plugin

The built-in DSH skill tool relies on the model to notice a short summary and decide to load the full skill. In practice, useful skills are often missed, skill files cannot directly declare lifecycle behavior, and locally scattered skills are difficult to keep synchronized.

dsh-skills-manager closes those gaps:

  • matches every user turn against available skills;
  • loads strong matches automatically and suggests weaker matches;
  • maps Claude Code-style hook declarations onto DSH host events;
  • manages skill sources from GitHub;
  • keeps user and project overrides isolated;
  • exposes controls in Settings and through the skill_manager model tool.

Highlights

CapabilityWhat it provides
🚀Proactive activationFull skill injection for strong matches and lightweight reminders for suggestions
🪝Skill-level hooksUserPromptSubmit, PreToolUse, PostToolUse, PostToolUseFailure, and SessionStart
🔄GitHub lifecycleInstall, update, authoritative sync, uninstall, and commit-change reporting
🧭Workspace-aware scopeProject skills override user skills without leaking configuration between workspaces
🛠️Built-in managementSettings UI plus the skill_manager model tool
🛡️GuardrailsSource allowlisting, argument-array Git execution, hook path validation, and no shell execution for hooks

How it works

flowchart LR
    U[User message] --> M[Pre-step matcher]
    M -->|auto| A[Inject full skill]
    M -->|suggest| S[Inject reminder]
    T[Tool call] --> P[PreToolUse policy]
    R[Tool result] --> O[PostToolUse activation]
    G[GitHub source] --> Y[Install or update]
    Y --> C[DSH skill catalog]
    C --> M

Before each agent step, the plugin scores available skills:

  1. explicit skill-name mention: +12;
  2. trigger phrase or regular expression: +7;
  3. description or whenToUse token overlap: +4 to +6.

By default, a turn can auto-load up to two skills and suggest up to three. Activation markers are stored in conversation history, so full skill content is not injected repeatedly while it remains visible. After context compaction removes a marker, the skill can be loaded again automatically.

Quick start

Requirements

  • DeepSeek Harness 0.1.1-rc.2;
  • Node.js ^22.19.0 || >=24.0.0;
  • pnpm available on PATH for dsh plugin.

Install from npm (recommended)

dsh plugin --profile web add @wisdoverse/dsh-skills-manager

DSH recognizes the package's dsh.bundle manifest and adds @wisdoverse/dsh-skills-manager to the Web profile automatically. Restart a running Web profile after installation.

Install from GitHub

dsh plugin --profile web add github:Wisdoverse/dsh-skills-manager-plugin

Use the GitHub source when testing unreleased changes from main. Pin a commit when reproducibility matters.

Update or remove

dsh plugin --profile web update @wisdoverse/dsh-skills-manager
dsh plugin --profile web remove @wisdoverse/dsh-skills-manager

Restart the profile after either operation so its composition matches the installed bundle set.

Install a local checkout for development

git clone https://github.com/Wisdoverse/dsh-skills-manager-plugin.git
cd dsh-skills-manager-plugin
pnpm install --frozen-lockfile
dsh plugin --profile web add .

The included cordis.patch.yml inserts skill-manager into the host composition for all sessions.

Compatibility

ComponentSupported or continuously verified
DeepSeek Harness0.1.1-rc.2 dependency contract and isolated GitHub-install smoke test
Node.js22.19.0 and 24.19.0
pnpm11.19.0 with a frozen lockfile
Operating systemsUbuntu and Windows CI matrix

DSH is in developer preview. Pin the plugin to a commit when reproducibility matters, and re-run the install smoke test when upgrading DSH dependencies.

Skill configuration

Declare activation and hooks directly in SKILL.md frontmatter:

---
name: repo-hardening
description: Review and harden a repository with build/test gates.
metadata:
  activation: auto             # auto | suggest | off
  triggers:
    - "harden"
    - "build fails"
    - "re:exit code \\d+"
  hooks:
    UserPromptSubmit:
      inject: "Run build and tests before reaching a conclusion."
    PreToolUse:
      - tool: bash
        when: "git push"       # substring or re:<pattern>
        decision: deny         # allow | deny | ask
        reason: "Direct pushes are not allowed"
    PostToolUse:
      - tool: bash
        when: "re:exit code [1-9]"
        action: activate
    SessionStart:
      activate: true
---

Activation modes

ModeBehavior
autoA match injects the complete skill immediately
suggestA match adds a lightweight reminder so the model can load the skill
offThe skill never participates automatically but remains manually invocable

Codex-style manual and disabled values are accepted as aliases for off. If activation is omitted, skills with explicit triggers default to auto; all others default to suggest.

Triggers and policies

  • Plain trigger strings use case-insensitive substring matching.
  • Values prefixed with re: are treated as regular expressions; invalid expressions are ignored.
  • PreToolUse.tool accepts a concrete tool name or *.
  • Tool policies return allow, deny, or ask with an optional reason.
  • User overrides can be stored outside upstream SKILL.md files so updates do not erase local policy.

Example overrides:

skill_manager set-triggers ponytail-review triggers=["review this diff","over-engineering"]
skill_manager set-hooks repo-hardening hooks={"PostToolUse":[{"tool":"bash","when":"re:exit code [1-9]","action":"activate"}]}

Hook compatibility

Skill hookDSH host eventSupport
UserPromptSubmitagent/pre-step✅ Inject text on every submission while active
PreToolUsetools/pre-execute✅ Allow, deny, or ask based on tool and arguments
PostToolUsetools/post-execute✅ Activate a skill from matching tool output
PostToolUseFailuretools/post-execute✅ Match failure text through the same result event
SessionStartagent/session-start✅ Activate before matching is required
SessionEnd / Stopagent/disposed / agent/turn-stopping⚠️ Observable only; no content injection
PreCompactNo DSH core equivalent⚠️ Not implemented; removed activation markers allow reinjection

GitHub-managed skills

The manager accepts owner/repo shorthand and full https://, git@, or ssh:// Git URLs.

skill_manager install owner/repo
skill_manager update
skill_manager status
skill_manager uninstall skill-name

During installation, the plugin:

  1. shallow-clones one branch into <DSH_HOME>/skill-sources/<slug>;
  2. discovers SKILL.md directories up to depth 3;
  3. ignores .git, node_modules, dist, and build;
  4. copies discovered skills into <DSH_HOME>/skills/<name>.

Updates fetch the configured ref, reset the source to FETCH_HEAD, and perform an authoritative resync of installed skills. Filesystem watchers then invalidate the catalog automatically and emit skills/change.

Plugin manifests are detected in this order:

  1. .codex-plugin/plugin.json;
  2. .claude-plugin/plugin.json.

The Settings page displays the plugin name, version, skills, and hook count. Safe in-repository Node lifecycle hooks are supported for SessionStart and UserPromptSubmit.

State is stored in <DSH_HOME>/skill-manager.json, including sources, refs, commits, installed paths, scoped overrides, and the 50 most recent operations.

Project-scoped skills

The filesystem provider resolves skill roots in priority order:

PriorityRootSource
1<project>/.dsh/skillsproject-dsh
2<project>/.agents/skillsproject-agents
3Host-configured directorycustom
4<DSH_HOME>/skillsuser-dsh
5<agentsHome>/skillsuser-agents
6Bundled skillsbundled

Project skills participate in the same matching pipeline and win same-name conflicts by priority. Mode, trigger, and hook overrides are keyed by scope plus cwd, preventing settings from leaking across projects or into user-level skills.

Project-local skills remain owned by the project's Git repository. The manager's update operation synchronizes user-level sources only; filesystem watchers refresh project changes.

Management and observability

Settings UI

Settings → Skill Management provides:

  • English and Simplified Chinese copy that follows the active DSH display language;
  • a master switch for proactive activation;
  • per-turn auto-load limits;
  • GitHub install and update controls;
  • per-skill mode, trigger, hook, source, and commit details;
  • project workspace selection;
  • uninstall actions and recent operation history.

Model tool

The skill_manager tool supports status, install, update, uninstall, set-mode, set-triggers, set-hooks, and set-config. Project records use scope: project plus a required cwd.

Events

  • skill-manager/hook{ event, skill, action, detail, at } for hook activity.
  • skill-manager/update — synchronization results after install, update, or uninstall.
  • skills/change — emitted by the filesystem provider after catalog changes.

Permissions and data

SurfaceBehavior
Filesystem readsReads DSH user and project skill roots selected by the host, plus metadata from configured Git sources
Filesystem writesStores sources under <DSH_HOME>/skill-sources, manager-owned skills under <DSH_HOME>/skills, and state in <DSH_HOME>/skill-manager.json
NetworkInvokes the local git executable only for user-requested source installation or update; the plugin implements no telemetry
ProcessesRuns git with argument arrays and may run explicitly declared in-repository Node lifecycle hooks with time and output limits
CredentialsDoes not store Git credentials; authentication remains owned by the user's Git configuration and credential helper
Conversation contextReads the active prompt and skill catalog for matching, then injects activation or suggestion messages into the current session

Uninstalling a manager-owned skill removes its copied skill directory. Locally authored skills that have no managed Git source are not removed by the manager.

Security

  • Git sources must match the supported URL allowlist.
  • Git arguments are passed as arrays, not interpolated shell commands.
  • Skill hooks do not run through a shell.
  • Manifest hook paths must resolve to Node scripts inside the cloned repository.
  • Malformed regular expressions and unsupported hook declarations are ignored.

Installing a plugin with executable hooks means trusting that repository's code. Review third-party sources before installation.

See SECURITY.md for supported versions and private vulnerability reporting.

Development

pnpm test
pnpm lint
FileResponsibility
lib.jsPure matching, scoring, state, hook, and manifest logic
index.jsDSH events, tools, RPC, Git operations, and integration wiring
client/client.jsSettings UI
test.mjsNode test suite
cordis.patch.ymlHost composition patch

Issues and pull requests are welcome in the GitHub repository. See CONTRIBUTING.md for setup, validation, and pull-request expectations.

License

Released under the MIT License.