Guide · author
Write a DeepSeek Harness Plugin
A DeepSeek Harness plugin is a TypeScript module that exports apply. The framework calls it with a Cordis ctx. That is the whole contract. Everything else — tools, UI cards, skins, sandboxes — registers through that context and unwinds when the plugin unloads.
Minimal plugin
import type { Context } from '@deepseek-ai/cordis'
export const name = 'hello-plugin'
export function apply(ctx: Context) {
console.log('[hello-plugin] plugin loaded!')
}If you need another service, declare it. The loader waits:
export const name = 'my-tool-plugin'
export const inject = ['tools']
export function apply(ctx: Context) {
ctx.tools.register(/* ... */)
}Load it with a patch
Official tutorial creates scratch-plugin/cordis.yml as a Web overlay. Paths must be absolute:
- insert:
- id: hello
name: '/absolute/path/to/deepseek-harness/scratch-plugin/src/my-plugin.ts'pnpm dsh web --patch ./scratch-plugin/cordis.yml
Publish so this registry can find you
- Put a real README at the repo root: what it does, who it is for, the install line.
- Add the dsh-plugin GitHub topic. That is the official discovery hook.
- Prefer a
.dsh-pluginlayout if you are shipping a repository plugin rather than a scratch file. - Send the repo via the submit page. We inspect before listing so the topic dump does not become the catalog.
What not to ship
- Do not tag an unrelated Claude skill as
dsh-plugin. The topic is already noisy. - Do not patch the official agent-loop if a hook plugin will do. Preview RCs will break you.
- Do not claim “verified” yourself. That word on this site means we read the README, not that we blessed the binary.