dsh-plugin

August 23, 2026 ยท View on GitHub

A comprehensive Claude Code / Codex skill for scaffolding, building, installing, verifying, and debugging DeepSeek Harness plugins.

DeepSeek Harness plugins are built on the Cordis microkernel architecture: ES modules exporting apply(ctx, config) and declaring dsh.bundle.patch so dsh plugin add automatically wires them into the profile layer stack.


๐Ÿš€ Capabilities

  • Automated Scaffolding: Fast template generation (scaffold.mjs) with live dependency version pinning directly from installed profiles (ensures compatibility with Cordis 4.0.1, Schemastery 3.18.1, @deepseek-ai/dsh-tools, etc.).
  • Pre-flight Conformance Verification: Verification tool (verify.mjs) checking bundle manifests, Schemastery schema declarations, bundle patch syntax, and tool definitions before installing into a profile.
  • Deep Reference Guides:
    • plugin-anatomy.md: Plugin structure, apply(ctx, config), lifecycle, and ctx.effect().
    • tools.md: Standard schema, tool execution context, concurrency safety, and tool rendering.
    • services-and-events.md: Harness event hooks (tools/pre-execute, agent/pre-step, etc.) and Cordis service definitions.
    • install-and-verify.md: Step-by-step profile installation, bundle patch resolution, and troubleshooting.
    • pitfalls.md: Known edge cases, reserved tool names, and common mistakes.

๐Ÿ“ Repository Structure

dsh-plugin/
โ”œโ”€โ”€ SKILL.md                 # Main skill definition & guide
โ”œโ”€โ”€ references/              # Detailed architectural guides
โ”‚   โ”œโ”€โ”€ install-and-verify.md
โ”‚   โ”œโ”€โ”€ pitfalls.md
โ”‚   โ”œโ”€โ”€ plugin-anatomy.md
โ”‚   โ”œโ”€โ”€ services-and-events.md
โ”‚   โ””โ”€โ”€ tools.md
โ”œโ”€โ”€ scaffold/                # Plugin template files (.tmpl)
โ”‚   โ”œโ”€โ”€ cordis.patch.yml.tmpl
โ”‚   โ”œโ”€โ”€ gitignore.tmpl
โ”‚   โ”œโ”€โ”€ package.json.tmpl
โ”‚   โ”œโ”€โ”€ README.md.tmpl
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ config.ts.tmpl
โ”‚   โ”‚   โ””โ”€โ”€ index.ts.tmpl
โ”‚   โ”œโ”€โ”€ test/
โ”‚   โ”‚   โ””โ”€โ”€ logic.test.mjs.tmpl
โ”‚   โ””โ”€โ”€ tsconfig.json.tmpl
โ””โ”€โ”€ scripts/
    โ”œโ”€โ”€ scaffold.mjs         # CLI tool to scaffold new DSH plugins
    โ””โ”€โ”€ verify.mjs           # Zero-dependency plugin validator

๐Ÿ› ๏ธ Quick Usage

1. Scaffold a New Plugin

node scripts/scaffold.mjs dsh-my-tool --dir ./projects --profile web

2. Build & Test

cd projects/dsh-my-tool
npm install
npm run build
npm test

3. Verify Before Installation

node scripts/verify.mjs ./projects/dsh-my-tool --profile web

4. Install into DSH Profile

dsh plugin --profile web add -w ./projects/dsh-my-tool

๐Ÿ“œ License

MIT