DeepSeek-Harness-Principles-and-Practice
DiscoveredDeepSeek Harness Plugin Development in Practice — A structured tutorial for building Harness plugins from the ground up, compiled from 65+ official documents, complete with full code examples and real-world cases. The plugin manager PRD mode lets the agent generate a requirements document first, then proceed with plugin generation.
DeepSeek Harness 插件开发实战
本仓库是 DeepSeek Harness 官方教程文档的重新整理版,以"插件开发实战"为主线,将零散的 65+ 篇文档组织为一本结构化的电子书。
面向有编程基础 + 了解 LLM 工作原理的开发者,目标读者想自己动手编写 Harness 插件的开发人员。
内容概览
全书共 14 章,按四个部分组织:
第一部分:基础篇(第 1-3 章) 从零认识 Harness、搭建开发环境、理解 Cordis 插件框架的核心概念。
| 章节 | 内容 |
|---|---|
| 第 1 章 | Harness 是什么、核心问题、5 分钟快速体验 |
| 第 2 章 | 环境搭建、hello-plugin、三种写法、加载机制 |
| 第 3 章 | Context、inject、事件系统、effect、Config+Schema |
第二部分:实战篇(第 4-6 章) 动手写真正的工具插件,深入文件系统/Shell/后台任务,集成 LLM 能力。
| 章节 | 内容 |
|---|---|
| 第 4 章 | 工具四要素、greet 工具、参数类型、规范值 vs 渲染、file_stats 工具 |
| 第 5 章 | 文件系统工具、Shell 命令、持久终端、后台任务、执行管道、UI 卡片 |
| 第 6 章 | 适配器模式、模型配置、自定义适配器、流式协议、推理模型 |
第三部分:进阶篇(第 7-10 章) Web UI 插件、完整实战案例、Agent Preset 编写、高级 Harness 能力。
| 章节 | 内容 |
|---|---|
| 第 7 章 | Host vs Client、设置卡片、对话定制、样式、打包 |
| 第 8 章 | 实战:一个完整的 Web UI 插件,从需求到打包分发 |
| 第 9 章 | 实战:Agent Preset 编写、需求文档驱动的开发流程 |
| 第 10 章 | Subagent、Goal、Workflow、Plan Mode、Schedule、Skill |
第四部分:架构与发布篇(第 11-14 章) 深入架构理解、安全模型、测试与发布、事故复盘。
| 章节 | 内容 |
|---|---|
| 第 11 章 | 微内核、核心子系统、Agent 生命周期、能力接缝、事件驱动 |
| 第 12 章 | 沙箱、权限、持久化、压缩内容溢出、防御性编程 |
| 第 13 章 | Bundle、Profile、测试策略、代码审查、发布流程 |
| 第 14 章 | 4 篇 Postmortem、术语表、参考资料索引 |
目录结构
├── README.md # 本文件
├── book-output/ # 电子书正文(14 章 + 索引)
│ ├── README.md # 电子书内部索引
│ ├── 01-什么是DeepSeekHarness.md
│ ├── ...
│ └── 14-事故复盘与参考.md
├── docs/ # 原始教程文档(参考资料)
├── dsh-open-editor/ # 实战案例:编辑器按钮插件(第 8 章源码)
└── .agent-presets/ # 实战案例:Plugin Builder 预设(第 9 章源码)
阅读建议
- 新手入门:按 1 → 2 → 3 → 4 → 5 → 6 → 10 顺序阅读
- 想写 Web UI 插件:在上述基础上 + 7 → 8
- 想自定义 Agent 行为:9(Plugin Builder 预设)
- 想理解设计原理:11 → 12 → 13
- 查阅参考:14
每章头部有章节导航链接(上一章/下一章)和参考文档链接(指向 docs/ 和源码目录),方便跳转。
数据来源
本电子书基于 DeepSeek Harness 仓库的以下原始资料编写:
.agent-presets/plugin-builder/— Plugin Builder 预设源码dsh-open-editor/— 编辑器按钮插件源码
Comments
Loading…
Similar plugins
by 2768651338
DeepSeek Harness 的图形化插件管理插件:在 设置 → 插件 里新增「插件管家」标签页,用中文名和说明展示每个插件是做什么的,并提供一键启停开关与内置备注编辑——启停写入全局层补丁并实时热生效,备注保存到本地覆盖文件长期生效。
★ 9
MIT
JavaScript
Oct 8, 2026
dsh plugin --profile web add @2768651338/dsh-plugin-managerby beijingwahw
DeepSeek Companion — DeepSeek Harness 官方伴侣插件:对话导出/交接摘要/成本优化/全局检索 + 执行轨迹分析、Prompt 工程工作台、多模型竞技场、任务编排、安全与审计(E–J 九大模块,Cordis 插件化)。
★ 4
↓ 122/wk
MIT
TypeScript
Sep 19, 2026
dsh plugin --profile web add dsh-companionby Tsqurt
为了开发插件,开发了一个开发插件的插件。通过可视化的事件流、插件管理、工具管理、技能管理、预设管理,简化插件的开发流程,方便开发者理解插件的作用。
★ 9
↓ 23/wk
MIT
JavaScript
Aug 27, 2026
dsh plugin --profile web add @tsqurt/dsh-plugin-studioby JoukoPuro
一个 DeepSeek Harness(DSH)插件: 在 Web 输入框的工具行中添加一个 ✨ 图标按钮。点击后选择打磨风格,已接入的大模型 会把你草稿中的提示词改写得更专业、更易被 AI 理解 。A DeepSeek Harness plugin: icon-only composer button that rewrites your prompt via the connected LLM
★ 6
↓ 107/wk
MIT
JavaScript
Aug 14, 2026
dsh plugin --profile web add dsh-prompt-polishby Leitarkkk
DeepSeek Harness plugin that auto-nudges agents to consult docs or web search when local trial-and-error becomes costly. DeepSeek Harness 插件:当本地试错成本升高时,自动注入检索提示,引导 Agent 查阅文档或联网搜索。
★ 4
↓ 83/wk
MIT
JavaScript
Aug 28, 2026
dsh plugin --profile web add dsh-research-nudgeby NinjaSln-labs
DeepSeek Harness 插件:Cursor-as-subagent 提供方——一次本地 @cursor/sdk one-shot 运行、摘要优先结果、可无人值守的 Profile Bundle
★ 0
↓ 353/wk
MIT
TypeScript
Oct 2, 2026
dsh plugin --profile web add dsh-subagent-cursor