Skip to main content

How to use dsh-plugin-dev-skills

Minimal tool example in the DSH plugin development skill pack, registering a greet tool to the model to demonstrate standard defineTool usage.

This article is auto-derived from indexed fields (wiki / faq / compatibility_json), not freshly AI-generated.

This article is derived from the plugin's already-indexed fields (wiki / faq / compatibility_json / readme), not freshly generated by AI. Source field is noted at the end of each section.

Quick start

dsh-plugin-dev-skills / examples/greet-tool

— source: plugin_wiki.wiki_content

Install & verify

dsh plugin --profile web add github:zimodzh/dsh-plugin-dev-skills#path:examples/greet-tool

Run the command above in your DSH Web Profile. Then enable the plugin in the plugin list.

— source: plugins.install

Key points

  • examples/hello-plugin —— 最小插件(bundle 格式):dsh plugin --profile demo add ./examples/hello-plugin 后 dsh --profile demo 启动,应看到加载日志和每 5 秒一次的心跳,卸载时自动清理。
  • examples/greet-tool —— 最小模型工具:安装后对 agent 说 "Use the greet tool to greet Ada.",应收到 "Hello, Ada!"。
  • 更新任何 references 前,先核对官方文档对应页面(文档站或源码生成区块),并在 PR 中注明来源。
  • 遵守 Agent Skills 约束:name 为 kebab-case 且与目录一致;description ≤ 1024 字符(DSH 目录注入提醒默认 500);正文渐进式披露。
  • 欢迎 PR:修正、更多示例、扩充评测集、其它语言版本。

— source: plugin_wiki.readme_en (fallback readme_raw)

FAQ

Can I directly invoke the greet command in the terminal after installation?

No. greet is not a CLI subcommand, but a tool for the model to invoke. You need to have the agent call it in a dsh conversation, for example by saying 'Use the greet tool to greet Ada.'

Do I need to additionally install @deepseek-ai/dsh-tools to install this plugin?

No. This package comes bundled with the dsh installation directory, and the plugin can just import and use it without declaring a dependency in package.json.

What's the difference between this example and the hello-plugin example?

hello-plugin is a minimal lifecycle example demonstrating plugin startup and automatic cleanup; greet-tool is an example of a model-invokable tool, demonstrating the three-part structure of defineTool: parameters, execute, and output.

Can I make the greeting configurable?

Yes. The current implementation hardcodes the 'Hello, ' prefix in the execute function of index.js. You can modify the source code to extract it into ctx.config, or refer to the upstream dsh-plugin-dev skills documentation in references/config.md.

What does the plugin's inject: ['tools'] mean?

It makes the Cordis container register the tools service before executing apply(ctx), avoiding calls to register when ctx.tools is not yet ready.

Is this plugin part of the dsh-plugin-dev-skills repository?

Yes. It is a runnable example under the examples/ directory of the dsh-plugin-dev-skills repository, intended to demonstrate how to write a minimal model tool following the references/tools.md standard documentation.

— source: plugin_wiki.faq_json

Compatibility

  • DSH: 未声明
  • Node: 未声明
  • Platforms: 跨平台

— source: plugin_wiki.compatibility_json

Pitfalls

Review the upstream repo before installing. This guide is auto-derived from indexed fields and may lag the latest release. If anything contradicts the official docs, treat the upstream source as authoritative.

— source: general rule