Introduction

DeepSeek Harness (dsh) extends its toolset through a plugin mechanism. During Agent development or usage, inputs are often brief or ambiguous (for example, “help me write a weekly report”), and using these instructions directly can lead to unstable output quality. The dsh-tools-plugins plugin addresses this by providing the optimize_prompt tool, which rewrites natural-language instructions into prompts with a clear structure (Role, Task, Constraints, Output Format).

Core Features

The plugin primarily provides the optimize_prompt tool.

  1. Instruction Rewriting: It takes a brief or ambiguous instruction and uses the configured LLM to rewrite it into a structured prompt.
  2. Structured Output: The rewritten prompt typically contains four core parts: Role, Task, Constraints, and Output Format.

Installation and Activation

Install it through the dsh CLI:

dsh plugin --profile web add github:lizhi00001/dsh-tools-plugins

After installation, restart the dsh process to activate the plugin.

For local development, the environment must meet the following requirements:
* Node.js version: ^22.19 or >=24
* Package manager: pnpm

Typical Usage

After installing the plugin, optimize_prompt can be used in two ways:

  1. Manual invocation: Enter the instruction directly in the Web UI:
Use optimize_prompt to rewrite: "help me write a weekly report"
  1. Automatic detection: When an Agent processes a conversation, if it detects an ambiguous instruction, it automatically invokes the tool to optimize the prompt.

Configuration

Configure plugin parameters in cordis.patch.yml to override the default model settings:

- id: dsh-prompt-enhancer
  config:
    provider: deepseek
    model: deepseek-chat
    maxTokens: 1200

If provider and model are not specified, the plugin uses the default model of the current Profile.

Ecosystem and Development

This plugin declares dsh.bundle.patch and adds the dsh-plugin theme, so it can appear in the DSH plugin ecosystem directory. Development involves writing and building with TypeScript.

Summary

dsh-tools-plugins addresses the inconsistency in Agent input instruction quality by rewriting prompts into a structured format, improving the determinism of task execution. For more details and source code: https://github.com/lizhi00001/dsh-tools-plugins