dsh-qrcode: Generating and Parsing QR Codes in DeepSeek Harness

Introduction

Generating QR codes and reading QR code content in DeepSeek Harness (DSH) conversations typically requires switching to external tools or relying on network services. The DSH plugin ecosystem offers a more direct solution. The dsh-qrcode plugin runs locally, requires no network, no API key, and no native build. It embeds QR code generation and decoding into the conversation flow through two model tools, a select-text generation button, and automatic scanning of message images.

Plugin Scope & Maintainer

dsh-qrcode is a QR code utility plugin that runs inside DSH, maintained by Douglas-Fly. It provides two tools for agent developers: qr_generate and qr_decode. It also offers a browser-side select-text generation button and automatic scanning capability for message images.

Core Features

The plugin provides two tools and one interactive button.

Tools

Tool Parameters Return Value
qr_generate text (required), output_path?, format? (png/svg), size? (64–2048 px), margin? (0–16 modules), error_correction? (L/M/Q/H) Absolute path of the written image, plus file size, pixel dimensions, QR version, module count, and error correction level
qr_decode file_path (required; supports paths or data:image/...;base64 URIs) Decoded text, byte length, image dimensions

Defaults: PNG output, 512 px size, quiet zone of 2 modules, error correction level M. The output filename is qr-<timestamp>.png, stored in the session working directory unless another location is specified via output_path.

Select-Text Generation Button

After selecting any text in the conversation, a small button appears above it. Clicking the button renders a QR code at the current location and provides a download link. The button reads the document selection rather than any plugin’s DOM structure, so it works in message text, tool output, or the sidebar.

Automatic Message Image Scanning

When a message contains an image, the plugin automatically scans for QR codes in the image before the request is assembled. The decoded text is added to the context with an untrusted label. Decoding runs locally and targets only images in the current turn. Each image is scanned only once per session. This feature is enabled by default and can be disabled on the plugin page (Plugins → QR codes) or via the autoDecode field in the configuration file.

Installation & Activation

The plugin can be installed via DSH’s plugin marketplace, npm, or a local directory.

  1. Install via the plugin marketplace

Go to Plugins → Discover in DSH, search for QR codes, and install.

  1. Install via npm
dsh plugin add dsh-qrcode --profile <profile>
  1. Install via a local directory

Copy the plugin folder to a local directory, then go to Plugins → Add plugin in DSH and select that directory (or use the plugin_manager’s install_bundle method with its absolute path). After installation, a qr-code entry is inserted into the configuration.

Typical Usage

Generating a QR Code

In the conversation, type:

Make a QR code for https://example.com

The Agent will call the qr_generate tool, write qr-<timestamp>.png in the session working directory, and return the file path. You can ask the Agent to display the file, or open it from the path.

Decoding a QR Code

If the Agent provides an image path containing a QR code, you can ask in the conversation:

What is in this QR code?

The Agent will call the qr_decode tool, read the text from the image, and return it.

Select-Text Generation

Select any text (e.g., a URL, a short message), and click the button that appears to generate and download the QR code.

Scanning a QR Code in a Screenshot

Paste a screenshot containing a QR code into the conversation. The plugin will automatically scan the image and provide the decoded text as context to the Agent, without you needing to open the file manually.

Use Cases & Notes

This plugin is well-suited for scenarios that frequently require generating or reading QR codes within the conversation flow, such as passing short links, verification codes, or brief instructions in agent workflows. Since the plugin runs with the privileges of the current DSH process, please make sure to review the source code and license (MIT) before installing.

Conclusion

dsh-qrcode embeds QR code generation and parsing capabilities into DSH’s conversation flow, enabling local, network-free, and native-build-free QR code handling through tools and an interactive button. Plugin directory: https://www.skillhub.cn/plugins/Douglas-Fly/dsh-qrcode; Source code: https://github.com/Douglas-Fly/dsh-qrcode

羽毛球分组比赛记分
小程序二维码

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

Xiaoye