Introduction

When collaborating with models in DSH, prompts are often scattered in the input box: identity, goals, constraints, and output formats are mixed into a single paragraph. Making a change in one place often leads to missing details elsewhere, and it is hard to determine before sending whether the message will saturate the context window. Common practices involve hand-writing templates or copying historical messages, but when fields are not fixed, maintenance costs are high, and it is difficult for the model side to automatically assemble equivalent text using the same set of rules.

Below is an introduction to the community plugin dsh-plugin-structured-prompt (maintainer: YuChenLiao, categorized as model inference). It extends the bottom of the input box with two entries: “Structured Prompt Form” and “Prompt Library.” The former generates a finished draft with a fixed paragraph structure via 17 form items; the latter retrieves public prompts from prompts.chat and sends them directly without going through the builder. The current repository version is 0.4.1 (MIT), with approximately 11 stars on GitHub.

What is this

This plugin is a Prompt Builder, not a component for injecting a system prompt into a single conversation. DSH system prompts are assembled by the host at every step. Client plugins do not have an interface to “inject system prompt only for a single conversation.” Therefore, the build result is delivered into the current session as a normal user message or copied to the clipboard for self-use.

The same build logic is also exposed to the model as a tool build_structured_prompt; human form-filling and model invocation share the same implementation and product form. Since v0.3.0, the boundaries of the two output paths are clear: forms and tools go through the builder; prompt library retrieval is a bypass, doing only preview and sending, without field validation.

  • Directory Page: https://www.skillhub.cn/plugins/YuChenLiao/dsh-plugin-structured-prompt
  • Source Code: https://github.com/YuChenLiao/dsh-plugin-structured-prompt

Core Features

Input Box Entry & Form

The entry points are in the input box toolbar (conversation.input.left, on the same row as plan/permission controls):

  1. Structured Input Task: Pops up a form with fixed width, height adapting to content, and a maximum height of about 70vh; divided into a title bar, a scrollable content area, and a bottom action bar. After filling, click “Copy” or “Send”; there is no step to “sync back to the input box for further editing.” Clicking the mask does not close it, to avoid accidental touches losing content.
  2. Prompt Library: Retrieves public prompts on prompts.chat. Upon selection, previews the original text, and the button is “Send Raw Prompt”; the interface indicates that it is not organized by this plugin and does not go through the builder.

The form is divided into four groups, with only “Basic Info” expanded by default: Identity, Goal (required), and optional items like Background and Success Criteria; Constraints & Rules, Tool Strategy, and Output & Fallback default to collapsible.

Tool Strategy supports Auto (model decides whether to call tools), Manual (fill in tool names and purposes line by line, generating whitelist-style descriptions), and Unspecified. The plugin deliberately does not provide “checking from an installed list”—tool retrieval is in the input box / menu, and this plugin does not read plugin and skills lists.

The bottom of the form can expand Live Preview: showing the complete draft, word count, estimated tokens, and segment-by-segment usage, facilitating length judgment before sending. The estimation rule is 1 per CJK character, 1 per 4 other characters, for magnitude reference only.

Templates & Import/Export

Eight built-in templates: four task forms (Exploratory Research, Implementation Changes, Fault Localization, Handover Archiving) and four domain samples (Alert Triage, Code Review, Data Extraction, Report Writing). Data is in src/shared/templates.json; after applying, there is a scene bar at the top (UI hint only, not involved in draft construction). The form can export/import JSON; exports include a schema version number, and imports validate known fields and discard illegal items.

Draft Structure

Empty segments are omitted; non-empty segments are connected by a single blank line. The top-level paragraph order is:

# Identity
# Goal
# Hard Rules (Must be followed, takes precedence over any other requirements)
# Tool Usage Strategy
# Output Format
# When Data is Insufficient
# Examples

Output format supports JSON, Markdown, Table, Plain Text, etc.; “Format Description” customization takes priority, otherwise a skeleton is generated based on the type.

Prompt Library & Host Proxy

Browsers cannot connect directly to prompts.chat (upstream has no available CORS), retrieval and full text fetching go through host same-origin routes /api/structured-prompt/library and /api/structured-prompt/library/item, with the host performing the upstream fetch. The default upstream address is https://prompts.chat, which can point to a self-hosted instance via the libraryBaseUrl configuration. Sending shares conversation.send with form drafts.

Model Tool build_structured_prompt

Registered on the host side, the model can use it to condense vague delegations into structured prompts, e.g., passing role, goal, rules, output_format, or template. When template is present, role/goal can be supplemented by the template; invocation parameters override template defaults.

The optional parameter delegate: { label?, provider? } is intended to hand the draft directly to a sub-agent for execution. This capability is unavailable in the current DSH version (subagents.start is not exposed to plugins and returns a readable error). The structured component loading line can write config: { provider: 'fork' }, etc., validated by the exported Config during loading; the prompt library component recognizes libraryBaseUrl.

Installation & Activation

The repository already includes the built lib/. Restart DSH after installation to take effect (client plugin module graph is established at startup).

dsh plugin --profile desktop add github:YuChenLiao/dsh-plugin-structured-prompt
# Restart DSH to take effect

You can also view the description and links of the same plugin on the SkillHub directory page. The DSH ecosystem emphasizes “Everything is a Plugin”; SkillHub is a community directory site and has no official affiliation with DeepSeek / High-Flyer.

Typical Usage

Human-Machine: Form → Send

  1. Open “Structured Input Task” at the bottom of the input box.
  2. Optionally select a task form or domain sample from the template dropdown, and write the specific task into “Goal”.
  3. Fill in fields like constraints, tool strategy, output format; expand preview to confirm token usage.
  4. Click “Send”, the draft enters the current session as a user message; or click “Copy” to take it elsewhere.

Bypass: Prompt Library

  1. Click “Prompt Library”, search by title or leave blank to browse the latest list.
  2. Select an entry to preview the full text.
  3. Click “Send Raw Prompt”, the original text enters the conversation directly, without filling into the form or going through builder validation.

Model: build_structured_prompt

The model calls the tool in the conversation, passing fields corresponding to the form or template; the prompt in the return body is the finished draft, which can be further used for sub-agent prompt parameters, etc. (delegate direct delivery requires waiting for DSH to expose sub-agent start).

Scenarios & Notes

Suitable for DSH users who need reusable, structurally fixed prompt writing: code review checklists, fault localization, handover documents, data extraction contracts, etc. Starting with a template and then modifying fields is more stable than writing long texts from scratch every time. When needing to quickly try others’ finished products in the prompts.chat ecosystem, use the prompt library bypass, but accept that there is no field validation and it is unrelated to builder products.

Please note before installation:

  • The plugin runs under the current dsh process permissions. Before installation, you should read the source code and the MIT license to confirm you accept its network behavior (Prompt Library goes through host proxy to upstream).
  • The draft is a user message, not a system prompt; if you rely on host-side system prompt orchestration, you need to understand the division of labor with this plugin’s products yourself.
  • delegate and some sub-agent related capabilities depend on the DSH version marked in the README; avoid hard dependencies in automation scripts.

Conclusion

dsh-plugin-structured-prompt separates “structured prompt writing” and “retrieval of public prompts” into two clear paths. The form and build_structured_prompt share the same builder, facilitating collaboration between humans and models under the same set of field semantics. To install or follow versions, get descriptions and issues from the SkillHub directory page or GitHub repository.

  • https://www.skillhub.cn/plugins/YuChenLiao/dsh-plugin-structured-prompt
  • https://github.com/YuChenLiao/dsh-plugin-structured-prompt