Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/pingfanfan/hello-dsh/dsh-first-pluginnpx skills add pingfanfan/hello-dsh --skill dsh-first-plugingit clone --depth 1 https://github.com/pingfanfan/hello-dshWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/pingfanfan/hello-dsh/dsh-first-plugin)<a href="https://agentmods.dev/skills/pingfanfan/hello-dsh/dsh-first-plugin"><img src="https://agentmods.dev/badge/skills/pingfanfan/hello-dsh/dsh-first-plugin.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00060 | $0.01550 |
| Opus 5 | $0.00030 | $0.00775 |
| Sonnet 5 | $0.00012 | $0.00310 |
| Haiku 4.5 | $0.00006 | $0.00155 |
Grade A, and why
dsh-first-plugin scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 188 lines — stays where its author put it; the contents beside it link to each section on GitHub.
做出你的第一个 DSH 插件
这是一条实测跑通过的路径,不是从文档推的。下面每个报错都真实遇到过,修法也都验证过。
环境:DSH 0.1.0-rc.6,Node 20+。
先问一句:真的需要插件吗
如果你想做的事用自然语言就能说清楚(改变模型的判断标准、输出格式、工作流程),写技能,一个 Markdown 文件,五分钟搞定,也不会被上游 API 变更打挂。
只有需要注册新工具、接外部服务、挂生命周期钩子时才需要插件。
完整流程
一、装 DSH,确认能跑
npx @deepseek-ai/dsh --version
二、写插件
hello-plugin/src/hello.ts:
import type { Context } from '@deepseek-ai/cordis'
import { defineTool } from '@deepseek-ai/dsh-tools'
export const name = 'hello-plugin'
export const inject = ['tools']
export function apply(ctx: Context) {
ctx.tools.register(defineTool({
name: 'pingfan_hello',
description: '返回一句固定问候,用于验证第三方插件是否加载成功。',
parameters: {
who: { type: 'string', description: '要问候的对象' },
},
output: {
schema: {
type: 'object',
additionalProperties: false,
properties: {
greeting: { type: 'string', required: true },
},
},
render: (_args, value) => [{ type: 'text', text: value.greeting }],
},
execute(args) {
const who = args.who ?? 'world'
return Promise.resolve({ greeting: `HELLO to ${who}` })
},
}))
}
三、写 overlay
hello-plugin/cordis.yml:
- insert:
- id: hello
name: '/绝对/路径/hello-plugin/src/hello.ts'
路径必须是绝对路径。 生成方式:
cat > cordis.yml <<EOF
- insert:
- id: hello
name: '$(pwd)/src/hello.ts'
EOF
四、加载并验证
DEEPSEEK_API_KEY=sk-xxx npx @deepseek-ai/dsh --profile headless \
--patch ./cordis.yml "调用 pingfan_hello 工具,参数 who 填 test"
看到工具返回的内容就说明成功了。
Web UI 同理:
npx @deepseek-ai/dsh web --patch ./cordis.yml
实测踩到的三个报错
按遇到的顺序,都是真实报错原文。
报错一:must declare output { schema, render, presentationMeta? }
tool "pingfan_hello" must declare output { schema, render, presentationMeta? }
原因:工具注册必须声明 output,里面要有 schema(返回值的结构)和 render(怎么渲染给模型看)。只写 name/description/parameters 不够。
修法:补上 output 块,见上面的完整例子。
报错二:parameters.who.required must be true when present
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago First seen · 188 lines · 60 tokens per session scan A b264dc645971
dsh-first-plugin is a skill published in the GitHub repository pingfanfan/hello-dsh (88 stars, last pushed 22d ago), licensed MIT. It adds 60 tokens to every session and 1,550 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
dsh-plugin-guide
Use when developing, reviewing, packaging, debugging, or answering questions about DeepSeek Harness (DSH) plugins — the plugin-based agent harness on vendored Cordis. Applies the official plugin-development constraints (plugin contract, cordis.yml layers, services/events/effects, tool DSL, bundles/profiles) backed by…
dsh-web-community-plugin-developer
Develop a DSH community plugin and register it in the dsh-web Community Plugins index — author the plugin in the contributor's own repository following the official cordis bundle standard, add its entry to packages/dsh-community-plugins/community.json, regenerate the index with scripts/community-index, rebuild and…
dsh-web-skin-developer
Build a new skin for the dsh-web skin collection (DSH Web GUI) and publish it into the Skin Center — the first-level settings section — scaffold with scripts/dsh-skin-new, author the v2 skin.json manifest plus skin.css token remap (pure asset directory, no package.json, no build step), validate with scripts/dsh-skin…
dsh-web-pre-push-checks
Use before pushing, opening or updating a pull request, or claiming dsh-web checks pass. Selects the required repository gates and diff-specific generation, build, and GUI evidence.
dsh-web-documentation
Use when adding or editing dsh-web README files, docs, AGENTS.md instructions, user-facing configuration text, or bilingual documentation pairs.
dsh-sdk-upgrade
Safely select and install a compatible official @deepseek-ai SDK release for dsh plugin projects (dsh-web, dsh-trading, and similar monorepos) from npm using an isolated worktree, explicit cohort review, CI-equivalent validation, and controlled rollout — including syncing the project's declared DSH host-version floor…