The DSH plugin ecosystem allows developers to customize model inference behavior. The czerror/dsh-plugin-prompt-tool plugin is designed to address the complex management problem of prompt injection levels. It consolidates the six officially exposed injection levels in DSH into a single configurable engine, supports three-layer injection for Simplified Chinese behavioral norms (persistent layer, prompt skills, and anchored preset injection), and provides a Web UI for editing.
Core Features¶
The plugin provides a centralized prompt injection solution, including the following features:
One-Pass Wiring for Six Levels
One engine registers all injectable levels and shares the same filtering and fallback semantics. The supported official channels include agent/pre-step, systemPrompt.section, systemPrompt.context, agent/request, llm/stream, and tools/*.
Seven Content Strategies
The plugin includes seven built-in content strategies for different injection scenarios:
* static: static injection
* first-turn-anchor: first-turn anchoring
* guide-auto: proximity guidance
* custom-fallback: custom fallback
* instruction-hint: instruction hint
* placeholder: placeholder
* world-book: world book (supports key hits and regex detection)
Official Slot Workbench
A shell.overlay-driven Web UI provides editing for preset configuration, character management, custom tools, and more. UI mounting is fully delegated to the official SlotRegistry, with no dependency on host DOM selectors.
Character Card and World Book Management
* Character Card Library: Supports importing PNG (tEXt chunk ccv3/chara) and JSON character cards, with memory management included.
* World Books: Supports converting character_book into world-book strategy configuration, with key-hit triggers, automatic regex key detection, and selective logic (selectiveLogic).
Custom Tools
Supports declarative definitions of model tools. Executor types include shell/http/delegate/fs/ask-user, with parameter interpolation ({{args.x}}).
SillyTavern Import
Supports one-click conversion of JSON preset cards into local presets, automatically strips sampling parameters, and collects variables into top-level configuration.
Installation and Activation¶
Before installation, ensure that DeepSeek Harness (DSH) version 0.1.1-rc.1 or later is installed locally.
dsh plugin --profile prompt-tool add dsh-plugin-prompt-tool
After installation, the default preset strategy source is dsh-anchored-standard or similar.
Configuration and Verification¶
Single Configuration Source
The plugin uses preset.yml as a single source of configuration. This file contains complete content including prompt configuration, parameter definitions, and model settings.
Verification
The project includes 287 unit tests that can be used to verify rendering, merging, six-level wiring, preset generation, anchored matching, interpolation, session variables, and more.
pnpm test
Notes¶
- Dependency Version: The plugin requires DSH version 0.1.1-rc.1 or later.
- License: The plugin itself is licensed under MIT.
- Configuration Source: The default preset strategy source is
dsh-anchored-standard.
Summary¶
czerror/dsh-plugin-prompt-tool simplifies DSH prompt configuration through a unified injection engine and Web UI. It not only supports standardized behavioral norm injection, but also enriches agent context construction through features such as character card import and world book management.