Introduction

When using models in DSH, prompts are often scattered across conversations, notes, and temporary files: common writing styles are not centrally managed, optimized versions are difficult to reuse, and personas and tones tend to drift across different sessions. DSH’s plugin mechanism allows you to hook these tools into specific workflows.

Below is an introduction to dsh-prompt-library, a plugin that provides prompt management, AI optimization, and persona customization in the chat bar.

What is it

dsh-prompt-library is a DSH (DeepSeek Harness) prompt library plugin maintained by master1Sun. It treats the prompt as a core object, supporting the management of prompt titles, bodies, and tags, invoking prompts in the chat bar, one-click text optimization, and constraining the AI’s identity, tone, and work rules via SOUL.md.

Core Features

Prompt Management

The plugin manages prompt titles, bodies, and tags, supporting search, sorting, tag grouping, and usage statistics.

Invocation and Writing

Entering # in the chat bar quickly triggers the prompt library selection and supports real-time filtering.

Prompts can be written or sent in three ways:

  1. Insert: Appends to the current input content.
  2. Overwrite: Replaces the current draft.
  3. Insert & Send: Fills in template variables and sends.

AI Polish

Clicking AI Polish optimizes the text with one click and replaces it back into the input box.

Persona

The plugin constrains the AI’s identity, tone, and work rules via the SOUL.md persona file. The AI only reads this file and does not modify it on its own.

Generate DSH Skills

From Prompt Library → Import/Export, you can select prompts to generate DSH Skills in batch.

The generated skill is written to:

~/.dsh/skills/<name>/SKILL.md

When used, it can be triggered via:

/skill-name

or automatically matched by the model based on the description.

Auto-Learning and Settings

The plugin can automatically learn input content into the prompt library and use AI to refine titles, tags, summaries, and bodies.

In DSH Settings → Prompt Library, you can adjust settings such as auto-learning, manual confirmation, AI smart polishing, panel size, sidebar, button visibility, and # trigger.

Installation and Activation

First, add the plugin using the plugin installation command:

dsh plugin --profile web add @sunjuntao/dsh-prompt-library

The package name in the installation command is @sunjuntao/dsh-prompt-library, which is inconsistent with the GitHub repository owner master1Sun; use the package name given in the command for installation.

After starting dsh web, click the Prompt Library button in the chat bar to open the panel; you can also quickly trigger prompt library selection by entering # in the chat bar.

Typical Usage

  1. Start dsh web and click the Prompt Library button in the chat bar to open the panel.
  2. Enter # in the chat bar to select existing prompts via real-time filtering.
  3. Select Insert, Overwrite, or Insert & Send, and send after appending, replacing, or filling template variables.
  4. After entering the content to be optimized, click AI Polish to optimize it with one click and replace it back into the input box.
  5. If the prompt has been generated into a skill, enter in the chat box:
/skill-name

Details of Insert & Send

Insert & Send fills in template variables and sends. To avoid mistakenly carrying over existing content, it has two scenario restrictions:

  • In non-# scenarios, it is only available when the draft is empty.
  • When triggered by #, it filters out the trigger word and sends the preceding text together.

Data Storage

The plugin uses SQLite (node:sqlite) to store the prompt library. Other configurations and logs are stored in:

~/.dsh/prompt-library/

Paths listed in the documentation include:

~/.dsh/prompt-library/db/prompts.db
~/.dsh/prompt-library/log/ai-YYYY-MM-DD.log
~/.dsh/prompt-library/character/SOUL.md

Generated DSH Skills are written to:

~/.dsh/skills/<name>/SKILL.md

Applicable Scenarios and Notes

Suitable for the following scenarios:

  • Frequently writing, invoking, and reusing prompts in DSH.
  • Want to solidify common prompts into titles, bodies, tags, and usage statistics.
  • Need to constrain the AI’s identity, tone, and work rules.
  • Want to convert prompts into DSH Skills and trigger them.

Notes:

  • The plugin runs with the current dsh process permissions and reads/writes relevant directories under local ~/.dsh; it is recommended to check the source code, release package, and license before installation.
  • The AI only reads SOUL.md and does not modify the persona file on its own.
  • Insert & Send requires the draft to be empty in non-# scenarios; confirm the current input content before use.

Related Links

GitHub: https://github.com/master1Sun/dsh-prompt-library

This article does not provide a Table of Contents URL, so only the GitHub repository address is listed.