sunshine-lang/dsh-plugin-template 预览 preview

sunshine-lang/dsh-plugin-template

Bundle捆绑包 Native原生 ⭐ 5 MIT Prompts & Skills提示词与技能

可直接发布的DeepSeek Harness插件骨架:包含打包格式、工具DSL、配置、测试以及脚手架脚本。

Project Overview项目介绍

This repository, sunshine-lang/dsh-plugin-template, is an out-of-the-box plugin scaffolding template built exclusively for DeepSeek Harness (DSH). It packages all required DSH plugin development components including the bundle format specification, tooling DSL, configuration validation logic, testing setup and a pre-built release checklist into one single project. To get started generating a new custom DSH plugin, you can simply run the node script node scripts/scaffold.mjs dsh-myplugin --description "what it does" to create a ready-to-edit base skeleton with all required files and folders correctly set up.

After generating the base plugin skeleton, you enter the newly created plugin directory to start modifying the source code for your new plugin. First, you replace the demo hello tool in src/index.ts with your own custom plugin functionality, then adjust the Config field to match your specific needs, and add clear installation, usage and configuration instructions to the plugin's README. This template is designed for any developer that wants to build a custom DSH plugin, from new developers just learning DSH plugin development to experienced developers looking for a standardized starting point.

This template is released under the permissive MIT open source license, and requires a working Node.js environment with pnpm as the package manager to work correctly. The README includes a number of best practices and lessons learned from common plugin development pitfalls, such as omitting required for optional parameters and using Schemastery to define configuration schemas. To comply with DSH ecosystem conventions, you should host each plugin in its own independent GitHub repository, check that your npm package name is available before publishing, and build and commit the lib/ directory to the repository before release.

sunshine-lang/dsh-plugin-template 是专为 DeepSeek Harness(DSH)打造的开箱即用插件开发骨架模板。该模板将 DSH 要求的 bundle 格式、工具 DSL、配置校验、测试流程以及发布清单统一整合到一个项目中,开发者只需通过内置的脚手架脚本就能一键生成新插件的基础骨架,大幅降低了 DSH 插件开发的入门门槛,让开发者可以把精力专注在插件功能本身的实现上。

开发新插件的典型流程为:先执行脚手架脚本生成基础骨架,再进入生成好的插件目录修改源码,将示例中的演示工具替换为自身实现的功能,调整配置项,随后可以在 DSH 仓库内完成集成测试,构建之后就能在 Web UI 中试运行。该模板主要面向想要开发自定义 DSH 插件的开发者,无论你是初次接触 DSH 插件开发的新手还是有经验的开发者都能从中获益。

该项目遵循 MIT 开源许可证,依赖 Node.js 环境和 pnpm 包管理器,文档中整理了多个开发中常见的踩坑经验,比如可选参数省略 required、使用 Schemastery 定义配置等。需要注意,按照 DSH 生态惯例,一个插件应该对应一个独立 GitHub 仓库,发布前需要检查 npm 包名可用性,并提前构建好 lib 目录提交到仓库。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 5 stars - very few users, little community feedback星标只有 5,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

git clone https://github.com/sunshine-lang/dsh-plugin-template.git

把 sunshine-lang/dsh-plugin-template 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

{{TITLE}}(dsh-plugin 模板)

English | 中文

一个开箱即用的 DeepSeek Harness 插件骨架。一切皆插件:本模板把 bundle 格式、工具 DSL、配置校验、测试与发布清单集中在一个项目里。

快速开始

# 1. 用模板生成一个新插件
node scripts/scaffold.mjs dsh-myplugin --description "what it does"

# 2. 修改骨架
cd ../dsh-myplugin
#    - src/index.ts:把演示用的 `hello` 工具替换成你的能力
#    - src/index.ts:调整 Config 字段
#    - README.md:补充安装、用法、配置说明

# 3. 在 DeepSeek Harness 仓库内测试
#    (要求模板位于 <checkout>/scratch-plugin/dsh-plugin-template)
node --import tsx/esm scratch-plugin/dsh-myplugin/test-integration.ts

# 4. 构建(提交 lib/——用户安装无需构建权限)
pnpm exec tsc -p tsconfig.local.json   # 在 harness 仓库内
# 或独立克隆后安装依赖再构建:
npm install && npm run build

# 5. 在 Web UI 中试运行(从 harness 仓库)
pnpm dsh --profile web --patch ./scratch-plugin/dsh-myplugin/cordis.patch.yml

发布清单

  • npm 包名可用(curl -s -o /dev/null -w "%{http_code}" https://registry.npmjs.org/<name> → 404)
  • lib/ 已构建并提交(GitHub 安装不运行构建脚本)
  • package.json 的 repository 字段指向你的 GitHub 仓库
  • README 说明了安装、用法和每个 Config 配置项
  • 推送到 GitHub 时使用独立仓库(一插件一仓库是生态惯例;dsh plugin add "github:you/repo" 需要包根目录)
  • 添加话题:dsh-plugin、deepseek-harness
  • (可选)npm publish——用户之后可 dsh plugin add <name>
  • (可选)把仓库提交到 awesome-deepseek-harness(README.md + README.zh-CN.md,各一行)

目录结构

├── package.json           # dsh.bundle.patch —— bundle 清单
├── cordis.patch.yml       # profile 挂载本 bundle 时插入的层
├── src/index.ts           # 插件本体:name / inject / Config / apply + 工具
├── test-integration.ts    # 无 key 的 harness 上下文测试
├── tsconfig.json          # 干净的构建配置(随包发布)
└── tsconfig.local.json    # 在 harness 仓库内构建(工作区类型路径)

值得保留的约定(踩坑总结)

  • 可选工具参数要省略 required——写 required: false 会被 schema 编译器拒绝。
  • 用 Schemastery 定义 Config(@deepseek-ai/schemastery 的 z.object):所有可调项都是 Config 字段,无效配置在加载时响亮失败。
  • 对完整结果施加边界:限制文件大小、页数、字符数;在有意义的边界截断,并告诉模型如何继续。
  • Node 解析:相对导入使用 .js 后缀(NodeNext ESM);@deepseek-ai/* 依赖声明在 dependencies 中,从 profile 的 node_modules 解析。
  • pnpm workspace 子目录里跑 npm install 会失败(workspace: 协议)——独立开发请在 harness 仓库外脚手架;在仓库内构建请用 tsconfig.local.json。

同作者更多插件

该作者的全部 DeepSeek Harness 插件(统一入口):dsh-plugins

许可证

MIT。

← 上一个 Prev dsh-open-in-ide 下一个 Next dsh-checkpoint-diff →