deepseek-harness-dev
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "deepseek-harness-dev" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-10b122829c39e1efaf2538f818552abd4be56b7ddb5463c2e79021c22897a50f. Verify the upstream source and version against https://skillhub.cn/skills/user_f5732635/deepseek-harness-dev before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
DeepSeek Harness plugin development skill: for developing, extending, or debugging DeepSeek Harness plugins, tools, LLM adapters, services, and events. Covers the Cordis plugin model (apply/inject/effect/fiber lifecycles), the defineTool DSL, Schemastery configuration schema, --patch overlay, bundle/profile packaging and publishing, and the services/events system. Use when writing DSH plugins, registering tools, integrating new model providers, extending agent capabilities, understanding cordis.yml composition, or troubleshooting plugins not loading (PENDING). Documentation: https://deepseek-harness.github.io/deepseek-harness/develop/
Introduction source: third_party · user_f5732635 · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: deepseek-harness-dev
description: |
DeepSeek Harness 插件开发技能。用于开发、扩展或调试 DeepSeek Harness 的插件、工具(Tool)、LLM 适配器、服务与事件,包括 Cordis 插件模型(apply/inject/effect/fiber 生命周期)、defineTool 工具 DSL、Schemastery 配置 schema、--patch overlay、bundle/profile 打包发布、服务与事件系统。当用户要写 DSH 插件、注册工具、接入新模型提供方、扩展 agent 能力、理解 cordis.yml 组合或排查插件不加载(PENDING)时使用。文档来源:https://deepseek-harness.github.io/deepseek-harness/develop/DeepSeek Harness 开发
把 DeepSeek Harness 的开发文档蒸馏成一份可执行的插件开发手册。本技能覆盖官方 develop/ 全量文档:basic(第一个插件 / 工具 / 配置 / 发布)、Cordis 七章教程、framework(生命周期 / 事件 / 服务)、practice(LLM 适配器),并附带 cordis-primer 与工具编写参考的要点。
铁律
- 以仓库生成内容为准,不维护静态清单。 Harness 内置服务名、公开方法与事件签名由仓库自动生成到各子系统页面的 cordis-surface 区块;
@deepseek-ai/cordis与@deepseek-ai/dsh-*包的 TypeScript 类型是权威接口。本技能只提供模式与规则,不替代查类型。 - 每个注册都是可逆副作用。 通过
ctx.on()、ctx.tools.register()、ctx.llm.registerAdapter()、ctx.plugin()注册的一切,卸载时自动清理;Cordis 不管理的资源(定时器、连接、watcher)必须包进ctx.effect()并返回 disposer。绝不手动removeListener/clearInterval后再裸持资源。 - 写真实文档,不发明 API。 教程里给到的代码是验证过的骨架;正文之外的 API 一律先查类型定义或子系统页面,不要凭记忆编造方法签名。
何时使用
- 用户要写/改/调试一个 DeepSeek Harness 插件(agent 能力、工具、服务、事件监听、LLM 适配器)
- 用户要理解
cordis.yml组合、--patchoverlay、bundle/profile 或插件为何不加载 - 用户要实现一个工具(defineTool)或接入新的模型提供方(LlmAdapter)
- 用户提到 DSH / Harness / cordis / 插件开发
工作流
[1] 判定任务域 → 路由到对应 reference
[2] 读取所需 reference(按需加载,不全部读)
[3] 按 reference 中的骨架写代码
[4] 本地验证(--patch 或组合运行)
[5] 如需分发,走 publish 流程
1. 判定任务域并路由
| 用户诉求 | 读取 reference |
|---|---|
| 从零写第一个插件 / 理解插件形态、ctx、注册 | references/plugin-basics.md |
| 写一个工具(工具定义 DSL、execute 约定、后台任务、UI 卡片) | references/tools.md |
| 让插件接受配置(Config schema、Schemastery、HMR) | references/config.md |
| 打包、安装、分发插件(bundle / profile / git 安装) | references/publish.md |
| 理解 fiber 状态机、生命周期、effect、dispose、组合、HMR、诊断 PENDING | references/cordis-core.md |
| 提供/消费服务(Service 基类、inject、可选依赖、服务隔离) | references/services.md |
| 插件间通信(emit / parallel / serial / bail / waterfall、类型安全事件) | references/events.md |
| 接入新模型提供方(LlmAdapter、StreamChunk 协议) | references/llm-adapter.md |
| 把模式用于真实 harness(tools/result 事件、完整 agent 组合、子系统导航) | references/harness-integration.md |
2. 读取 reference
按路由读取对应的 references/*.md。参考文件按领域组织,只读需要的部分;大文件顶部有目录。
3. 写代码 —— 骨架速查
最小的函数插件(Harness 插件是导出 apply 的 TS 模块,框架加载时传入 ctx):
import type { Context } from '@deepseek-ai/cordis'
export const name = 'my-plugin' // 可选,诊断用
export function apply(ctx: Context) {
// 在这里注册能力
}
有依赖的服务时加 inject(框架保证依赖就绪后才执行 apply):
export const name = 'my-tool-plugin'
export const inject = ['tools']
export function apply(ctx: Context) {
ctx.tools.register(/* ... */)
}
4. 本地验证
开发期用 --patch overlay 把本地插件插进 Web 组合:
pnpm dsh web --patch ./scratch-plugin/cordis.yml
overlay 文件是 patch 条目 YAML 数组,插件路径必须是绝对路径:
- insert:
- id: hello
name: '/absolute/path/to/deepseek-harness/scratch-plugin/src/my-plugin.ts'
打开 http://127.0.0.1:3080 验证。若开发命令已在跑,改完文件直接刷新即可(HMR 场景见 cordis-core.md)。
5. 分发(仅当需要交付可安装包)
dsh plugin --profile <name> add ./hello-plugin 安装 bundle;层顺序与 git 安装的构建脚本授权细节见 references/publish.md。
高频规则速记
- 依赖:必需服务用
inject声明;可选服务跳过 inject,用ctx.get('name')在使用处探测并处理 undefined。 - 配置:导出
Config类型 + 同名 Schemastery schema;默认值写进 schema;apply(ctx, config)收到完整校验后的配置。不导普通对象当 Config。 - 可调参数不硬编码:凡是不同部署可能需要不同值的参数,都必须定义为配置字段;检验标准 = 能否在 cordis.yml 改这个值而不改代码。
- waterfall 纪律:只观察/标注的 waterfall 监听器必须调用
next();不调用直接返回 = 有意短路。日志监听器忘记 next() 会吞掉下游默认行为。 - 不加载排查:插件既不执行也不报错时,查 fiber 状态——
inject指定了无人提供的服务就会永远 PENDING,这是合法状态不是错误。 - 命名空间:服务名与事件名共用一个扁平命名空间;自有服务/事件加有辨识度的前缀(如
my-plugin/ready),不要抢占tools、llm等普通名。
反模式
- ❌ 凭记忆写
ctx.tools/ctx.llm的方法签名 —— 先查包类型或子系统页面。 - ❌ 手动管理注册清理(裸
setInterval不包effect、手动 removeListener)。 - ❌ 在工具里内建部署策略 —— 用
tools/pre-execute等事件扩展点,或ctx.tools.guard()。 - ❌ 把 UI 专用格式(``
console 围栏、diff)写进工具的规范值/Native 内容 ——output.render` 负责模型可见内容,卡片展示器负责 UI。 - ❌ 把
turn/*、step/*、tool/call、compaction/*当 Cordis 事件监听 —— 它们是持久化会话事件类型,观察它们要监听session/event并检查event.type。
交付前检查
- [ ] 每个资源都有对应 disposer(
ctx.effect()返回,或 Cordis 自动处理) - [ ] 所有可调参数都是配置字段,且 schema 有默认值
- [ ] waterfall 监听器按意图调用或省略
next() - [ ] 用
--patch或组合实际跑通过一次,而不是只写了代码 - [ ] 新服务/事件命名带自有前缀,并做了类型声明合并(如适用)
Current listing version
1.0.0
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供 DeepSeek Harness 插件开发的完整可执行手册,覆盖 Cordis 插件模型、工具 DSL、配置 schema、打包发布等核心能力
- 面向明确开发者群体,解决插件开发、调试、扩展等实际痛点,具备高实用价值
- 内容结构化为工作流、高频规则、反模式等,便于开发者快速上手和避坑
Highlights
- description 明确描述适用场景(写 DSH 插件、注册工具、接入新模型、排查插件不加载等)
- 触发词覆盖完整(deepseek-harness、插件开发、cordis、defineTool、LLM 适配器等),边界清晰
- 用户可通过多种技术关键词精准触发
Areas to improve
-
Description in the wrong location Reported severity: Minor
顶层 frontmatter 中 description 为空,实质描述内容在 skill_body 内部
Recommendation: 建议将 description 内容移至顶层 frontmatter,保持规范一致性
Highlights
- 结构清晰,包含铁律、何时使用、工作流、高频规则、反模式、交付前检查等完整模块
- 提供了最小插件代码骨架、--patch 验证示例等端到端示例
- The frontmatter is complete and the single-file document has a manageable length.
Highlights
- 强调以仓库生成内容为准、查类型定义,避免凭记忆编造 API,确保信息准确性
- 强调资源清理(effect/disposer)、配置化、命名空间隔离等可靠性实践
- 提供了本地验证(--patch)和分发流程,执行路径完整可靠
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Domains or addresses referenced in the document
These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.
- 127.0.0.1
- deepseek-harness.github.io
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.