dsh-plugin-dev

Guides writing and debugging Cordis-based TypeScript plugins for DeepSeek Harness.

96|8|Updated Aug 13, 2026
One-click install
npx skills add https://github.com/pingfanfan/hello-dsh --skill dsh-plugin-dev-pingfanfan
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: dsh-plugin-dev
Source: https://github.com/pingfanfan/hello-dsh/tree/main/examples/skills/dsh-plugin-dev
Command: npx skills add https://github.com/pingfanfan/hello-dsh --skill dsh-plugin-dev-pingfanfan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing plugins for DeepSeek Harness (DSH) involves non-obvious Cordis loader rules, and mistakes like adding a default export or misusing !!js expressions silently break plugins with no diagnostics. This Skill encodes the official postmortems and tested pitfalls so plugins load, inject dependencies, and unload cleanly on the first try. ## Core Features & Use Cases - Loader Trap Prevention: Explains why export default destroys the module namespace (losing inject and name) and why !!js only works inside config, never in disabled/isolate/intercept metadata. - Tool Registration Rules: Covers the real ctx.tools.register() requirements — defineTool() wrapping, mandatory output with schema and render, and the non-standard flat parameters format where required can only be true. - Lifecycle & Debugging Guidance: Details reactive inject dependency semantics, reversible effects via ctx.effect(), and a concrete debugging sequence using dsh --profile web --dump-config and npx dsh-doctor. - Use Case: Your DSH plugin does nothing and throws cannot get property "agents" without inject at load time — this Skill walks you through checking for a default export, verifying the overlay uses an absolute path, and confirming injected services have providers. ## Quick Start Ask the AI to help you write a minimal DSH plugin that registers a tool, or to diagnose why your existing plugin fails to load.

Frequently Asked Questions about dsh-plugin-dev

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a plugin for DeepSeek Harness?▼

Export named bindings only: `name`, `inject`, and an `apply(ctx)` function, with no default export. Load it via a Cordis overlay YAML file using an absolute path, then launch with `dsh web --patch ./your-overlay.yml`.

Why does my Cordis plugin fail with cannot get property without inject?▼

This error means the loader resolved a bare apply function because the module has a default export, discarding the named `inject` declaration. Remove `export default` so the loader reads the full module namespace and builds the fiber with declared dependencies.

How do I register a tool with ctx.tools.register in DSH?▼

Wrap the tool with `defineTool()` and declare an `output` object containing a JSON Schema and a render function. The `parameters` field is a flat field map, not standard JSON Schema, and `required` may only be set to `true`.

Why is my DSH plugin disabled in all modes with no error?▼

A `!!js` expression placed on `disabled`, `isolate`, or `intercept` always evaluates truthy because Cordis only interpolates inside `config`. Move conditional logic into explicit overlay files instead of metadata expressions.

When should I write a DSH skill instead of a plugin?▼

Choose a Markdown skill when the behavior can be described in natural language, since it costs far less and survives upstream API changes. Write a TypeScript plugin only when you need code execution, external services, or lifecycle hooks.