In the usage scenarios of DeepSeek Harness (DSH), frequently used commands, code snippets, or prompts often require manual copying and pasting, lacking a lightweight persistent storage solution. dsh-snippets aims to solve this problem. It is a minimal “favorites” toolkit that stores commonly used snippets in local files for AI to retrieve on demand during conversations.

Core Positioning

This plugin is maintained by taxueseek and belongs to the memory plugin category. It does not depend on any database, vector store, or UI panel, and stores data only through JSONL files. Its core logic is “explicit memory”: the AI does not automatically record conversation content; read/write operations occur only when the user explicitly invokes the tools.

Core Features

The plugin provides 5 semantically clear tools with straightforward functionality:

  1. snippet_save: Save or overwrite a snippet. If the name already exists, it updates the content and the timestamp.
  2. snippet_search: Search by substring. Matching includes the snippet name, body content, and tags, and is case-insensitive.
  3. snippet_get: Retrieve a snippet by exact name.
  4. snippet_delete: Delete a specified snippet.
  5. snippet_count: Count the total number of stored snippets.

Installation

Run the following command in the command line to install:

dsh plugin --profile web add "github:taxueseek/dsh-snippets#main&path:."

After installation, you need to restart the DSH Web service to load the plugin.

Typical Usage

In DSH conversations or tool calls, you can use the following syntax:

Save snippet:

snippet_save(name: "docker-logs", text: "docker logs -f --tail 100 myapp", tags: ["ops"])

Search snippet:

snippet_search(query: "logs")

Retrieve snippet:

snippet_get(name: "docker-logs")

Data and Rules

  • Storage path: ~/.dsh/snippets/snippets.l
  • Storage format: JSONL (one JSON object per line), including the name, text, tags, and updatedAt fields. The file is human-readable and manually editable.
  • Naming and length limits: Snippet names are restricted to [A-Za-z0-9._-]{1,80}, and the maximum length of a single entry is 20,000 characters.
  • Fault tolerance: If the JSONL file contains malformed lines, the parser will automatically skip them without affecting the reading of other data.

Applicable Scenarios and Notes

  • Target audience: Developers and operations personnel who need to frequently reuse specific commands, code snippets, or prompts.
  • Runtime characteristics: The plugin runs entirely locally, with zero UI, zero network, and zero database dependencies (depending only on the Harness SDK).
  • Note: Please ensure that you have reviewed the source code before installation and confirmed that the license (MIT) meets your requirements.