Back to directory

dsh-prompt-injector

In a curated listMaintenance: Active

yukk4159-bit/dsh-prompt-injector

Composer preset picker that silently rewrites the message sent to the model (prefix or suffix) without touching the input box.

View on GitHub
$ dsh plugin --profile web add "github:yukk4159-bit/dsh-prompt-injector"

16

stars

0

forks

JavaScript

Language

MIT

License

2026-10-11

Created

2026-11-22

Last push

MIT-licensed DeepSeek Harness Web plugin that puts a preset picker next to the composer and prepends your chosen preset to your own message at send time — one-shot by default, every turn if you want — without ever writing into the input box.

DSH integration

Native runtime

Author-claimed

Safety audit

Unaudited

Last verified

2026-11-24

License

MIT

01What can it help you accomplish?

  • Stop retyping the same preamble before every message

    At send time the Host renders your preset through its template and prepends it to the message, while the composer keeps only the words you typed; the chip spells out the mode — `💌 name next` or `💖 name every turn`

    DSH users who repeat a review, translation or persona instruction across many turns

  • Choose whether a preset applies once or on every turn

    Two modes at the top of the picker: in one-shot mode the Host drops the selection right after that send, the other keeps applying until you cancel — switching the mode while a preset is selected retargets that same selection

    People who want a rule for one follow-up question without pinning it to the rest of the conversation

  • Keep a reusable preset library instead of pasting from a notes app

    A library page with create, edit, delete, search and tag filters; saving writes `config.presets` into the profile's `cordis.patch.yml` and mirrors the library to a JSON file under `<DSH_HOME>/prompt-injector/`

    Anyone keeping a handful of standing instructions that should survive restarts and session switches

02How to install into DeepSeek Harness

Prerequisites

  • DeepSeek Harness inside the declared range — `package.json` sets `engines.dsh` to `>=0.2.0-rc.2 <0.3.0` and the plugin manager refuses anything outside it (tested on 0.2.2-rc.3 and 0.2.0-rc.2)
  • A `dsh` CLI, or Node running `npx -p @deepseek-ai/dsh dsh`; the profile has to be restarted after installing
  • The Web GUI: this is a Web plugin with a Host half and a browser half, so the picker lives next to the web composer

Installation steps

  1. 01

    Add the bundle to a profile: `dsh plugin --profile web add "github:yukk4159-bit/dsh-prompt-injector"`

    $ dsh plugin --profile web add "github:yukk4159-bit/dsh-prompt-injector"

  2. 02

    Or install from a local checkout: `dsh plugin --profile web add "/path/to/prompt-injector"` — a local install is a link, so edits apply after a restart, while a GitHub install is a copy and needs the `add` command again for updates

    $ dsh plugin --profile web add "/path/to/prompt-injector"

  3. 03

    Restart that profile and open the Web GUI: a 🌸 preset button appears to the left of the input box

  4. 04

    Write presets in Settings → 提示词注入器 — name, optional ID, tags and injected text — which are stored as `config.presets`; then pick a mode and a preset in the 🌸 panel

Verify the integration

  • A 🌸 preset button sits to the left of the composer, and Settings → 提示词注入器 lists the library with search and tag filters, including create, edit and save
  • Settings → Plugins shows a 「提示词注入器」 row with its icon and description, where you can enable or uninstall it
  • Send one message in one-shot mode: the session log should carry the preset block ahead of your own line — the author's run recorded `[代码评审] … [/代码评审]` followed by the typed text

Rollback

  • Uninstall it from Settings → Plugins: the picker and the injection disappear together with the plugin
  • To stop injecting without uninstalling, set the `enabled` config to `false` — the UI stays, nothing is injected, and the library remains in `config.presets`

03DSH integration and capability boundaries

DSH integrationNative runtime

Native DSH Web plugin: a bundle (`cordis.patch.yml`) installed with `dsh plugin --profile web add`. The browser half adds a 🌸 preset picker beside the composer; the Host half hooks the `agent/pre-step` waterfall, where `applyInjection()` in `lib/inject.js` pastes the chosen preset onto the front of the message about to be sent.

  • Preset picker beside the composer

    A click on 🌸, then a mode (one-shot or every turn) and a preset→A chip next to the composer reading `💌 name next` or `💖 name every turn`; the input box itself is never written to

  • Send-time injection on the Host pre-step

    The user message, plus this session's selection or a `{{id}}` marker inside the text→The rewritten message: the preset rendered through `config.template` and joined by `config.separator`, prepended by default or appended when `position` is `suffix`

    the injected text becomes part of the stored conversationonly messages with `source.kind === 'user'` are rewritten, leaving context snapshots, skill reminders and tool appends untouchedeach step rewrites at most one message, so a preset is never multiplied
  • One-shot, every-turn and inline `{{id}}`

    `once` or `sticky` from the picker, or `{{code}}` typed straight into the message→One-shot injects a single message and then the Host drops the selection; every-turn keeps applying until cancelled; a `{{id}}` that matches a library preset is injected and stripped from that message

    a `{{id}}` that matches no preset is sent through as ordinary text
  • Template, separator and position

    `config.template`, `config.separator` and `config.position`→The preset wrapped in your own template (`{{name}}`, `{{id}}`, `{{text}}`), joined to your words by the separator, in front by default or at the end with `suffix`

  • Library page with persistence

    Name, optional ID, tags and text in Settings → 提示词注入器→Create, edit, delete plus search and tag filtering, written to `config.presets` and mirrored to `<DSH_HOME>/prompt-injector/prompt-injector.json`

    saving reloads the plugin row once, which clears the session selection — pick the preset againclearing the library also empties the JSON mirror, so a deleted library is not restored on restart

04Who is it for? When not to use it?

Good for

  • DSH users who repeat a review, translation or persona instruction across many turns
  • People who want a rule for one follow-up question without pinning it to the rest of the conversation
  • Anyone keeping a handful of standing instructions that should survive restarts and session switches

Not for

  • `engines.dsh` is `>=0.2.0-rc.2 <0.3.0`: installing on a DSH outside that range is refused by the plugin manager, which reports the version it needs, and only 0.2.2-rc.3 and 0.2.0-rc.2 were tested
  • Injection runs before the message reaches the session log, so the stored conversation carries the preset block — the record equals what the model received, and the injected text counts as part of your message
  • Every-turn mode — and `defaultPresetId`, which is every-turn by definition — re-pastes the whole preset on each message, so a long preset keeps occupying context and tokens turn after turn
  • It is a Web plugin: the picker and the settings page live in the web GUI and the browser half talks to the Host half over the plugin's HTTP routes, so terminal-only sessions have nothing to click

05Compatibility, maintenance and safety notes

  • `engines.dsh` is `>=0.2.0-rc.2 <0.3.0`: installing on a DSH outside that range is refused by the plugin manager, which reports the version it needs, and only 0.2.2-rc.3 and 0.2.0-rc.2 were tested
  • Injection runs before the message reaches the session log, so the stored conversation carries the preset block — the record equals what the model received, and the injected text counts as part of your message
  • Every-turn mode — and `defaultPresetId`, which is every-turn by definition — re-pastes the whole preset on each message, so a long preset keeps occupying context and tokens turn after turn
  • It is a Web plugin: the picker and the settings page live in the web GUI and the browser half talks to the Host half over the plugin's HTTP routes, so terminal-only sessions have nothing to click
  • The library stays local — `config.presets` in the profile's `cordis.patch.yml` plus a JSON mirror — and the session selection never leaves Host memory; but the injected preset text travels with your message to whichever model service the session uses
  • Despite the name it is not a jailbreak or an injection-attack tool: it only prepends a preset you wrote in the settings page and selected in that session to your own message, and it never touches the system prompt, other sessions or messages produced by tools
  • `{{id}}` is treated as a reference only when the ID matches a library preset, so a commonplace ID such as `code` can swallow a literal `{{code}}` in your text — pick a distinctive ID if that matters
2026-10-112026-11-22Not specified by the author

MIT (stated in the README) · active, last push 2026-11-22, no releases published; author-tested on DSH 0.2.2-rc.3 and 0.2.0-rc.2

06Frequently asked questions

How do I install dsh-prompt-injector into DeepSeek Harness?

Run `dsh plugin --profile web add "github:yukk4159-bit/dsh-prompt-injector"` inside a profile, restart that profile and open the Web GUI: a 🌸 preset button appears left of the input box and Settings → 提示词注入器 holds the library. Without a global CLI, prefix the command with `npx -p @deepseek-ai/dsh`.

What exactly gets injected — is this a jailbreak tool?

No. The plugin pastes a preset you wrote yourself in the settings page, and selected yourself in that session, in front of your own message. It does not edit the system prompt, other sessions or messages produced by tools and skills, and it is not a way to bypass model refusals.

Does it apply to one message or to every turn?

Both, chosen at the top of the panel: 💌 injects only the next message and the Host drops the selection right after, while 💖 keeps applying until you cancel. `defaultPresetId` in the config is every-turn by definition, and typing `{{id}}` in a message injects that preset once and strips the marker from the text.

Where is the preset library stored, and does it leave my machine?

Saving writes `config.presets` into that profile's `cordis.patch.yml` and mirrors the library to `<DSH_HOME>/prompt-injector/prompt-injector.json`; the per-session selection only lives in Host memory. The plugin itself sends nothing anywhere, but the injected text becomes part of the message you send to your model provider.

Why did my selection reset, or why is the chip slow to switch back?

Saving the library reloads the plugin row once, which clears the session selection — pick the preset again. After a one-shot send the chip can take up to 3 seconds to return to 🌸 because the page only polls `GET /selection`; the injection itself already happened.

08Data and sources

  • Author-claimedgithub.com2e028fac4d86…

    一个 [DeepSeek Harness](https://deepseek.com/harness/) Web 插件:把可复用的提示词预设**在发送的那一刻注入到消息首部**,而不是填进输入框。

  • Author-claimedgithub.com2e028fac4d86…

    实现位置:`lib/inject.js` 的 `applyInjection()`,注册在 `agent/pre-step` 瀑布事件上——这是消息进入会话日志之前的最后一个接缝。

  • Author-claimedgithub.com2e028fac4d86…

    插件在 `package.json` 里声明了 `engines.dsh`(`>=0.2.0-rc.2 <0.3.0`),装到范围外的版本会被插件管理器直接拒绝。

  • Author-claimedgithub.com2e028fac4d86…

    在 DeepSeek Harness `0.2.2-rc.3` 与 `0.2.0-rc.2` 上实测可用(Host 侧 73 个用例,浏览器半在真实 GUI 里跑通,见[已验证](#已验证--待验证))。

This page is generated from the project’s public documentation, repository metadata and a structured parse of DSH Plugins; last verified on 2026-11-24. Found an error? Submit a correction.

🏆

Best DeepSeek Harness Plugins

Twelve plugins worth installing first — picked from the whole catalog, across every category.

DSH Plugins is an independent community directory of DeepSeek Harness plugins. Not affiliated with or endorsed by DeepSeek. Third-party plugins are not security-audited — review the source before installing.

New DeepSeek Harness plugins, weekly. No spam.