dsh-plugin-dev
Skill0 starsChanged 3 months agoMITView on GitHub
Use when developing, writing, testing, packaging, or publishing a DeepSeek Harness plugin — choosing a plugin form (toolkit / ui-panel / hybrid / daemon-loop / service host / bridge / provider-replacement / pure distribution), scaffolding a new plugin (scaffold-plugin.mjs, 30-second start), the dual-face skeleton (host src/index.ts + browser src/client/), client bundle (window.__ModuleLoader__ closure factory, platform seed table), security discipline (loopback fences, credentials server-side only, atomic 0600 writes, spawn allowlist, SSRF hardening), or running the plugin gate (verify-plugin.mjs P1-P13). Triggers on "开发插件 / 写插件 / 插件骨架 / scaffold / verify-plugin / client bundle / UI 注入 / 工具注册 / 热挂载 / 打包插件 / 发布插件 / dual-face". Read dsh-foundations first for safety red lines and the everything-is-a-plugin model; the config-assembly gate (verify-patch.mjs) is the sibling step after packaging.
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
- mahingbun-dev/dsh-plugin-dev-kittheir own version, first seen Nov 1, 2026
- caparisen/dsh-plugin-devtheir own version, first seen Oct 25, 2026
- wula1223/dsh-plugin-devtheir own version, first seen Oct 24, 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
Files
dsh 插件开发范式与测试闸门
本技能管"造 dsh 的扩展":六类范式、骨架、client bundle、安全纪律、发布闸门。REQUIRED BACKGROUND: dsh-foundations(安全红线 + 一切皆插件);打包后装配侧验证走 dsh-config-assembly。
完整范式手册见本技能 references/plugin-dev.md(源自 9 个真实项目 + 生态前 30 源码分析);测试场景库见 references/dev-testing.md;社区生态雷达(awesome-dsh-plugin.com 前 30 项目形态/机制/盲区)见 references/ecosystem.md——审计第三方插件前先翻 ecosystem。
六类范式速选
- 加 UI → dual-face(host
src/index.ts+ browsersrc/client/);加工具 → 工具型(裸 JSON-Schema 或 defineTool);编排 agent → 编排型(ctx.subagents复用 harness 子代理);管插件 → 安装器型(重放 dsh CLI + Include 子树热挂载);改模型行为 → host-only 预设;对外提供服务 → 服务宿主型(ctx.<service>+ inject + 类型 re-export);连外部客户端 → 桥接型(registerUpgrade WS + 扩展伴侣);替换官方能力 → provider 替换型(mirage 换 fs/shell,注意破坏传播);只发内容 → 纯分发型(skill 分发 / MCP 挂载 / 免构建 git 直装);聊天流内渲染 → 生成式 UI 型(白名单 schema 渲染沙箱 + 动作回环)。
骨架四件 + 标准桩件生成器
- 骨架四件:
cordis.patch.yml最简 insert(id+name)、package.json 的dsh.bundle.patch+dsh.client.inject/platform元数据、exports././client、本地开发dsh plugin add link:<路径>。 - 生成器:
node <skill>/scripts/scaffold-plugin.mjs --name <pkg> --form toolkit|ui-panel|hybrid|daemon-loop [--no-client] [--out <dir>]——从本技能assets/三件套模板(闭包工厂 client-bundle.template.js / 最简+group 包裹 cordis-patch.template.yml / dual-face package.template.json)组装桩件,生成后自动跑 verify-plugin 自检,0 FAIL 才算成型。手写也可以直接 cp 模板改(模板注释写明了两个 inject 概念的区别、P1 some 语义、sourcemap/尾逗号合法形态)。 - 客户端 bundle 三件套:
window.__ModuleLoader__.load({id, factory})闭包工厂、平台种子表 external、纯度门禁跨插件 value import(协作走 cordis 服务/slot)。
安全纪律(照抄 plugin-dev §7)
环回 fence、凭据只在服务端、原子写 0600、spawn allowlist、SSRF 硬化、附件 magic-byte。
- 大坑:子代理只有你的工具、没有 bash——你写的任何全局钩子遇到无 shell 目录必须降级放行(本机 router-bootstrap 事故,见 dsh-foundations 的 diagnose.md)。
插件测试闸门(开发侧,改插件源码/打包/发布前必跑)
- 脚本:本技能
scripts/verify-plugin.mjs(零依赖静态门禁,编码 9 个真实项目的教训)。 - 用法:
node <skill>/scripts/verify-plugin.mjs --dir <插件包目录> [--strict];退出码 0=通过(可打包),1=有 FAIL(禁止打包/发布);CI 用--strict把 WARN 也当失败。 - 十三条检查(P1-P13):P1 包名命中(patch 至少一个 insert.name==package.json name,兼容
<pkg>/<subpath>子路径装载与 group 包裹/多实例;纯 MCP 挂载/skill 分发豁免,改名事故);P2 bundle patch 最简 insert(复杂行破坏热挂载解析;顶层非 insert 是发行版合法形态只 WARN);P3 exports 与 dsh.client 自洽(client 路径按 exports["./client"] 解析,兼容自定义布局);P4 client.js 是__ModuleLoader__.load闭包工厂(GUI loader 唯一合法形态,容忍 sourcemap/尾逗号);P5 client.js require 只在平台种子表内(漏网=loader 答不出必崩);P6 files 白名单含 client bundle 实际路径+patch(纯挂载/分发/皮肤型豁免 lib 要求);P7 system-prompt/assemble 钩子不得对 shell===null throw(mnemon/router-bootstrap 真实事故,必须降级 warn+放行);P8 路由有环回 fence(HTTP POST + WS registerUpgrade 升级路由,词表含 trustedHosts);P9 跨插件 import 确认 type-only;P10 版本/dsh 元数据就绪;P11 包内工具名无重复(P11c 服务面提示:guard/skills.register/provide/registerAdapter 类无 defineTool 属正常);P12 插件形态识别(MCP 挂载型/skill 分发型/皮肤型/host-only/dual-face 分叉,防纯门面包误判);P13 发布面与外发网络(WARN 级:scoped 包建议 publishConfig.access:public——真实生态用npm publish --access public发布可缺省;peer 过度绑定 ≥5 个 host rc 包 WARN;P13c 纯工具插件的外发 fetch/http 查 SSRF 硬化线索,用户自有 endpoint 豁免)。 - 完整场景库(四层测试金字塔 + 30+ 测试场景,按风险面分组):
references/dev-testing.md——装配/元数据、可靠性与状态、UI、安全、发布门禁。 - 节奏:改源码 →
verify-plugin.mjs --dir .→ 修 FAIL → 打包 →verify-patch.mjs --patch <候选>(装配侧,见 dsh-config-assembly)→ 才可重启。两个闸门互补:一个管"包对不对",一个管"树能不能装配";会话数据侧由 dsh-session-logs 的 verify-session 管"日志能不能恢复"。 - 闸门自测:全套自测器在 dsh-config-assembly 的
test/run-gate-tests.mjs(跨技能解析本技能的 verify-plugin/scaffold)。
修复可逆性纪律
任何写配置/写 patch 的修复必须先备份原文件(.bak 或 journal 记录 undo 步骤),修完跑闸门验证,失败可一键回滚。
相关技能
- 打包后装配验证、MCP 挂载 → dsh-config-assembly
- 会话日志验证 → dsh-session-logs
- 安全红线/成本纪律 → dsh-foundations
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.

