dsh-plugin-dev-skill
by smiletao
开发 DeepSeek Harness(dsh)插件的 AI 技能
An AI Skill for developing DeepSeek Harness (dsh) plugins.
安装
dsh plugin --profile web add github:smiletao/dsh-plugin-dev-skillGitHub 源码安装:首次需按提示配置 allowBuilds 构建授权后重试
安装与环境配置指引、插件开发教程见 DSH 中文社区文档 ↗
安装即在你的机器上以你的权限运行第三方代码——它可读写文件、使用凭据、访问网络,DSH 的工具审批不会为插件代码加沙箱。「检测到 manifest」仅代表发现 dsh.bundle / dsh.plugin 清单,不构成兼容性或安全审查;安装前请审阅源码,不熟悉的插件先在不含密钥的环境试用。
README
目录
- What is this?
- Why use this skill?
- Quick Start
- Option A: TraeCode / Trae IDE
- Option B: Cursor / Claude Code / Other Agent Plugins v1 clients
- Option C: Reference only
- Project Structure
- What's inside the Skill?
- Extension Point Map (15+ mechanisms)
- Plugin Type Templates
- Best Practices (9 rules)
- Compatibility
- Contributing
- Related Resources
- License
- 中文说明
- 使用方式
- 包含内容
- 相关文档
An AI Skill for developing DeepSeek Harness (dsh) plugins.
English | 中文
What is this?
This project provides a knowledge-packed Skill file (SKILL.md) that teaches AI coding assistants how to write dsh plugins. When loaded into a TraeCode, Cursor, Claude Code, or any Agent Plugins v1-compatible client, it gives the AI instant access to:
- dsh's Cordis-based "Everything is a Plugin" architecture
- Complete extension point map (15+ mechanisms)
- Copy-paste templates for 5 plugin types (Tool, Hook, LLM Adapter, UI, Session Event)
- Package structure conventions and naming rules
- Turn flow reference and event dispatch modes
- Verification checklist and best practices
It is NOT a dsh runtime plugin itself — it is a development-time knowledge asset that makes AI assistants write better dsh plugins, faster.
Why use this skill?
Writing dsh plugins requires understanding Cordis services, typed events, the session log invariant, tool execution contracts, and 15+ extension points. Without this skill, an AI assistant has to guess or hallucinate API shapes. With it, the AI gets it right the first time.
| Without skill | With skill |
|---|---|
Hallucinated ctx.registerTool() |
Correct ctx.tools.register(defineTool({...})) |
| Wrong event names | Correct tools/pre-execute waterfall |
Missing inject field |
Correct export const inject = ['tools'] |
| Impure UI presenters | Pure presentCall / presentResult |
| Manual load-order hacks | Declarative inject dependency |
Quick Start
Option A: TraeCode / Trae IDE
Copy the skills/dsh-plugin-dev/ directory to your project's .trae/skills/ folder:
cp -r skills/dsh-plugin-dev /your/project/.trae/skills/
The skill auto-triggers when you ask the AI about dsh plugins.
Option B: Cursor / Claude Code / Other Agent Plugins v1 clients
Copy skills/dsh-plugin-dev/SKILL.md to your project's .agents/skills/dsh-plugin-dev/SKILL.md or equivalent skills directory.
Option C: Reference only
Read skills/dsh-plugin-dev/SKILL.md directly as a cheat sheet.
Project Structure
dsh-plugin-dev-skill/
├── README.md # This file
├── LICENSE # MIT
├── .gitignore
├── skills/
│ └── dsh-plugin-dev/
│ └── SKILL.md # The core skill file (knowledge base)
├── examples/
│ ├── tool-plugin/
│ │ ├── index.ts # Example: JSON formatter tool
│ │ └── cordis.yml # Plugin loading config
│ ├── hook-plugin/
│ │ └── index.ts # Example: Safety-gate permission hook
│ └── llm-adapter/
│ └── index.ts # Example: Custom LLM provider adapter
└── docs/
├── architecture-zh.md # dsh 架构速览(中文)
└── quickstart-zh.md # 快速上手(中文)
What's inside the Skill?
Extension Point Map (15+ mechanisms)
| Goal | Mechanism |
|---|---|
| Add a model provider | ctx.llm.registerAdapter() |
| Add a model-facing tool | ctx.tools.register(defineTool({...})) |
| Permission gate / policy | tools/pre-execute waterfall |
| Add a human command | ctx.commands.register() |
| Background work | ctx.jobs.start() |
| Filesystem access/policy | ctx.fs provider or fs/* events |
| Sandbox confinement | ctx.sandbox backend |
| Intercept request/tool/turn | agent/* or tools/* events |
| Inject model-facing context | agent.inject() |
| UI / editor integration | ctx.agents + session/event |
| Durable session state | extend SessionEventMap |
| System prompt section | ctx.systemPrompt.section() |
| Scheduled tasks (cron) | timer → followup() when idle |
| MCP server adapter | discover → ctx.tools.register() |
| Session title generation | ctx.sessionTitle provider |
Plugin Type Templates
- Tool Plugin — The most common type. Registers a model-callable tool with typed parameters, canonical output, and optional UI cards.
- Hook Plugin — Intercepts tool calls for permission gating, audit logging, or policy enforcement.
- LLM Adapter — Connects a new model provider to dsh's streaming pipeline.
- UI Plugin — Renders from the
session/eventfeed and drives input back throughagent.followup(). - Session Event — Extends durable session state with model-visible data.
Best Practices (9 rules)
- Prefer events for interception; prefer service methods for direct calls
- Every registration needs a disposer
- Keep tool executors focused — put policy in
tools/pre-execute - UI presenters must be pure (they run on streaming AND replay)
- Secrets via Cordis Config — never read key files in code
- Name by responsibility (Controller/Store/Registry/Runtime/etc.)
- One
ctxkey per concept - Honor
exec.signalfor cancellation - Model-visible = logged
Compatibility
- dsh version: Target
@deepseek-ai/dsh0.1.0-rc.5+ - Node.js: 22.19+ or 24+
- Skill clients: TraeCode, Cursor, Claude Code, OpenCode, Kimi Code, ZCode, Codex, or any Agent Plugins v1.0.0 conformant client
Contributing
Contributions are welcome! If you find an outdated API reference, missing extension point, or have a new template to add:
- Fork this repo
- Edit
skills/dsh-plugin-dev/SKILL.md - Add/update examples in
examples/ - Submit a PR
Related Resources
- DeepSeek Harness GitHub — Official repo
- Official Docs — Developer documentation
- Community Plugins — 300+ community plugins
- Cordis Framework — The underlying plugin framework
- Architecture Doc — Deep dive
- Extension Cookbook — Feature-to-mechanism map
- — Plugin ecosystem radar
License
中文说明
本项目是一个 AI Skill 知识库,帮助 AI 编程助手正确地编写 DeepSeek Harness (dsh) 插件。
它本身不是 dsh 运行时插件,而是一个开发期的知识资产,让 AI 助手在写 dsh 插件时不再猜测 API 形状。
使用方式
TraeCode / Trae IDE:
cp -r skills/dsh-plugin-dev /your/project/.trae/skills/
Cursor / Claude Code 等:
将 SKILL.md 复制到项目的 .agents/skills/ 目录下。
包含内容
- Cordis 微内核架构概述和 5 大核心概念
- 15+ 扩展点映射表(从添加工具到沙箱配置)
- 5 种插件类型的完整代码模板
- 包结构规范和命名规则
- Turn 执行流程和事件分发模式
- 验证清单和 9 条最佳实践
- 3 个可运行的示例插件
相关文档
原始 README: https://github.com/SmileTao/dsh-plugin-dev-skill/blob/main/README.md ↗
同类插件
查看全部 →vibe-skills
vibe 编码技能合集(含快速开始、CI 证明、发布说明与文档)

Aegis
面向编码 Agent 的软件工程方法包,提供基线优先规划、系统化调试、提示词卫生、完成前验证,以及修复/退役双轨跟踪技能。

J-Space-Cognition-Suite-V3.6
A model-agnostic inference-time control suite for deep reasoning, long-horizon work, tool use, verification, and recovery. 面向深度推理、长程任务、工具调用、验证与恢复的模型不可知推理时控制套件。

MisakaNet
失败恢复记忆库:从真实工程会话中搜索和记录失败恢复教训,支持 BM25 + 语义 RAG 检索和知识库管理。

dsh-find-plugins
对 DSH 说一句「有没有插件能……」,它就会从全 GitHub 的 dsh-plugin topic 里找出候选,解释差别,等你选好以后再安装和验证。

humanizer-ru
AI代理技能:识别并清除俄语文本中的机器生成痕迹。38种模式,39个带证据注册的regex标记,盲对偶运行,C2PA/EXIF/XMP文件元数据清理