dsh-first-plugin

Guides building, loading, and verifying a first DSH plugin with tested error fixes.

96|8|Updated Aug 13, 2026
One-click install
npx skills add https://github.com/pingfanfan/hello-dsh --skill dsh-first-plugin-pingfanfan
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: dsh-first-plugin
Source: https://github.com/pingfanfan/hello-dsh/tree/main/examples/skills/dsh-first-plugin
Command: npx skills add https://github.com/pingfanfan/hello-dsh --skill dsh-first-plugin-pingfanfan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building a first DSH plugin involves undocumented pitfalls—missing output declarations, invalid required flags, and export default breaking injection—that cause confusing errors. This Skill provides a verified end-to-end path plus exact fixes for the three errors actually encountered in practice. ## Core Features & Use Cases - Complete Working Flow: Write the plugin TypeScript file, generate a cordis.yml overlay with absolute paths, load via --patch, and verify the tool responds. - Verified Error Fixes: Exact causes and fixes for the output schema error, the required:false rejection, and the export default injection failure. - Schema Clarification: Explains that parameters is a flat field map while output.schema is standard JSON Schema, a common source of confusion. - Use Case: A developer wants to register a custom tool in DSH 0.1.0-rc.6; following this Skill they produce a working plugin and avoid the three known runtime errors. ## Quick Start Walk me through creating and loading my first DSH plugin that registers a custom tool, including the overlay file and verification command.

Frequently Asked Questions about dsh-first-plugin

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create my first DSH plugin?▼

Write a TypeScript module exporting name, inject, and an apply function that registers a tool via ctx.tools.register, then create a cordis.yml overlay with the absolute file path and load it using npx @deepseek-ai/dsh --patch ./cordis.yml.

When should I write a DSH plugin instead of a skill?▼

Write a skill (a single Markdown file) when natural language can express the change, such as altering model judgment or output format. Write a plugin only when you need to register new tools, connect external services, or hook lifecycle events.

Why does my DSH tool fail with must declare output schema render?▼

Tool registration requires an output block containing a schema describing the return value structure and a render function for displaying results to the model. Declaring only name, description, and parameters is insufficient.

Why does export default break my DSH plugin?▼

The loader's unwrapExports prefers exports.default, so a default export yields a bare function while sibling named exports like inject and name are discarded. The plugin then runs without injected services; remove export default and use named exports only.

Can I use required false in DSH tool parameters?▼

No, the required field only accepts true. To mark a parameter as optional, omit the required field entirely; writing required: false triggers an UNSUPPORTED_SCHEMA violation.

How do I debug a DSH plugin that is not loading?▼

Run dsh --profile web --dump-config and grep for your plugin id. If absent, the overlay did not apply, usually due to a relative path; if present but disabled, check for !!js usage on the disabled field.