dsh-trans-md: Persist Long Responses as Markdown, Keep Only Summaries in Chat

Preface

When conducting agent conversations in DeepSeek Harness (dsh), if the assistant generates a very long output, two common issues arise: the transport layer may truncate extremely long replies during streaming; and if all long content remains in the chat, it enters the context repeatedly, resulting in duplicate billing for every subsequent request. The community plugin dsh-trans-md addresses this by writing the full text to a workspace Markdown file when the final user-facing reply exceeds a line threshold, leaving only a short summary and path in the chat. The following sections introduce its positioning, capabilities, and installation/configuration methods.

What is this

dsh-trans-md is a client-side DSH plugin published by maintainer passerby325799 (GitHub repo passerby325799/dsh-trans-md; viewable in the SkillHub directory). It does not register tools, provide UI, or initiate network requests. Instead, it contributes a single rule (order 40) to the system prompt, guiding the model to change the “delivery location” of long replies rather than altering investigation depth.

Core Features

The key points of the rule declared by the plugin in the system prompt are as follows (consistent with the README):

  1. If the final reply to the user will exceed 15 lines (default threshold, configurable), the complete content should be written to docs/<prefix>-<topic>.md under the current workspace (directory and prefix are configurable) instead of pasting the full text in the chat.
  2. The reply in the chat becomes a summary of at most 10 lines, including the file path.
  3. Replies under 15 lines are still sent normally in the chat.
  4. Writing to a file and pasting the body into the chat simultaneously is prohibited.
  5. Intermediate narration between tool calls is not constrained by this rule; the rule primarily applies to the final user-facing reply in the main conversation.

Additional notes:

  • The first write will create the docs/ directory (or your configured directory) in the workspace.
  • According to the README, writing content to a file as a tool parameter saves tokens compared to “keeping long replies in the chat context and resending them every turn”; specific billing depends on the Harness and model you use.
  • This is a strong prompt-level preference, not a hard interception at the output layer; the README explicitly states that strict enforcement in every turn cannot be guaranteed. Hard enforcement requires output hooks, which this plugin deliberately does not implement.

Installation and Activation

The installation command comes from the repository README:

dsh plugin --profile web add github:<owner>/dsh-trans-md

Replace <owner> with the repository owner (for this plugin, passerby325799) and run the command. After installation, you must restart dsh or reload the profile for it to take effect in new turns.

Runtime requirements: DSH must provide the systemPrompt service; if the service does not exist, the plugin will mount but not contribute content, and will not cause profile loading to fail. There are no additional runtime dependencies. The license is MIT (package.json version 0.1.0).

Configuration

All configuration items are optional and set via profile patch. Example from the README:

- id: dsh-trans-md
  name: dsh-trans-md
  config:
    maxLines: 20
    docsDir: notes

Full fields and default values:

Key Default Description
enabled true Turn off the rule without uninstalling the plugin
maxLines 15 Write to disk if this line count is exceeded
docsDir "docs" Output directory relative to the workspace
filePrefix "notes" Prefix for generated file names
ruleFile — Fully replace the built-in rule text with a specified Markdown file
workspaceRoot — Optional absolute path; if omitted, uses the process working directory

Custom rules: Point ruleFile to any Markdown file; non-empty file content completely replaces the built-in instructions (limit 4000 characters). If the file is empty or unreadable, the built-in text is silently used as a fallback, and error paths will not break prompt assembly.

Typical Usage

  1. Install the plugin using the command above under the web profile and restart or reload.
  2. Keep defaults: long final replies will go to paths like docs/notes-<topic>.md in the workspace (<topic> is named by the model based on content), and you will see a summary and path in the chat.
  3. If you want a more relaxed threshold and the directory changed to notes, set maxLines: 20 and docsDir: notes in the profile according to the YAML example.
  4. If your team has fixed output specifications, prepare a rule Markdown file and set ruleFile to point to it.

No additional CLI is needed; the behavior is entirely driven by system prompt rules, and files are created by the model via existing file writing capabilities during the conversation.

Use Cases and Notes

Who is it for

  • Developers who frequently get long analyses, tutorials, or reports in DSH, want a readable chat window, and also want to archive them in the repository.
  • Scenarios concerned with context length and token usage, hoping to “write once and keep long text out of context” by using files.

Please be aware before use

  • The plugin runs with the current dsh process permissions; before installation, it is recommended to read the GitHub source and the MIT license to confirm it meets your security and compliance requirements.
  • The rule is a soft constraint; in extreme cases, the model may still output longer content in the chat; do not treat it as a mandatory truncation for audit or compliance purposes.
  • Community directories like SkillHub are independent of DeepSeek / High-Flyer and are not official app stores; plugin ownership and descriptions are subject to the repository README.

Conclusion

dsh-trans-md uses a configurable system prompt rule to migrate extremely long final replies from the chat to workspace Markdown, keeping only a summary and path in the chat, and avoiding the duplication of “writing to a file and pasting the full text”. If you need to control the display and storage of long replies in DSH, you can install it from the directory page or GitHub and adjust the threshold and directory via the profile.

  • Directory: https://www.skillhub.cn/plugins/passerby325799/dsh-trans-md
  • GitHub: https://github.com/passerby325799/dsh-trans-md
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye