dsh-first-plugin

dsh-first-plugin is a skill for Claude Code, Codex from pingfanfan/hello-dsh. It costs 60 tokens per session (1,550 once invoked), scanned A, original, MIT.

A step-by-step guide for building and installing a first DSH plugin. DSH is a software tool whose plugins can add tools, connect outside services, or respond to agent events.

In plain words
What is it for?
Use it to create a basic plugin, write its configuration overlay, load it, verify it, and troubleshoot the listed setup problems.
Why use it?
Creating a plugin requires several files and setup steps, and the guide records specific errors and fixes for the stated DSH version.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Install

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.

agentmods
npx agentmods add skills/pingfanfan/hello-dsh/dsh-first-plugin
Any agent
npx skills add pingfanfan/hello-dsh --skill dsh-first-plugin
Clone the repo
git clone --depth 1 https://github.com/pingfanfan/hello-dsh

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for dsh-first-plugin

README.md
[![agentmods](https://agentmods.dev/badge/skills/pingfanfan/hello-dsh/dsh-first-plugin.svg)](https://agentmods.dev/skills/pingfanfan/hello-dsh/dsh-first-plugin)
Your own site
<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>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,550 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 6d ago against content hash b264dc645971, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

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.

examples/skills/dsh-first-plugin/SKILL.md · 188 lines

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

Read the full file on GitHub · 188 lines

Changes

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.

  1. 6d ago First seen · 188 lines · 60 tokens per session scan A b264dc645971

Subscribe to this mod's changes

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.

Related

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…

PerryLink/dsh-plugin-guide · 76 tokens

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…

zhu1090093659/dsh-web · 123 tokens

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…

zhu1090093659/dsh-web · 120 tokens

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.

zhu1090093659/dsh-web · 45 tokens

dsh-web-documentation

Use when adding or editing dsh-web README files, docs, AGENTS.md instructions, user-facing configuration text, or bilingual documentation pairs.

zhu1090093659/dsh-web · 34 tokens

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…

zhu1090093659/dsh-web · 176 tokens