Preface¶
DeepSeek Harness (DSH) splits runtime capabilities into installable plugin bundles. Developers typically need to manage package.json manifests, cordis.patch.yml registrations, TypeScript build entries, and profile-based load validation simultaneously. Setting up the directory structure and configuration from scratch can easily lead to pitfalls due to inconsistent naming or missing build artifacts.
Below we introduce the dsh-plugin-template open-sourced by maintainer bugmaker2. It is a minimal runnable Hello World template that uses TypeScript and tsdown to compile a Cordis plugin entry point, making it suitable as a fork starting point rather than a feature-complete plugin with business logic.
What This Is¶
dsh-plugin-template is a minimal plugin bundle template for DeepSeek Harness. After Harness loads, it outputs [dsh-plugin-template] hello world to the console.
- Maintainer: bugmaker2
- Category: Workflow (SkillHub directory tag)
- Version: v0.1.0
- License: MIT
- Directory page: SkillHub
- Source: GitHub
SkillHub is a community plugin directory with no official affiliation with DeepSeek / High-Flyer; the page marks the plugin as “installable” but does not list installation commands differing from the README. The following steps follow the repository documentation.
Core Features¶
The template currently does one thing: demonstrate the complete chain from DSH plugin source code to profile loading.
Minimal Cordis Plugin Entry¶
src/index.ts exports name and apply, which prints a log when loaded:
export const name = 'dsh-plugin-template'
export function apply(): void {
console.log('[dsh-plugin-template] hello world')
}
Bundle & Profile Registration¶
package.json declares an installable profile bundle via dsh.bundle.patch; cordis.patch.yml inserts the plugin into the profile:
- insert:
- id: dsh-plugin-template
name: dsh-plugin-template
TypeScript Build¶
tsdown compiles src/index.ts into lib/index.js. The prepare script triggers the build during dependency installation, allowing the JavaScript entry point to be loaded even when installed directly from Git.
Intentionally Kept Minimal¶
The template includes only the Host-side TypeScript plugin, not React Client bundles, Remote contracts, or testing frameworks. Extend it yourself when you need Web UI, remote calls, or complex tests.
Environment Requirements¶
Runtime constraints declared in package.json are as follows:
"engines": {
"node": "^22.19 || >=24",
"dsh": ">=0.1.0-rc.6"
}
Development dependencies include TypeScript and tsdown; package manager examples use pnpm.
Installation & Enabling¶
It is recommended to start with a fork, installing the bundle into a specified profile from your local directory. Clone your own fork, enter the directory, install dependencies, and perform type checking and build:
git clone https://github.com/YOUR-USER/dsh-plugin-template.git
cd dsh-plugin-template
pnpm install
pnpm run check
Add the current directory as a bundle to a profile named hello and verify the plugin name appears in the configuration:
dsh plugin --profile hello add .
dsh --profile hello --dump-config | grep dsh-plugin-template
Start that profile and confirm Harness outputs:
[dsh-plugin-template] hello world
Remove the plugin from the profile:
dsh plugin --profile hello remove dsh-plugin-template
Typical Usage¶
Developing on the Template¶
- Fork the repository and complete the first load verification as in the previous section.
- Edit
src/index.tsto implement your plugin logic. - Run
pnpm run buildto regeneratelib/. - Restart the corresponding profile and observe Harness output or behavioral changes.
Keeping Three Places Consistent When Renaming the Plugin¶
When changing the package name, the following fields must be synchronized; otherwise, registration and entry points will mismatch:
package.json→namesrc/index.ts→namecordis.patch.yml→idandname
Visibility When Publishing to the Community¶
Add the topic dsh-plugin to your forked GitHub repository to make it discoverable on GitHub topic pages. Topics are repository metadata, not files within the repository:
gh api --method PUT repos/YOUR-USER/dsh-plugin-template/topics \
-H 'Accept: application/vnd.github+json' \
-f 'names[]=dsh-plugin'
Repository Structure¶
package.json # Declares dsh.bundle patch and build entry
src/index.ts # TypeScript Cordis plugin entry
lib/index.js # Auto-generated Harness entry
cordis.patch.yml # Registers the package into the profile
tsconfig.json # TypeScript type checking configuration
pnpm-lock.yaml # Dependency lock
package.json is the only manifest Harness requires: dsh.bundle.patch makes the package an installable profile bundle.
Use Cases & Considerations¶
Who It’s For
- Developers writing their first DSH plugin who need a minimal runnable example for reference.
- Teams planning to fork and quickly set up a TypeScript + tsdown build pipeline.
- Projects that only need Host-side logic and don’t yet require Web UI or remote contracts.
Before Use
- The plugin runs with the permissions of the current
dshprocess; read the source and confirm the MIT license and dependencies before installation or enabling. - The template outputs only “hello world” and contains no business functionality; actual capabilities must be implemented in your forked code.
- The SkillHub page shows the plugin was updated to v0.1.0 about a week ago; specific behavior depends on the commit you install.
Conclusion¶
dsh-plugin-template consolidates the most easily overlooked aspects of DSH plugin development—manifests, patch registration, build artifacts, and profile validation—into a reproducible set of steps. When you need a minimal starting point, refer to the directory page for metadata, then fork the GitHub repository and follow the README to complete the loading process.
- Directory page: https://www.skillhub.cn/plugins/bugmaker2/dsh-plugin-template
- GitHub: https://github.com/bugmaker2/dsh-plugin-template