dsh-plugin-dev
Skill0 starsChanged 34 days agoMITView on GitHub
Build, test, install, and debug plugins for DeepSeek Harness (dsh, built on the vendored Cordis framework): model-facing tools, web UI plugins, MCP connections, service providers for capability seams, or wrapping an existing app/API into dsh. Use whenever the user wants to add a tool, capability, widget, or integration to dsh / DeepSeek Harness, author a Cordis plugin or bundle, or connect their own project or service to a dsh agent — even if they only say "add a tool to my agent" while working in a dsh checkout, a profile, or a dsh plugin workspace.
14 other projects use a version of this.
Adopted by
Most recently taken up by
- TrueHOOHA/dsh-plugin-dev-skilltheir own version, first seen Nov 7, 2026
- caparisen/dsh-plugin-devtheir own version, first seen Oct 25, 2026
- wula1223/dsh-plugin-devtheir own version, first seen Oct 24, 2026
- Fabian-698/dsh-plugin-devtheir own version, first seen Oct 20, 2026
- birdmanmandbir/skillstheir own version, first seen Oct 9, 2026
- realchendahuang/dsh-skilltheir own version, first seen Oct 5, 2026
Other versions14 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 14
- realchendahuang/dsh-skill★ 24same name
- zimodzh/dsh-plugin-dev-skills★ 14same name
- hackerFish/awesome-dsh-skills★ 4same name
- abab996/dsh-plugin-dev★ 2same name
- TrueHOOHA/dsh-plugin-dev-skill★ 2same name
- wula1223/dsh-plugin-dev★ 2same name
- birdmanmandbir/skills★ 1same name
- BlueChonk/BlueChonk-skills★ 1same name
- Wenaixi/dsh-plugin-dev★ 1same name
- benz-ai-x/dsh-plugin-dev★ 0same name
4 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 0 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 38
Every registration (ctx.provide, ctx.on, ctx.tools.register, ...) must return or register a disposer via ctx.effect — uninstall unrolls …
- Very specific: line 98
Keep the export form the template uses.
- Very specific: line 102
If the plugin needs options, export Config (Schemastery z) and put defaults in the patch row's config.
- Very specific: line 104
Check syntax: node --check index.js — run it inside the package directory (the type: module in package.json is what makes ESM imports …
- Very specific: line 130
Read the installer result: warnings and failure fields decide the next step, not terminal vibes.
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
dsh plugin development
Turn a user request into a working, installed, verified dsh plugin. Everything
in DeepSeek Harness is a plugin (the model adapters, the tool registry, the
session log, the agent loop itself), and plugins are composed from YAML patch
layers — so the fastest correct route is: pick the right template, change the
fewest things, install through dsh plugin, and verify through the composed
config before celebrating.
Baseline: written against dsh 0.1.7-rc.x. dsh APIs are pre-stable and evolve;
when anything here disagrees with the runtime, trust dsh --dump-config,
cordis_inspect_query, and the installed packages' own .d.ts files, then fix
this skill's assumption rather than working around the framework.
Mental model in ten lines
- A plugin is an ES module exporting
apply(ctx, config)(plus optionalname,inject,Config), or a service class as default export. Never mix both forms in one module. ctxis a service repository: a service claims a stablectx.<key>(ctx.tools,ctx.llm,ctx.shell,ctx.fs, ...). Plugins find services by key viainject, never by importing another plugin's implementation.- A capability seam has three roles: Service Definition (abstract class
owning
ctx.<key>), Service Provider (implements it), Consumer (injects the key). Providers are swappable; consumers never change. - Every registration (
ctx.provide,ctx.on,ctx.tools.register, ...) must return or register a disposer viactx.effect— uninstall unrolls them in reverse order. - Events are the extension points.
emitobserves;waterfallis middleware: callnext()to delegate, return without it to veto. - The session log is the only durable fact source. What the model sees must be
reconstructable from the log; tools get this for free via
tool/result. - Composition: a bundle (npm package declaring
dsh.bundle.patch) contributes a YAML patch layer; a profile lists bundles in order; later layers override earlier rows by id, replacing the wholeconfig. - A patch row is
{ id, name, config? };nameis the module specifier Node resolves.insertadds rows; a later row with the sameidreplaces it. configis validated by the plugin'sConfigschema (Schemastery) at activation;.volatile()fields hot-update without remounting.disabled(boolean or!!jsexpression) is the only manifest field allowed to be an expression;id/name/inject/configstatics must be literal.
Step 1 — Decide the path
| User wants | Path | Start from |
A tool the model can call (weather, query_db, ...) | Tool plugin | templates/tool-plugin/ + references/tool-plugin.md |
| A widget/card/page in the Harness Web UI | UI plugin | templates/ui-plugin/ + references/ui-and-mcp.md |
| Connect an existing MCP server | Config-only MCP bundle (no code) | templates/mcp-config-only/ + references/ui-and-mcp.md |
| Make their existing app/API callable by the agent | Wrap existing project | templates/wrap-existing/ + references/wrap-existing-project.md |
| Implement or swap a platform capability (shell, fs, llm adapter, sandbox...) | Seam provider / in-repo package | references/seam-provider.md |
In-repo packages (inside the dsh monorepo, @deepseek-ai/dsh-*) follow the
maintainer cookbook instead of the bundle flow — see
references/seam-provider.md § "In-repo packages".
Step 2 — Discover before you write
dsh --profile "$DSH_PROFILE" --dump-configprints the composed plugin tree; every row it prints can be overridden by a patch. Keyless, fast, always do this first when a dsh shell is available.- Inside a running Harness agent session,
cordis_inspect_list/cordis_inspect_queryare agent tools (not shell commands): they answer exact Service methods, Event modes, installed Config schemas (Config.listConfigs), available Tools, and live Client Slots. Query the two or three APIs you will actually touch; do not enumerate. In a CLI-only environment without them,--dump-configplus the installed packages'.d.tsfiles are the fallback. - Installed packages ship
lib/index.js+lib/types/**/*.d.tswith JSDoc under their resolvedpackageDir— read the.d.tsof any service you inject.
Step 3 — Write from the template
Copy the chosen template's files into ONE workspace directory (never install or edit in place), then:
- Rename — and know the three different names:
Name Must be Used by package nameyour choice (e.g. dsh-my-toolor@local/my-tool)install + Node resolution patch row nameexactly the package nameNode resolves the installed code patch row idunique across the profile layer overrides match on it export const nameplugin metadata, free-form display / diagnostics only - Keep the export form the template uses. A tool plugin is
export const inject = ['tools']+export function apply(ctx, config). - Register inside
applythrough the owning registry (ctx.tools.register) orctx.effect/ctx.on, never at module top level. - If the plugin needs options, export
Config(Schemasteryz) and put defaults in the patch row'sconfig. Prefer defaults users keep. - Check syntax:
node --check index.js— run it inside the package directory (thetype: modulein package.json is what makes ESM imports parse) and JSON/YAML-parse the manifest.
Step 4 — Install and verify
dsh plugin --profile demo add ./your-plugin # local checkout
dsh plugin --profile demo add github:you/your-plugin # git (see pitfall P3)
dsh plugin --profile demo add ./your-plugin-0.1.0.tgz # tarball / npm: no build step
dsh --profile demo --dump-config # your layer must appeardsh plugin add is the only supported installer: it runs pnpm in the profile
and appends the bundle to dsh.profile.bundles. Never hand-edit the profile's
package.json / cordis.patch.yml, never create packages under $DSH_HOME,
never run pnpm in the profile directory.
Verification ladder, in order — do not skip to "it should work":
--dump-configshows your rows (composition correct).- Boot and exercise the capability; for UI plugins the installed plugin in the connected page is the first preview (no mock shells before this).
- Durable proof: a REAL-composition test (real Loader +
cordis.ymlfixture) — see references/testing.md.
Read the installer result: warnings and failure fields decide the next step,
not terminal vibes. restart-required means the change is not live yet.
Red lines (each has bitten someone)
| # | Rule | Why |
| P1 | Package must declare dsh.bundle.patch | Without it the package installs as a plain dependency and activates no layer — plugin looks installed but never loads |
| P2 | Stateful dsh packages go under peerDependencies and devDependencies (same range); stateless utils and third-party deps under dependencies | A dependencies copy of a stateful dsh package creates a second instance; peers resolve to the running installation's copy |
| P3 | Git installs need a self-contained prepare build script and user allowBuilds allowance | Git fetches sources, not built artifacts; pnpm ≥10 blocks prepare until allowlisted — treat the allowance as executing the author's code |
| P4 | Patch rows replace the whole config; overriding a row restates every key | Patches do not deep-merge; dropping keys silently changes behavior |
| P5 | Never hand-edit profile manifests; never $DSH_HOME packages; never pnpm in profile | dsh plugin owns those files with locking and reconciliation |
| P6 | One export form per module (function plugin or default-export service class) | Mixing makes the Loader drop the function-plugin namespace |
| P7 | Every registration returns a disposer | Without it HMR/uninstall leaks listeners and tools |
| P8 | @deepseek-ai/cordis in both peer + dev with the same range | Required by package hygiene; peer placeholder triggers runtime resolution |
Full list with fixes: references/pitfalls.md.
Read next
| Task | File |
| Framework mental model, dispatch modes, layer order, session log | references/architecture-map.md |
Tool plugin contract (defineTool, output schema, guards, events) | references/tool-plugin.md |
| Implementing/swapping a capability seam; in-repo packages | references/seam-provider.md |
| Wrapping an existing app/API/CLI into dsh | references/wrap-existing-project.md |
| UI plugins (Client module loader, slots) and MCP bundles | references/ui-and-mcp.md |
| Testing: unit, REAL-composition, profile harness, verification limits | references/testing.md |
| All pitfalls with concrete fixes | references/pitfalls.md |
| Installed but not working? Symptom-organized diagnosis trees | references/troubleshooting.md |
| Starting points (inside this skill directory) | templates/{tool-plugin,ui-plugin,mcp-config-only,wrap-existing}/ |
| Complete worked example (in the kit repo checkout) | examples/dice-tool/ |
Chinese mirrors of every reference live under zh/; prefer them when the user converses in Chinese.
Environment facts
DSH_PROFILE(profile name) andDSH_PROFILE_DIR(its directory) are set in every shell of a profile-launched Harness; absent without a profile. Bash reads$DSH_PROFILE; PowerShell reads$env:DSH_PROFILE.- Profiles live under
$DSH_HOME/profiles/<name>; profilenode_modulesholds only out-of-tree installed bundles. In-box@deepseek-ai/dsh-*packages resolve from the dsh installation itself — your bundle can rely on@deepseek-ai/dsh-basebeing present and current. - Loader patch dialect reference: patch is a YAML array; rows support
id,name,inject,config,disabled(expression allowed),insertblocks.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

